Java Doc for StyleRange.java in  » Swing-Library » jide-common » com » jidesoft » swing » Java Source Code / Java DocumentationJava Source Code and Java Documentation

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 geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Swing Library » jide common » com.jidesoft.swing 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jidesoft.swing.StyleRange

StyleRange
public class StyleRange (Code)
A data structure represents a style for a range of text. There are two categories of styles that currently supports. One is the font style and color which includes bold, italic, superscript, subscript as well as the color of the text. The other one is line color and style. The line style could be straight line, dotted line, waved line or any customized style using Stroke. The line could be used as underline or strikethrough line.

The name of StyleRange comes from SWT's StyleRange. We borrowed some design idea from it. StyledLabel is actually very similar to SWT's StyledText. Saying that, the features of the two components are not exactly the same since the purpose of the two components are quite different.



Field Summary
final public static  intSTYLE_DOTTED
    
final public static  intSTYLE_DOUBLE_STRIKE_THROUGH
    
final public static  intSTYLE_STRIKE_THROUGH
    
final public static  intSTYLE_SUBSCRIPT
    
final public static  intSTYLE_SUPERSCRIPT
    
final public static  intSTYLE_UNDERLINED
    
final public static  intSTYLE_WAVED
    

Constructor Summary
public  StyleRange(int fontStyle)
     Creates a style range with a specified font style.
public  StyleRange(Color fontColor)
     Creates a style range with a specified font color.
public  StyleRange(int fontStyle, Color fontColor)
     Creates a style range with a specified font style and font color.
public  StyleRange(int fontStyle, int additionalStyle)
     Creates a style range with a specified font style and additional style.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange.
public  StyleRange(int fontStyle, int additionalStyle, float fontShrinkRatio)
     Creates a style range with a specified font style and additional style.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange.
public  StyleRange(int start, int length, int fontStyle)
     Creates a style range with a specified font style and a range.
public  StyleRange(int start, int length, int fontStyle, Color fontColor)
     Creates a style range with a specified font style, font color and a range.
public  StyleRange(int start, int length, Color fontColor)
     Creates a style range with a specified font color and a range.
public  StyleRange(int start, int length, int fontStyle, int additionalStyle)
     Creates a style range with a specified font style, additional style and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange.
public  StyleRange(int start, int length, int fontStyle, int additionalStyle, float fontShrinkRatio)
     Creates a style range with a specified font style, additional style and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange.
public  StyleRange(int fontStyle, Color fontColor, int additionalStyle, Color lineColor)
     Creates a style range with a specified font style, font color, and additional style.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange.
public  StyleRange(int fontStyle, Color fontColor, Color backgroundColor, int additionalStyle, Color lineColor)
     Creates a style range with a specified font style, font color, and additional style.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  backgroundColor - the background color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange.
public  StyleRange(int start, int length, int fontStyle, Color fontColor, int additionalStyle)
     Creates a style range with a specified font style, font color, additional style and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange.
public  StyleRange(int start, int length, int fontStyle, Color fontColor, Color backgroundColor, int additionalStyle)
     Creates a style range with a specified font style, font color, additional style and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  backgroundColor - the background color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange.
public  StyleRange(int fontStyle, Color fontColor, int additionalStyle, Color lineColor, Stroke lineStroke)
     Creates a style range with a specified font style, font color, additional style, and line color.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange.
public  StyleRange(int start, int length, int fontStyle, Color fontColor, int additionalStyle, Color lineColor)
     Creates a style range with a specified font style, font color, additional style, line color and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange.
public  StyleRange(int start, int length, int fontStyle, Color fontColor, Color backgroundColor, int additionalStyle, Color lineColor)
     Creates a style range with a specified font style, font color, additional style, line color and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  backgroundColor - the background color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange.
public  StyleRange(int start, int length, int fontStyle, Color fontColor, int additionalStyle, Color lineColor, Stroke lineStroke)
     Creates a style range with a specified font style, font color, additional style, line color, line stroke and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange.
public  StyleRange(int start, int length, int fontStyle, Color fontColor, Color backgroundColor, int additionalStyle, Color lineColor, Stroke lineStroke)
     Creates a style range with a specified font style, font color, additional style, line color, line stroke and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  backgroundColor - the background color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange.
public  StyleRange(int start, int length, int fontStyle, Color fontColor, int additionalStyle, Color lineColor, Stroke lineStroke, float fontShrinkRatio)
     Creates a style range with a specified font style, font color, additional style, line color, line stroke and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange.
public  StyleRange(int start, int length, int fontStyle, Color fontColor, Color backgroundColor, int additionalStyle, Color lineColor, Stroke lineStroke, float fontShrinkRatio)
     Creates a style range with a specified font style, font color, additional style, line color, line stroke and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  backgroundColor - the background color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange.

Method Summary
public  intgetAdditionalStyle()
     Gets the additional style.
public  ColorgetBackgroundColor()
     Gets the background color.
public  ColorgetFontColor()
     Gets the font color.
public  floatgetFontShrinkRatio()
     Gets the font shrink ratio for superscript and subscript.
public  intgetFontStyle()
     Gets the font style.
public  intgetLength()
     Gets the length of the range.
public  ColorgetLineColor()
     Gets the line color.
public  StrokegetLineStroke()
     Gets the line stroke.
public  intgetStart()
     Gets the start index of the range.
public  booleanisDotted()
     Checks if the line has dotted style.
public  booleanisDoublestrikethrough()
     Checks if the text has double strike through style.
public  booleanisStrikethrough()
     Checks if the text has strike through style.
public  booleanisSubscript()
     Checks if the text is subscript.
public  booleanisSuperscript()
     Checks if the text is superscript.
public  booleanisUnderlined()
     Checks if the text has underlined style.
public  booleanisWaved()
     Checks if the line has waved style.

Field Detail
STYLE_DOTTED
final public static int STYLE_DOTTED(Code)



STYLE_DOUBLE_STRIKE_THROUGH
final public static int STYLE_DOUBLE_STRIKE_THROUGH(Code)



STYLE_STRIKE_THROUGH
final public static int STYLE_STRIKE_THROUGH(Code)



STYLE_SUBSCRIPT
final public static int STYLE_SUBSCRIPT(Code)



STYLE_SUPERSCRIPT
final public static int STYLE_SUPERSCRIPT(Code)



STYLE_UNDERLINED
final public static int STYLE_UNDERLINED(Code)



STYLE_WAVED
final public static int STYLE_WAVED(Code)




Constructor Detail
StyleRange
public StyleRange(int fontStyle)(Code)
Creates a style range with a specified font style.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.



StyleRange
public StyleRange(Color fontColor)(Code)
Creates a style range with a specified font color.
Parameters:
  fontColor - the color of the text



StyleRange
public StyleRange(int fontStyle, Color fontColor)(Code)
Creates a style range with a specified font style and font color.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text



StyleRange
public StyleRange(int fontStyle, int additionalStyle)(Code)
Creates a style range with a specified font style and additional style.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange. The names begin withSTYLE_. You can also use any | to concat two or more styles as long as it makes sense.



StyleRange
public StyleRange(int fontStyle, int additionalStyle, float fontShrinkRatio)(Code)
Creates a style range with a specified font style and additional style.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange. The names begin withSTYLE_. You can also use any | to concat two or more styles as long as it makes sense.
Parameters:
  fontShrinkRatio - the ratio that regular font size divides by subscript or superscript font size.



StyleRange
public StyleRange(int start, int length, int fontStyle)(Code)
Creates a style range with a specified font style and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.



StyleRange
public StyleRange(int start, int length, int fontStyle, Color fontColor)(Code)
Creates a style range with a specified font style, font color and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.



StyleRange
public StyleRange(int start, int length, Color fontColor)(Code)
Creates a style range with a specified font color and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontColor - the color of the text.



StyleRange
public StyleRange(int start, int length, int fontStyle, int additionalStyle)(Code)
Creates a style range with a specified font style, additional style and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange. The names begin withSTYLE_. You can also use any | to concat two or more styles as long as it makes sense.



StyleRange
public StyleRange(int start, int length, int fontStyle, int additionalStyle, float fontShrinkRatio)(Code)
Creates a style range with a specified font style, additional style and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange. The names begin withSTYLE_. You can also use any | to concat two or more styles as long as it makes sense.
Parameters:
  fontShrinkRatio - the ratio that regular font size divides by subscript or superscript font size.



StyleRange
public StyleRange(int fontStyle, Color fontColor, int additionalStyle, Color lineColor)(Code)
Creates a style range with a specified font style, font color, and additional style.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange. The names begin withSTYLE_. You can also use any | to concat two or more styles as long as it makes sense.



StyleRange
public StyleRange(int fontStyle, Color fontColor, Color backgroundColor, int additionalStyle, Color lineColor)(Code)
Creates a style range with a specified font style, font color, and additional style.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  backgroundColor - the background color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange. The names begin withSTYLE_. You can also use any | to concat two or more styles as long as it makes sense.



StyleRange
public StyleRange(int start, int length, int fontStyle, Color fontColor, int additionalStyle)(Code)
Creates a style range with a specified font style, font color, additional style and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange. The names begin withSTYLE_. You can also use any | to concat two or more styles as long as it makes sense.



StyleRange
public StyleRange(int start, int length, int fontStyle, Color fontColor, Color backgroundColor, int additionalStyle)(Code)
Creates a style range with a specified font style, font color, additional style and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  backgroundColor - the background color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange. The names begin withSTYLE_. You can also use any | to concat two or more styles as long as it makes sense.



StyleRange
public StyleRange(int fontStyle, Color fontColor, int additionalStyle, Color lineColor, Stroke lineStroke)(Code)
Creates a style range with a specified font style, font color, additional style, and line color.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange. The names begin withSTYLE_. You can also use any | to concat two or more styles as long as it makes sense.
Parameters:
  lineColor - the color of the line.



StyleRange
public StyleRange(int start, int length, int fontStyle, Color fontColor, int additionalStyle, Color lineColor)(Code)
Creates a style range with a specified font style, font color, additional style, line color and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange. The names begin withSTYLE_. You can also use any | to concat two or more styles as long as it makes sense.
Parameters:
  lineColor - the color of the line.



StyleRange
public StyleRange(int start, int length, int fontStyle, Color fontColor, Color backgroundColor, int additionalStyle, Color lineColor)(Code)
Creates a style range with a specified font style, font color, additional style, line color and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  backgroundColor - the background color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange. The names begin withSTYLE_. You can also use any | to concat two or more styles as long as it makes sense.
Parameters:
  lineColor - the color of the line.



StyleRange
public StyleRange(int start, int length, int fontStyle, Color fontColor, int additionalStyle, Color lineColor, Stroke lineStroke)(Code)
Creates a style range with a specified font style, font color, additional style, line color, line stroke and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange. The names begin withSTYLE_. You can also use any | to concat two or more styles as long as it makes sense.
Parameters:
  lineColor - the color of the line.
Parameters:
  lineStroke - the stroke of the line.



StyleRange
public StyleRange(int start, int length, int fontStyle, Color fontColor, Color backgroundColor, int additionalStyle, Color lineColor, Stroke lineStroke)(Code)
Creates a style range with a specified font style, font color, additional style, line color, line stroke and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  backgroundColor - the background color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange. The names begin withSTYLE_. You can also use any | to concat two or more styles as long as it makes sense.
Parameters:
  lineColor - the color of the line.
Parameters:
  lineStroke - the stroke of the line.



StyleRange
public StyleRange(int start, int length, int fontStyle, Color fontColor, int additionalStyle, Color lineColor, Stroke lineStroke, float fontShrinkRatio)(Code)
Creates a style range with a specified font style, font color, additional style, line color, line stroke and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange. The names begin withSTYLE_. You can also use any | to concat two or more styles as long as it makes sense.
Parameters:
  lineColor - the color of the line.
Parameters:
  lineStroke - the stroke of the line.
Parameters:
  fontShrinkRatio - the ratio that regular font size divides by subscript or superscript font size.



StyleRange
public StyleRange(int start, int length, int fontStyle, Color fontColor, Color backgroundColor, int additionalStyle, Color lineColor, Stroke lineStroke, float fontShrinkRatio)(Code)
Creates a style range with a specified font style, font color, additional style, line color, line stroke and a range.
Parameters:
  start - the start index of the range in a string
Parameters:
  length - the length of the range.
Parameters:
  fontStyle - Valid values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC.
Parameters:
  fontColor - the color of the text.
Parameters:
  backgroundColor - the background color of the text.
Parameters:
  additionalStyle - Valid additional styles are defined as constants in StyleRange. The names begin withSTYLE_. You can also use bitwise OR "|" to concat any two or more styles as long as it makes sense.
Parameters:
  lineColor - the color of the line.
Parameters:
  lineStroke - the stroke of the line.
Parameters:
  fontShrinkRatio - the ratio that regular font size divides by subscript or superscript font size.




Method Detail
getAdditionalStyle
public int getAdditionalStyle()(Code)
Gets the additional style. Possible additional styles are defined as constants in StyleRange . The names begin with STYLE_. The value could also be two or more styles concated by | as long as it makes sense. It could be more convenient to use methods StyleRange.isStrikethrough() , StyleRange.isDoublestrikethrough() , StyleRange.isDotted() , StyleRange.isWaved() , StyleRange.isUnderlined() , StyleRange.isSubscript() , StyleRange.isSuperscript() to see what's the additional style. the additional style.



getBackgroundColor
public Color getBackgroundColor()(Code)
Gets the background color. the background color.



getFontColor
public Color getFontColor()(Code)
Gets the font color. the font color.



getFontShrinkRatio
public float getFontShrinkRatio()(Code)
Gets the font shrink ratio for superscript and subscript. the shrink ratio.



getFontStyle
public int getFontStyle()(Code)
Gets the font style. Possible values are Font.PLAIN, Font.ITALIC, Font.BOLD or Font.BOLD | Font.ITALIC. the font style.



getLength
public int getLength()(Code)
Gets the length of the range. the length of the range.



getLineColor
public Color getLineColor()(Code)
Gets the line color. the line color.



getLineStroke
public Stroke getLineStroke()(Code)
Gets the line stroke. the line stroke.



getStart
public int getStart()(Code)
Gets the start index of the range. the start index of the range.



isDotted
public boolean isDotted()(Code)
Checks if the line has dotted style. true if the line has dotted style.



isDoublestrikethrough
public boolean isDoublestrikethrough()(Code)
Checks if the text has double strike through style. true if the text has double strike through style.



isStrikethrough
public boolean isStrikethrough()(Code)
Checks if the text has strike through style. true if the text has strike through style.



isSubscript
public boolean isSubscript()(Code)
Checks if the text is subscript. true if the text is subscript.



isSuperscript
public boolean isSuperscript()(Code)
Checks if the text is superscript. true if the text is superscript.



isUnderlined
public boolean isUnderlined()(Code)
Checks if the text has underlined style. true if the text has underlined style.



isWaved
public boolean isWaved()(Code)
Checks if the line has waved style. true if the line has waved style.



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.