AttributedString


AttributedString java.text

Java 1.2

This class represents text and associated attributes. An AttributedString can be defined in terms of an underlying AttributedCharacterIterator or an underlying String . Additional attributes can be specified with the addAttribute( ) and addAttributes( ) methods . getIterator( ) returns an AttributedCharacterIterator over the AttributedString or over a specified portion of the string. Note that two of the getIterator( ) methods take an array of Attribute keys as an argument. These methods return an AttributedCharacterIterator that ignores all attributes that are not in the specified array. If the array argument is null , however, the returned iterator contains all attributes.

 public class  AttributedString  {  // Public Constructors  public  AttributedString  (String  text  );        public  AttributedString  (AttributedCharacterIterator  text  );        public  AttributedString  (String  text  , java.util.Map<?          extends AttributedCharacterIterator.Attribute,?>  attributes  );        public  AttributedString  (AttributedCharacterIterator  text  , int  beginIndex  ,          int  endIndex  );        public  AttributedString  (AttributedCharacterIterator  text  , int  beginIndex  ,          int  endIndex  , AttributedCharacterIterator.Attribute[ ]  attributes  );  // Public Instance Methods  public void  addAttribute  (AttributedCharacterIterator.Attribute  attribute  ,          Object  value  );        public void  addAttribute  (AttributedCharacterIterator.Attribute  attribute  ,          Object  value  , int  beginIndex  , int  endIndex  );        public void  addAttributes  (java.util.Map<?          extends AttributedCharacterIterator.Attribute,?>  attributes  ,          int  beginIndex  , int  endIndex  );        public AttributedCharacterIterator  getIterator  ( );        public AttributedCharacterIterator  getIterator  (AttributedCharacterIterator.Attribute[ ]  attributes  );        public AttributedCharacterIterator  getIterator  (AttributedCharacterIterator.Attribute[ ]  attributes  ,          int  beginIndex  , int  endIndex  ); } 



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net