public class CPDFEditTextArea extends CPDFEditArea
| Modifier and Type | Class and Description |
|---|---|
static class |
CPDFEditTextArea.Action |
static class |
CPDFEditTextArea.PDFEditAlignType |
static class |
CPDFEditTextArea.PDFEditTextRenderingMode |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
FontCourier |
static java.lang.String |
FontHelvtics |
static java.lang.String |
FontTimesRoman |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addStrikethrough(CPDFEditCharPlace begin,
CPDFEditCharPlace end) |
boolean |
addUnderline(CPDFEditCharPlace begin,
CPDFEditCharPlace end) |
boolean |
clearCharsFontBold(CPDFEditCharPlace begin,
CPDFEditCharPlace end) |
boolean |
clearCharsFontItalic(CPDFEditCharPlace begin,
CPDFEditCharPlace end)
Clear text font italic
|
CPDFEditCharItem |
deleteText(CPDFEditCharPlace begin,
CPDFEditCharPlace end)
Delete text
|
CPDFEditTextArea.PDFEditAlignType |
getAlign(CPDFEditCharPlace end)
Get the alignment of the last character within a text range or of a single character.
|
CPDFEditTextArea.PDFEditAlignType |
getAlignByRange(CPDFEditCharPlace begin,
CPDFEditCharPlace end)
Get the alignment within a text range where multiple alignments exist, return NULL.
|
java.lang.String |
getAllText()
Get all text in the text box
|
CPDFEditCharItem |
getBeginCharPlace()
Get begin char place of the text box
|
android.graphics.RectF[] |
getCharsRangeAtPos(CPDFEditCharPlace begin,
CPDFEditCharPlace end)
Get char range of text
|
int |
getColor(CPDFEditCharPlace end)
Get the text color of the last character within a text range or of a single character, where the color is returned in the format of 0x00000000-0xFFFFFFFF.
|
int |
getColorByRange(CPDFEditCharPlace begin,
CPDFEditCharPlace end)
Get the text color within a text range, where the color is returned in the format of 0x00000000-0xFFFFFFFF.
|
java.util.List<CPDFEditSelection> |
getCurrentAreaSelections()
Get the selected text range within the current text box。
|
java.util.List<CPDFEditSelection> |
getCurrentAreaSelections(CPDFEditCharPlace begin,
CPDFEditCharPlace end)
Get the selected text range within the current text box by the starting position.
|
CPDFEditCharItem |
getEditCharItemFromPlace(CPDFEditCharPlace place)
Get current char item
|
CPDFEditCharItem |
getEndCharPlace()
Get end char place of the text box
|
java.lang.String |
getFontName(CPDFEditCharPlace end)
Get the font name of the last character within a text range or of a single character.
|
java.lang.String |
getFontNameByRange(CPDFEditCharPlace begin,
CPDFEditCharPlace end)
Get the font name within the text range, return empty string if there are different fonts present in the text.
|
float |
getFontSize(CPDFEditCharPlace end)
Get the font size of the last character within a text range or of a single character.
|
float |
getFontSizeByRange(CPDFEditCharPlace begin,
CPDFEditCharPlace end)
Get the font size of the text within a text range.
|
android.graphics.RectF |
getFrame(boolean forceUpdate)
Get the rect occupied by the text box
|
CPDFEditCharItem |
getSectionBeginCharPlace(int section_index)
Get the begin place of the section.
|
int |
getSectionCount()
Get section number of the text area.
|
CPDFEditCharItem |
getSectionEndCharPlace(int section_index)
Get the end place of the section.
|
CPDFEditSelection |
getSelectionForWordPos(float x,
float y)
Get selection at positoin
|
java.lang.String |
getText(CPDFEditCharPlace begin,
CPDFEditCharPlace end)
Get text in the range
|
float |
getTransparancyByRange(CPDFEditCharPlace begin,
CPDFEditCharPlace end)
Get the text transparancy within a text range.
|
float |
getTransparency(CPDFEditCharPlace end)
Get the text transparancy of the last character within a text range or of a single character.
|
CPDFEditCharItem |
insertText(CPDFEditCharPlace place,
java.lang.String text)
Insert text to text box
|
CPDFEditCharItem |
insertTextRange(CPDFEditCharPlace begin,
CPDFEditCharPlace end,
java.lang.String text)
Use other text to replace the text in range.
|
boolean |
isBold(CPDFEditCharPlace end)
Determine whether the last character within a specified text range or a single character has bold formatting.
|
boolean |
isBoldByRange(CPDFEditCharPlace begin,
CPDFEditCharPlace end)
Determine whether all text within a specified text range has bold formatting.
|
boolean |
isEmptyArea()
Is the text box object empty?
|
boolean |
isItalic(CPDFEditCharPlace end)
Determine whether the last character within a specified text range or a single character has italic formatting.
|
boolean |
isItalicByRange(CPDFEditCharPlace begin,
CPDFEditCharPlace end)
Determine whether all text within a specified text range has italic formatting.
|
boolean |
isUnderlineByRange(CPDFEditCharPlace begin,
CPDFEditCharPlace end) |
boolean |
moveBackward()
move down one level
|
boolean |
moveForward()
move one level up
|
boolean |
moveToTheBottom()
bottom
|
boolean |
moveToTheTop()
pin to top
|
CPDFEditCharItem |
onAction(CPDFEditCharPlace place,
CPDFEditTextArea.Action action)
Response action operation
|
CPDFEditCharRange |
refreshRange(CPDFEditCharPlace begin,
CPDFEditCharPlace end)
refresh char range of text
|
void |
release()
Release text box
|
boolean |
removeStrikethrough(CPDFEditCharPlace begin,
CPDFEditCharPlace end) |
boolean |
removeUnderline(CPDFEditCharPlace begin,
CPDFEditCharPlace end) |
CPDFEditCharRange |
replaceText(CPDFEditCharRange charRange,
java.lang.String text)
Replace the text within the range with other text.
|
CPDFEditCharItem |
selectCharItemAtPos(float x,
float y)
Select char item at position
|
void |
setAligningBlock(int type)
Set align type
|
void |
setAligningSection(CPDFEditCharPlace begin,
CPDFEditCharPlace end,
CPDFEditTextArea.PDFEditAlignType alignType)
Set text align type
|
boolean |
setCharsFontBold(CPDFEditCharPlace begin,
CPDFEditCharPlace end) |
void |
setCharsFontColor(CPDFEditCharPlace begin,
CPDFEditCharPlace end,
int color)
Set text color
|
boolean |
setCharsFontItalic(CPDFEditCharPlace begin,
CPDFEditCharPlace end)
Set text font to italic
|
boolean |
setCharsFontRederingMode(CPDFEditCharPlace begin,
CPDFEditCharPlace end,
CPDFEditTextArea.PDFEditTextRenderingMode mode)
Sets text font render mode
|
android.graphics.RectF[] |
setCharsFontSize(CPDFEditCharPlace begin,
CPDFEditCharPlace end,
float size)
Set text font size
|
boolean |
setCharsFontStrokeWidth(CPDFEditCharPlace begin,
CPDFEditCharPlace end,
int width)
Sets text font stroke width.
|
void |
setCharsTransparancy(CPDFEditCharPlace begin,
CPDFEditCharPlace end,
float tranrancy)
Set text transparancy
|
boolean |
setFontFromNativeTrueTypeFont(CPDFEditCharPlace begin,
CPDFEditCharPlace end,
java.lang.String font)
Set text font
|
boolean |
setFrame(android.graphics.RectF rectF,
boolean isUpdate)
Set the rect occupied by the text box
|
boolean |
setFrame(android.graphics.RectF rectF,
boolean isUpdate,
boolean addToUndo) |
attachDocument, getPageNum, getPtr, isValidpublic static final java.lang.String FontCourier
public static final java.lang.String FontHelvtics
public static final java.lang.String FontTimesRoman
public android.graphics.RectF getFrame(boolean forceUpdate)
forceUpdate - whether to force updatepublic boolean setFrame(android.graphics.RectF rectF,
boolean isUpdate)
rectF - the rect occupied by the text boxisUpdate - whether to force updatepublic boolean setFrame(android.graphics.RectF rectF,
boolean isUpdate,
boolean addToUndo)
public CPDFEditCharItem selectCharItemAtPos(float x, float y)
x - x coordinate in the page(Page coordinate)y - y coordinate in the page(Page coordinate)public CPDFEditCharItem insertText(CPDFEditCharPlace place, java.lang.String text)
place - Place to insert texttext - Text to intertpublic CPDFEditCharItem insertTextRange(CPDFEditCharPlace begin, CPDFEditCharPlace end, java.lang.String text)
begin - Start place of the text rangeend - End place of the text rangetext - Text used to replacepublic CPDFEditCharItem onAction(CPDFEditCharPlace place, CPDFEditTextArea.Action action)
place - Current edit placeaction - Action typepublic CPDFEditSelection getSelectionForWordPos(float x, float y)
x - X coordinate in the page(Page coordinate)y - Y coordinate in the page(Page coordinate)public CPDFEditCharRange refreshRange(CPDFEditCharPlace begin, CPDFEditCharPlace end)
begin - Begin place of textend - End place of textpublic android.graphics.RectF[] getCharsRangeAtPos(CPDFEditCharPlace begin, CPDFEditCharPlace end)
begin - Begin place of textend - End place of textpublic CPDFEditCharItem getBeginCharPlace()
public CPDFEditCharItem getEndCharPlace()
public CPDFEditCharItem deleteText(CPDFEditCharPlace begin, CPDFEditCharPlace end)
begin - Begin place of textend - End place of textpublic CPDFEditCharItem getEditCharItemFromPlace(CPDFEditCharPlace place)
place - place of textpublic android.graphics.RectF[] setCharsFontSize(CPDFEditCharPlace begin, CPDFEditCharPlace end, float size)
begin - Begin place of textend - End place of textsize - font sizepublic void setCharsFontColor(CPDFEditCharPlace begin, CPDFEditCharPlace end, int color)
begin - Begin place of textend - End place of textcolor - Text colorpublic void setCharsTransparancy(CPDFEditCharPlace begin, CPDFEditCharPlace end, float tranrancy)
begin - Begin place of textend - End place of texttranrancy - text transparancy(0-255)public void setAligningBlock(int type)
type - align typepublic void setAligningSection(CPDFEditCharPlace begin, CPDFEditCharPlace end, CPDFEditTextArea.PDFEditAlignType alignType)
begin - Begin place of textend - End place of textalignType - Align typepublic java.lang.String getText(CPDFEditCharPlace begin, CPDFEditCharPlace end)
begin - Begin place of textend - End place of textpublic java.lang.String getAllText()
public void release()
public boolean setCharsFontItalic(CPDFEditCharPlace begin, CPDFEditCharPlace end)
begin - Begin place of textend - End place of textpublic boolean clearCharsFontItalic(CPDFEditCharPlace begin, CPDFEditCharPlace end)
begin - Begin place of textend - End place of textpublic boolean isItalicByRange(CPDFEditCharPlace begin, CPDFEditCharPlace end)
begin - Begin place of textend - End place of textpublic boolean isItalic(CPDFEditCharPlace end)
end - End place of textpublic boolean isBoldByRange(CPDFEditCharPlace begin, CPDFEditCharPlace end)
begin - Begin place of textend - End place of textpublic boolean setCharsFontBold(CPDFEditCharPlace begin, CPDFEditCharPlace end)
public boolean clearCharsFontBold(CPDFEditCharPlace begin, CPDFEditCharPlace end)
public boolean isUnderlineByRange(CPDFEditCharPlace begin, CPDFEditCharPlace end)
public boolean isBold(CPDFEditCharPlace end)
end - End place of textpublic boolean setCharsFontRederingMode(CPDFEditCharPlace begin, CPDFEditCharPlace end, CPDFEditTextArea.PDFEditTextRenderingMode mode)
begin - Begin place of textend - End place of textmode - Render modepublic boolean setCharsFontStrokeWidth(CPDFEditCharPlace begin, CPDFEditCharPlace end, int width)
begin - Begin place of textend - End place of textwidth - stroke widthpublic boolean setFontFromNativeTrueTypeFont(CPDFEditCharPlace begin, CPDFEditCharPlace end, java.lang.String font)
begin - Begin place of textend - End place of textfont - Text fontpublic java.util.List<CPDFEditSelection> getCurrentAreaSelections(CPDFEditCharPlace begin, CPDFEditCharPlace end)
begin - Begin place of textend - End place of textpublic java.util.List<CPDFEditSelection> getCurrentAreaSelections()
public boolean isEmptyArea()
public float getFontSize(CPDFEditCharPlace end)
end - End place of textpublic float getFontSizeByRange(CPDFEditCharPlace begin, CPDFEditCharPlace end)
begin - Begin place of textend - End place of textpublic float getTransparency(CPDFEditCharPlace end)
end - End place of textpublic float getTransparancyByRange(CPDFEditCharPlace begin, CPDFEditCharPlace end)
begin - Begin place of textend - End place of textpublic int getColor(CPDFEditCharPlace end)
end - End place of textpublic int getColorByRange(CPDFEditCharPlace begin, CPDFEditCharPlace end)
begin - Begin place of textend - End place of textpublic CPDFEditTextArea.PDFEditAlignType getAlign(CPDFEditCharPlace end)
end - End place of textpublic CPDFEditTextArea.PDFEditAlignType getAlignByRange(CPDFEditCharPlace begin, CPDFEditCharPlace end)
begin - Begin place of textend - End place of textpublic java.lang.String getFontName(CPDFEditCharPlace end)
end - End place of textpublic java.lang.String getFontNameByRange(CPDFEditCharPlace begin, CPDFEditCharPlace end)
begin - Begin place of textend - End place of textpublic CPDFEditCharRange replaceText(CPDFEditCharRange charRange, java.lang.String text)
charRange - The text range to be replaced.text - The text that is used to replace.public int getSectionCount()
public CPDFEditCharItem getSectionBeginCharPlace(int section_index)
section_index - Section index.public CPDFEditCharItem getSectionEndCharPlace(int section_index)
section_index - public boolean addUnderline(CPDFEditCharPlace begin, CPDFEditCharPlace end)
public boolean removeUnderline(CPDFEditCharPlace begin, CPDFEditCharPlace end)
public boolean addStrikethrough(CPDFEditCharPlace begin, CPDFEditCharPlace end)
public boolean removeStrikethrough(CPDFEditCharPlace begin, CPDFEditCharPlace end)
public boolean moveToTheTop()
public boolean moveToTheBottom()
public boolean moveForward()
public boolean moveBackward()