public class RichTextStyle
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
RichTextStyle implements the style for the rich text
object. The rich text style has following attributes:
CHAR_WRAP, WORD_WRAP and NO_WRAP.
JAVA_LINE_SEPARATOR,
JAVA_LINE_SEPARATOR_WITH_BREAK and
LIST_SEPARATOR.
ParagraphStyle.HARD_TAB_LENGTH.
The rich text style is immutable.
RichText,
TextLayout,
TextScanner,
直列化された形式| 修飾子とタイプ | フィールドと説明 |
|---|---|
static int |
CHAR_WRAP
The constant for the character line wrapping style.
|
static RichTextStyle |
DEFAULT_CODE_STYLE
The default rich text style constant for coding.
|
static RichTextStyle |
DEFAULT_DOCUMENT_STYLE
The default rich text style constant for documenting.
|
static RichTextStyle |
DEFAULT_LIST_STYLE
The default rich text style constant for documenting.
|
static int |
JAVA_LINE_SEPARATOR
The constant for the java line end style.
|
static int |
JAVA_LINE_SEPARATOR_WITH_BREAK
The constant for the java line end style with line break.
|
protected int |
lineEnd
The line end style.
|
protected int |
lineWrap
The line wrapping style.
|
static int |
LIST_SEPARATOR
The constant for the list line end style.
|
static int |
NO_WRAP
The constant for the no line wrapping style.
|
protected ParagraphStyle |
paragraphStyle
The default paragraph style for the rich text.
|
protected int |
tabWidth
The default tab width.
|
protected TextStyle |
textStyle
The default text style for the rich text.
|
protected boolean |
variableLineHeight
True if the line height of the rich text is variable (True if
multiple paragraph styles are allowed).
|
static int |
WORD_WRAP
The constant for the word line wrapping style.
|
| コンストラクタと説明 |
|---|
RichTextStyle(int lineWrap)
Constructs a rich text style with the specified line wrapping style.
|
RichTextStyle(int lineWrap,
boolean variableLineHeight)
Constructs a rich text style with the specified line wrapping style
and flag determining the line height is variable.
|
RichTextStyle(int lineWrap,
int lineEnd,
boolean variableLineHeight)
Constructs a rich text style with the specified line wrapping style,
line end style and flag determining the line height is variable.
|
RichTextStyle(int lineWrap,
int lineEnd,
boolean variableLineHeight,
TextStyle textStyle,
ParagraphStyle paragraphStyle)
Constructs a rich text style with the specified line wrapping style,
line end style, flag determining the line height is variable,
default text style and default paragraph style.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
java.lang.Object |
clone()
Returns a clone of this rich text style.
|
RichTextStyle |
deriveStyle(int lineWrap,
int lineEnd)
Creates a new style by replicating this style with a new line
wrapping style and line end style associated with it.
|
RichTextStyle |
deriveStyle(ParagraphStyle paragraphStyle)
Creates a new style by replicating this style with a new paragraph
style object associated with it.
|
RichTextStyle |
deriveStyle(TextStyle textStyle)
Creates a new style by replicating this style with a new text
style object associated with it.
|
boolean |
equals(java.lang.Object anObject)
Compares two objects for equality.
|
int |
getLineEnd()
Returns the line end style.
|
char |
getLineEndChar()
Returns the line end character.
|
int |
getLineWrap()
Returns the line wrapping style.
|
ParagraphStyle |
getParagraphStyle()
Returns the default paragraph style for the rich text.
|
int |
getTabWidth()
Returns the default tab width.
|
TextStyle |
getTextStyle()
Returns the default text style for the rich text.
|
boolean |
handleBreak()
Checks if the line break is handled.
|
int |
hashCode()
Returns a hashcode of this rich text style.
|
boolean |
isCharWrap()
Checks if the line wrapping style is the character line wrapping style.
|
boolean |
isJavaLineSeparator()
Checks if the line end style is the java line end style.
|
boolean |
isJavaLineSeparatorWithBreak()
Checks if the line end style is the java line end style with line break.
|
boolean |
isListSeparator()
Checks if the line end style is the list line end style.
|
boolean |
isNoWrap()
Checks if the line wrapping style is the no line wrapping style.
|
boolean |
isVariableLineHeight()
Checks if the line height of the rich text is variable.
|
boolean |
isWordWrap()
Checks if the line wrapping style is the word line wrapping style.
|
boolean |
multipleParagraphStylesAllowed()
Checks if multiple paragraph styles are allowed.
|
protected void |
setLineEnd(int lineEnd)
Sets the line end style.
|
protected void |
setLineWrap(int lineWrap)
Sets the line wrapping style.
|
java.lang.String |
toString()
Returns the string representation of this rich text style.
|
protected int lineWrap
protected int lineEnd
protected boolean variableLineHeight
protected TextStyle textStyle
protected ParagraphStyle paragraphStyle
protected int tabWidth
public static final int CHAR_WRAP
The line is wrapped at the character boundary. This style is suited for coding.
public static final int WORD_WRAP
The line is wrapped at the word boundary. This style is suited for documenting.
public static final int NO_WRAP
The line is wrapped only at the line separator.
Text.LINE_SEPARATOR_CHAR,
定数フィールド値public static final int JAVA_LINE_SEPARATOR
That is the paragraph is separated by the
Text.LINE_SEPARATOR_CHAR.
public static final int JAVA_LINE_SEPARATOR_WITH_BREAK
That is the paragraph is separated by the
Text.LINE_SEPARATOR_CHAR and the line is
broken by the Text.LINE_BREAK_CHAR.
public static final int LIST_SEPARATOR
That is the paragraph (list item) is separated by the
Text.LIST_SEPARATOR_CHAR.
public static final RichTextStyle DEFAULT_CODE_STYLE
public static final RichTextStyle DEFAULT_DOCUMENT_STYLE
public static final RichTextStyle DEFAULT_LIST_STYLE
public RichTextStyle(int lineWrap)
lineWrap - the line wrapping style.public RichTextStyle(int lineWrap,
boolean variableLineHeight)
lineWrap - the line wrapping style.variableLineHeight - the flag determining the line height is
variable.public RichTextStyle(int lineWrap,
int lineEnd,
boolean variableLineHeight)
lineWrap - the line wrapping style.lineEnd - the line end style.variableLineHeight - the flag determining the line height is
variable.public RichTextStyle(int lineWrap,
int lineEnd,
boolean variableLineHeight,
TextStyle textStyle,
ParagraphStyle paragraphStyle)
lineWrap - the line wrapping style.lineEnd - the line end style.variableLineHeight - the flag determining the line height is
variable.textStyle - the default text style.paragraphStyle - the default paragraph style.public final int getLineWrap()
public final int getLineEnd()
public final char getLineEndChar()
public final boolean isVariableLineHeight()
public final boolean multipleParagraphStylesAllowed()
public final TextStyle getTextStyle()
public final ParagraphStyle getParagraphStyle()
public int getTabWidth()
public final boolean isCharWrap()
getLineWrap(),
CHAR_WRAPpublic final boolean isWordWrap()
getLineWrap(),
WORD_WRAPpublic final boolean isNoWrap()
getLineWrap(),
NO_WRAPpublic final boolean isJavaLineSeparator()
getLineEnd(),
JAVA_LINE_SEPARATORpublic final boolean isJavaLineSeparatorWithBreak()
public final boolean isListSeparator()
getLineEnd(),
LIST_SEPARATORpublic final boolean handleBreak()
public RichTextStyle deriveStyle(int lineWrap, int lineEnd)
lineWrap - the line wrapping style for the new style.lineEnd - the line end style for the new style.public RichTextStyle deriveStyle(TextStyle textStyle)
textStyle - the text style object for the new style.public RichTextStyle deriveStyle(ParagraphStyle paragraphStyle)
paragraphStyle - the paragraph style object for the new style.public int hashCode()
hashCode クラス内 java.lang.Objectpublic boolean equals(java.lang.Object anObject)
equals クラス内 java.lang.Objectpublic java.lang.Object clone()
clone クラス内 java.lang.Objectpublic java.lang.String toString()
toString クラス内 java.lang.Objectprotected void setLineWrap(int lineWrap)
protected void setLineEnd(int lineEnd)