public final class CharacterRun extends Range implements Duplicatable, CharacterRun
Modifier and Type | Field and Description |
---|---|
protected SprmBuffer |
_chpx |
protected short |
_istd |
protected CharacterProperties |
_props |
static short |
SPRM_BRC |
static short |
SPRM_CHARSCALE |
static short |
SPRM_CPG |
static short |
SPRM_DISPFLDRMARK |
static short |
SPRM_DTTMRMARK |
static short |
SPRM_DTTMRMARKDEL |
static short |
SPRM_DXASPACE |
static short |
SPRM_FBOLD |
static short |
SPRM_FCAPS |
static short |
SPRM_FDATA |
static short |
SPRM_FDSTRIKE |
static short |
SPRM_FELID |
static short |
SPRM_FEMBOSS |
static short |
SPRM_FFLDVANISH |
static short |
SPRM_FIMPRINT |
static short |
SPRM_FITALIC |
static short |
SPRM_FOBJ |
static short |
SPRM_FOLE2 |
static short |
SPRM_FOUTLINE |
static short |
SPRM_FRMARK |
static short |
SPRM_FRMARKDEL |
static short |
SPRM_FSHADOW |
static short |
SPRM_FSMALLCAPS |
static short |
SPRM_FSPEC |
static short |
SPRM_FSTRIKE |
static short |
SPRM_FVANISH |
static short |
SPRM_HIGHLIGHT |
static short |
SPRM_HPS |
static short |
SPRM_HPSKERN |
static short |
SPRM_HPSPOS |
static short |
SPRM_IBSTRMARK |
static short |
SPRM_IBSTRMARKDEL |
static short |
SPRM_ICO |
static short |
SPRM_IDCTHINT |
static short |
SPRM_IDSIRMARKDEL |
static short |
SPRM_ISS |
static short |
SPRM_ISTD |
static short |
SPRM_KUL |
static short |
SPRM_LID |
static short |
SPRM_NONFELID |
static short |
SPRM_OBJLOCATION |
static short |
SPRM_PICLOCATION |
static short |
SPRM_PROPRMARK |
static short |
SPRM_RGFTCASCII |
static short |
SPRM_RGFTCFAREAST |
static short |
SPRM_RGFTCNOTFAREAST |
static short |
SPRM_SFXTEXT |
static short |
SPRM_SHD |
static short |
SPRM_SYMBOL |
static short |
SPRM_YSRI |
_characters, _charEnd, _charRangeFound, _charStart, _doc, _end, _paragraphs, _parEnd, _parRangeFound, _parStart, _sectionEnd, _sections, _sectionStart, _start, _text, TYPE_CHARACTER, TYPE_LISTENTRY, TYPE_PARAGRAPH, TYPE_SECTION, TYPE_TABLE, TYPE_TEXT, TYPE_UNDEFINED
Modifier and Type | Method and Description |
---|---|
CharacterRun |
copy() |
BorderCode |
getBorder() |
int |
getCharacterSpacing() |
int |
getColor() |
java.lang.Integer |
getDropDownListDefaultItemIndex() |
java.lang.String[] |
getDropDownListValues() |
java.lang.String |
getFontName()
Gets the fonts which shall be used to display the text contents of this run.
(获取用于显示本次运行的文本内容的字体。)
|
int |
getFontSize() |
java.lang.Double |
getFontSizeAsDouble() |
byte |
getHighlightedColor() |
int |
getIco24()
Get the ico24 field for the CHP record.
(获取 CHP 记录的 ico24 字段。)
|
int |
getKerning() |
int |
getLanguageCode() |
int |
getObjOffset() |
int |
getPicOffset() |
short |
getStyleIndex()
Returns the index of the base style which applies to this Run.
(返回适用于此 Run 的基本样式的索引。)
|
short |
getSubSuperScriptIndex() |
char |
getSymbolCharacter()
Returns the symbol character, if this is a symbol character run.
(返回符号字符,如果这是一个符号字符运行。)
|
Ffn |
getSymbolFont()
Returns the symbol font, if this is a symbol character run.
(如果这是一个符号字符运行,则返回符号字体。)
|
int |
getUnderlineCode() |
int |
getVerticalOffset() |
boolean |
isBold() |
boolean |
isCapitalized() |
boolean |
isData()
Does the picture offset represent picture or binary data? If it's set, then the picture offset refers to a NilPICFAndBinData structure, otherwise to a PICFAndOfficeArtData
(图片偏移量代表图片还是二进制数据?如果已设置,则图片偏移量指的是 NilPICFAndBinData 结构,否则指的是 PICFAndOfficeArtData)
|
boolean |
isDoubleStrikeThrough() |
boolean |
isEmbossed() |
boolean |
isFldVanished() |
boolean |
isHighlighted() |
boolean |
isImprinted() |
boolean |
isItalic() |
boolean |
isMarkedDeleted() |
boolean |
isMarkedInserted() |
boolean |
isObj() |
boolean |
isOle2() |
boolean |
isOutlined() |
boolean |
isShadowed() |
boolean |
isSmallCaps() |
boolean |
isSpecialCharacter() |
boolean |
isStrikeThrough() |
boolean |
isSymbol()
Returns true, if the CharacterRun is a special character run containing a symbol, otherwise false.
(如果 CharacterRun 是包含符号的特殊字符运行,则返回 true,否则返回 false。)
|
boolean |
isVanished() |
void |
markDeleted(boolean mark) |
void |
markInserted(boolean mark) |
void |
setBold(boolean bold) |
void |
setCapitalized(boolean caps) |
void |
setCharacterSpacing(int twips) |
void |
setColor(int color) |
void |
setData(boolean data) |
void |
setDoubleStrikethrough(boolean dstrike) |
void |
setEmbossed(boolean emboss) |
void |
setFldVanish(boolean fldVanish) |
void |
setFontSize(double halfPoints) |
void |
setFontSize(int halfPoints) |
void |
setFtcAscii(int ftcAscii) |
void |
setFtcFE(int ftcFE) |
void |
setFtcOther(int ftcOther) |
void |
setHighlighted(byte color) |
void |
setIco24(int colour24)
Set the ico24 field for the CHP record.
(设置 CHP 记录的 ico24 字段。)
|
void |
setImprinted(boolean imprint) |
void |
setItalic(boolean italic) |
void |
setKerning(int kern) |
void |
setObj(boolean obj) |
void |
setObjOffset(int obj) |
void |
setOle2(boolean ole) |
void |
setOutline(boolean outlined) |
void |
setPicOffset(int offset) |
void |
setShadow(boolean shadow) |
void |
setSmallCaps(boolean smallCaps) |
void |
setSpecialCharacter(boolean spec) |
void |
setStrikeThrough(boolean strike) |
void |
setSubSuperScriptIndex(short iss) |
void |
setUnderlineCode(int kul) |
void |
setVanished(boolean vanish) |
void |
setVerticalOffset(int hpsPos) |
void |
strikeThrough(boolean strike) |
java.lang.String |
toString() |
int |
type()
Here for runtime type determination using a switch statement convenient.
(这里对于运行时类型的判断使用 switch 语句很方便。)
|
adjustFIB, delete, getCharacterRun, getDocument, getEndOffset, getParagraph, getSection, getStartOffset, getTable, initAll, insertAfter, insertBefore, insertTableBefore, numCharacterRuns, numParagraphs, numSections, replaceText, replaceText, replaceText, reset, sanityCheck, stripFields, text
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
text
public static final short SPRM_FRMARKDEL
public static final short SPRM_FRMARK
public static final short SPRM_FFLDVANISH
public static final short SPRM_PICLOCATION
public static final short SPRM_IBSTRMARK
public static final short SPRM_DTTMRMARK
public static final short SPRM_FDATA
public static final short SPRM_SYMBOL
public static final short SPRM_FOLE2
public static final short SPRM_HIGHLIGHT
public static final short SPRM_OBJLOCATION
public static final short SPRM_ISTD
public static final short SPRM_FBOLD
public static final short SPRM_FITALIC
public static final short SPRM_FSTRIKE
public static final short SPRM_FOUTLINE
public static final short SPRM_FSHADOW
public static final short SPRM_FSMALLCAPS
public static final short SPRM_FCAPS
public static final short SPRM_FVANISH
public static final short SPRM_KUL
public static final short SPRM_DXASPACE
public static final short SPRM_LID
public static final short SPRM_ICO
public static final short SPRM_HPS
public static final short SPRM_HPSPOS
public static final short SPRM_ISS
public static final short SPRM_HPSKERN
public static final short SPRM_YSRI
public static final short SPRM_RGFTCASCII
public static final short SPRM_RGFTCFAREAST
public static final short SPRM_RGFTCNOTFAREAST
public static final short SPRM_CHARSCALE
public static final short SPRM_FDSTRIKE
public static final short SPRM_FIMPRINT
public static final short SPRM_FSPEC
public static final short SPRM_FOBJ
public static final short SPRM_PROPRMARK
public static final short SPRM_FEMBOSS
public static final short SPRM_SFXTEXT
public static final short SPRM_DISPFLDRMARK
public static final short SPRM_IBSTRMARKDEL
public static final short SPRM_DTTMRMARKDEL
public static final short SPRM_BRC
public static final short SPRM_SHD
public static final short SPRM_IDSIRMARKDEL
public static final short SPRM_CPG
public static final short SPRM_NONFELID
public static final short SPRM_FELID
public static final short SPRM_IDCTHINT
protected short _istd
protected SprmBuffer _chpx
protected CharacterProperties _props
public int type()
public boolean isMarkedDeleted()
public void markDeleted(boolean mark)
public boolean isBold()
isBold
in interface
CharacterRun
(接口 CharacterRun 中的 isBold)
public void setBold(boolean bold)
setBold
in interface
CharacterRun
(接口 CharacterRun 中的 setBold)
public boolean isItalic()
isItalic
in interface
CharacterRun
(接口 CharacterRun 中的 isItalic)
public void setItalic(boolean italic)
setItalic
in interface
CharacterRun
(接口 CharacterRun 中的 setItalic)
public boolean isOutlined()
public void setOutline(boolean outlined)
public boolean isFldVanished()
public void setFldVanish(boolean fldVanish)
public boolean isSmallCaps()
isSmallCaps
in interface
CharacterRun
(接口 CharacterRun 中的 isSmallCaps)
public void setSmallCaps(boolean smallCaps)
setSmallCaps
in interface
CharacterRun
(接口 CharacterRun 中的 setSmallCaps)
public boolean isCapitalized()
isCapitalized
in interface
CharacterRun
(接口 CharacterRun 中的 isCapitalized)
public void setCapitalized(boolean caps)
setCapitalized
in interface
CharacterRun
(接口 CharacterRun 中的 setCapitalized)
public boolean isVanished()
public void setVanished(boolean vanish)
public boolean isMarkedInserted()
public void markInserted(boolean mark)
public boolean isStrikeThrough()
isStrikeThrough
in interface
CharacterRun
(接口 CharacterRun 中的 isStrikeThrough)
public void setStrikeThrough(boolean strike)
setStrikeThrough
in interface
CharacterRun
(接口 CharacterRun 中的 setStrikeThrough)
public void strikeThrough(boolean strike)
public boolean isShadowed()
isShadowed
in interface
CharacterRun
(接口 CharacterRun 中的 isShadowed)
public void setShadow(boolean shadow)
setShadow
in interface
CharacterRun
(接口 CharacterRun 中的 setShadow)
public boolean isEmbossed()
isEmbossed
in interface
CharacterRun
(接口 CharacterRun 中的 isEmbossed)
public void setEmbossed(boolean emboss)
setEmbossed
in interface
CharacterRun
(界面 CharacterRun 中的 setEmbossed)
public boolean isImprinted()
isImprinted
in interface
CharacterRun
(isImprinted 在接口 CharacterRun 中)
public void setImprinted(boolean imprint)
setImprinted
in interface
CharacterRun
(接口 CharacterRun 中的 setImprinted)
public boolean isDoubleStrikeThrough()
isDoubleStrikeThrough
in interface
CharacterRun
(接口 CharacterRun 中的 isDoubleStrikeThrough)
public void setDoubleStrikethrough(boolean dstrike)
setDoubleStrikethrough
in interface
CharacterRun
(接口 CharacterRun 中的 setDoubleStrikethrough)
public void setFtcAscii(int ftcAscii)
public void setFtcFE(int ftcFE)
public void setFtcOther(int ftcOther)
public int getFontSize()
getFontSize
in interface
CharacterRun
(接口 CharacterRun 中的 getFontSize)
public java.lang.Double getFontSizeAsDouble()
getFontSizeAsDouble
in interface
CharacterRun
(接口 CharacterRun 中的 getFontSizeAsDouble)
public void setFontSize(int halfPoints)
setFontSize
in interface
CharacterRun
(接口 CharacterRun 中的 setFontSize)
public void setFontSize(double halfPoints)
setFontSize
in interface
CharacterRun
(接口 CharacterRun 中的 setFontSize)
public int getCharacterSpacing()
getCharacterSpacing
in interface
CharacterRun
(接口 CharacterRun 中的 getCharacterSpacing)
public void setCharacterSpacing(int twips)
setCharacterSpacing
in interface
CharacterRun
(接口 CharacterRun 中的 setCharacterSpacing)
public short getSubSuperScriptIndex()
public void setSubSuperScriptIndex(short iss)
public int getUnderlineCode()
public void setUnderlineCode(int kul)
public int getColor()
public void setColor(int color)
public int getVerticalOffset()
public void setVerticalOffset(int hpsPos)
public int getKerning()
getKerning
in interface
CharacterRun
(接口 CharacterRun 中的 getKerning)
public void setKerning(int kern)
setKerning
in interface
CharacterRun
(接口 CharacterRun 中的 setKerning)
public boolean isHighlighted()
isHighlighted
in interface
CharacterRun
(接口 CharacterRun 中的 isHighlighted)
public byte getHighlightedColor()
public void setHighlighted(byte color)
public java.lang.String getFontName()
CharacterRun
getFontName
in interface
CharacterRun
(接口 CharacterRun 中的 getFontName)
public boolean isSpecialCharacter()
public void setSpecialCharacter(boolean spec)
public boolean isObj()
public void setObj(boolean obj)
public int getPicOffset()
public void setPicOffset(int offset)
public boolean isData()
public void setData(boolean data)
public boolean isOle2()
public void setOle2(boolean ole)
public int getObjOffset()
public void setObjOffset(int obj)
public int getIco24()
public void setIco24(int colour24)
public CharacterRun copy()
copy
in interface
Duplicatable
(复制到界面 Duplicatable)
public boolean isSymbol()
In case of a symbol, the Range.text()
method always returns a single character 0x0028, but word actually stores the character in a different field. Use getSymbolCharacter()
to get that character and getSymbolFont()
to determine its font.
public char getSymbolCharacter()
java.lang.IllegalStateException
- If this is not a symbol character run: call
isSymbol()
first.
(java.lang.IllegalStateException - 如果这不是符号字符运行:首先调用 isSymbol()。)
isSymbol()
public Ffn getSymbolFont()
java.lang.IllegalStateException
- If this is not a symbol character run: call
isSymbol()
first.
(java.lang.IllegalStateException - 如果这不是符号字符运行:首先调用 isSymbol()。)
isSymbol()
public BorderCode getBorder()
public int getLanguageCode()
public short getStyleIndex()
Returns the index of the base style which applies to this Run. Details of the style can be looked up from the StyleSheet
, via StyleSheet.getStyleDescription(int)
.
Note that runs typically override some of the style properties from the base, so normally style information should be fetched directly from the CharacterRun
itself.
public java.lang.String[] getDropDownListValues()
public java.lang.Integer getDropDownListDefaultItemIndex()
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.