Java Doc for StyledParagraph.java in  » 6.0-JDK-Core » AWT » java » awt » font » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » AWT » java.awt.font 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.awt.font.StyledParagraph

StyledParagraph
final class StyledParagraph (Code)
This class stores Font, GraphicAttribute, and Decoration intervals on a paragraph of styled text.

Currently, this class is optimized for a small number of intervals (preferrably 1).



Field Summary
 int[]decorationStarts
    
 int[]fontStarts
    

Constructor Summary
public  StyledParagraph(AttributedCharacterIterator aci, char[] chars)
     Create a new StyledParagraph over the given styled text.

Method Summary
static  MapaddInputMethodAttrs(Map oldStyles)
     Return a Map with entries from oldStyles, as well as input method entries, if any.
public static  StyledParagraphdeleteChar(AttributedCharacterIterator aci, char[] chars, int deletePos, StyledParagraph oldParagraph)
     Return a StyledParagraph reflecting the insertion of a single character into the text.
public  DecorationgetDecorationAt(int index)
     Return the Decoration in effect at the given index.
public  ObjectgetFontOrGraphicAt(int index)
     Return the Font or GraphicAttribute in effect at the given index.
public  intgetRunLimit(int index)
     Return the index at which there is a different Font, GraphicAttribute, or Dcoration than at the given index.
public static  StyledParagraphinsertChar(AttributedCharacterIterator aci, char[] chars, int insertPos, StyledParagraph oldParagraph)
     Return a StyledParagraph reflecting the insertion of a single character into the text.

Field Detail
decorationStarts
int[] decorationStarts(Code)



fontStarts
int[] fontStarts(Code)




Constructor Detail
StyledParagraph
public StyledParagraph(AttributedCharacterIterator aci, char[] chars)(Code)
Create a new StyledParagraph over the given styled text.
Parameters:
  aci - an iterator over the text
Parameters:
  chars - the characters extracted from aci




Method Detail
addInputMethodAttrs
static Map addInputMethodAttrs(Map oldStyles)(Code)
Return a Map with entries from oldStyles, as well as input method entries, if any.



deleteChar
public static StyledParagraph deleteChar(AttributedCharacterIterator aci, char[] chars, int deletePos, StyledParagraph oldParagraph)(Code)
Return a StyledParagraph reflecting the insertion of a single character into the text. This method will attempt to reuse the given paragraph, but may create a new paragraph.
Parameters:
  aci - an iterator over the text. The text should be the same as thetext used to create (or most recently update) oldParagraph, withthe exception of deleting a single character at deletePos.
Parameters:
  chars - the characters in aci
Parameters:
  deletePos - the index where a character was removed
Parameters:
  oldParagraph - a StyledParagraph for the text in aci before theinsertion



getDecorationAt
public Decoration getDecorationAt(int index)(Code)
Return the Decoration in effect at the given index.
Parameters:
  index - a valid index in the paragraph the Decoration at index.



getFontOrGraphicAt
public Object getFontOrGraphicAt(int index)(Code)
Return the Font or GraphicAttribute in effect at the given index. The client must test the type of the return value to determine what it is.
Parameters:
  index - a valid index in the paragraph the Font or GraphicAttribute at index.



getRunLimit
public int getRunLimit(int index)(Code)
Return the index at which there is a different Font, GraphicAttribute, or Dcoration than at the given index.
Parameters:
  index - a valid index in the paragraph the first index where there is a change in attributes fromthose at index



insertChar
public static StyledParagraph insertChar(AttributedCharacterIterator aci, char[] chars, int insertPos, StyledParagraph oldParagraph)(Code)
Return a StyledParagraph reflecting the insertion of a single character into the text. This method will attempt to reuse the given paragraph, but may create a new paragraph.
Parameters:
  aci - an iterator over the text. The text should be the same as thetext used to create (or most recently update) oldParagraph, withthe exception of inserting a single character at insertPos.
Parameters:
  chars - the characters in aci
Parameters:
  insertPos - the index of the new character in aci
Parameters:
  oldParagraph - a StyledParagraph for the text in aci before theinsertion



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.