| Package | Description | 
|---|---|
| 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. | 
| Modifier and Type | Method and Description | 
|---|---|
| AttributedCharacterIterator.Attribute[] | Font. getAvailableAttributes()Returns the keys of all the attributes supported by this
  Font. | 
| Modifier and Type | Method and Description | 
|---|---|
| Font | Font. deriveFont(Map<? extends AttributedCharacterIterator.Attribute,?> attributes)Creates a new  Fontobject by replicating the currentFontobject and applying a new set of font attributes
 to it. | 
| static Font | Font. getFont(Map<? extends AttributedCharacterIterator.Attribute,?> attributes)Returns a  Fontappropriate to the attributes. | 
| Constructor and Description | 
|---|
| Font(Map<? extends AttributedCharacterIterator.Attribute,?> attributes)Creates a new  Fontwith the specified attributes. | 
| Modifier and Type | Class and Description | 
|---|---|
| class  | TextAttributeThe  TextAttributeclass defines attribute keys and
 attribute values used for text rendering. | 
| Constructor and Description | 
|---|
| TextLayout(String string,
          Map<? extends AttributedCharacterIterator.Attribute,?> attributes,
          FontRenderContext frc)Constructs a  TextLayoutfrom aStringand an attribute set. | 
| Modifier and Type | Method and Description | 
|---|---|
| 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. 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. getSelectedText(AttributedCharacterIterator.Attribute[] attributes)Gets the currently selected text from the text editing component. | 
| Modifier and Type | Class and Description | 
|---|---|
| static class  | DateFormat.FieldDefines constants that are used as attribute keys in the
  AttributedCharacterIteratorreturned
 fromDateFormat.formatToCharacterIteratorand as
 field identifiers inFieldPosition. | 
| static class  | Format.FieldDefines constants that are used as attribute keys in the
  AttributedCharacterIteratorreturned
 fromFormat.formatToCharacterIteratorand as
 field identifiers inFieldPosition. | 
| static class  | MessageFormat.FieldDefines constants that are used as attribute keys in the
  AttributedCharacterIteratorreturned
 fromMessageFormat.formatToCharacterIterator. | 
| static class  | NumberFormat.FieldDefines constants that are used as attribute keys in the
  AttributedCharacterIteratorreturned
 fromNumberFormat.formatToCharacterIteratorand as
 field identifiers inFieldPosition. | 
| Modifier and Type | Field and Description | 
|---|---|
| static AttributedCharacterIterator.Attribute | AttributedCharacterIterator.Attribute. INPUT_METHOD_SEGMENTAttribute key for input method segments. | 
| static AttributedCharacterIterator.Attribute | AttributedCharacterIterator.Attribute. LANGUAGEAttribute key for the language of some text. | 
| static AttributedCharacterIterator.Attribute | AttributedCharacterIterator.Attribute. READINGAttribute key for the reading of some text. | 
| Modifier and Type | Method and Description | 
|---|---|
| Set<AttributedCharacterIterator.Attribute> | AttributedCharacterIterator. getAllAttributeKeys()Returns the keys of all attributes defined on the
 iterator's text range. | 
| Map<AttributedCharacterIterator.Attribute,Object> | AttributedCharacterIterator. getAttributes()Returns a map with the attributes defined on the current
 character. | 
| Modifier and Type | Method and Description | 
|---|---|
| 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. | 
| Object | AttributedCharacterIterator. getAttribute(AttributedCharacterIterator.Attribute attribute)Returns the value of the named  attributefor the current character. | 
| 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. | 
| int | AttributedCharacterIterator. getRunLimit(AttributedCharacterIterator.Attribute attribute)Returns the index of the first character following the run
 with respect to the given  attributecontaining the current character. | 
| int | AttributedCharacterIterator. getRunStart(AttributedCharacterIterator.Attribute attribute)Returns the index of the first character of the run
 with respect to the given  attributecontaining the current character. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | AttributedString. addAttributes(Map<? extends AttributedCharacterIterator.Attribute,?> attributes,
             int beginIndex,
             int endIndex)Adds a set of attributes to a subrange of the string. | 
| int | AttributedCharacterIterator. getRunLimit(Set<? extends AttributedCharacterIterator.Attribute> attributes)Returns the index of the first character following the run
 with respect to the given  attributescontaining the current character. | 
| int | AttributedCharacterIterator. getRunStart(Set<? extends AttributedCharacterIterator.Attribute> attributes)Returns the index of the first character of the run
 with respect to the given  attributescontaining the current character. | 
| Constructor and Description | 
|---|
| 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. | 
| Constructor and Description | 
|---|
| AttributedString(String text,
                Map<? extends AttributedCharacterIterator.Attribute,?> attributes)Constructs an AttributedString instance with the given text and attributes. | 
 Submit a bug or feature 
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2017, Oracle and/or its affiliates.  All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.