public class SpenObjectShape extends SpenObjectShapeBase
SpenObjectShapeBase.ConnectedInfo| Modifier and Type | Field and Description |
|---|---|
static int |
AUTO_FIT_BOTH
Increase both the vertical size and the horizontal size of the object to completely fill the container.
|
static int |
AUTO_FIT_HORIZONTAL
Deprecated.
Increase the horizontal size of the object to completely fill the container.
Supported to only SpenObjectTextBox.
|
static int |
AUTO_FIT_NONE
Object size is fixed.
|
static int |
AUTO_FIT_VERTICAL
Increase the vertical size of the object to completely fill the container.
|
static int |
CURSOR_POS_END
initial cursor position in the text is end
|
static int |
CURSOR_POS_START
initial cursor position in the text is start
|
static int |
ELLIPSIS_DOTS
Ellipsis with dots.
|
static int |
ELLIPSIS_NONE
No ellipsis.
|
static int |
ELLIPSIS_TRIANGLE
Ellipsis with triangle.
|
static int |
FILL_TYPE_DARKEN
Fill a shape with the fill color blended with 40% white.
|
static int |
FILL_TYPE_DARKENLESS
Fill a shape with the fill color blended with 20% black.
|
static int |
FILL_TYPE_LIGHTEN
Fill a shape with the fill color blended with 40% white.
|
static int |
FILL_TYPE_LIGHTENLESS
Fill a shape with the fill color blended with 20% white.
|
static int |
FILL_TYPE_NORMAL
Fill a shape with current fill color
|
static int |
FILL_TYPE_TRANSPARENT
Fill none.
|
static int |
GRAVITY_BOTTOM
Push object to the bottom of its container without changing its size.
|
static int |
GRAVITY_CENTER
Place the object in the center of its container on both the vertical and the horizontal axis without changing its
size.
|
static int |
GRAVITY_TOP
Push text to the top of its container without changing its size.
|
static int |
HINT_TEXT_STYLE_BOLD
Bold hint text style.
|
static int |
HINT_TEXT_STYLE_ITALIC
Italic hint text style.
|
static int |
HINT_TEXT_STYLE_NONE
Properties of hint text font style.
|
static int |
HINT_TEXT_STYLE_UNDERLINE
Underlined hint text style.
|
static int |
IME_ACTION_DONE
the action key performs a "done" operation, typically meaning the IME will be closed.
|
static int |
IME_ACTION_GO
the action key performs a "go" operation to take the user to the target of the text they typed.
|
static int |
IME_ACTION_NEXT
the action key performs a "next" operation, taking the user to the next field that will accept text.
|
static int |
IME_ACTION_NONE
there is no available action.
|
static int |
IME_ACTION_PREVIOUS
Like IME_ACTION_NEXT, but for moving to the previous field.
|
static int |
IME_ACTION_SEARCH
the action key performs a "search" operation, taking the user to the results of searching for the text the have
typed (in whatever context is appropriate).
|
static int |
IME_ACTION_SEND
the action key performs a "send" operation, delivering the text to its target.
|
static int |
IME_ACTION_UNSPECIFIED
no specific action has been associated with this editor, let the editor come up with its own if it can.
|
static int |
INPUT_TYPE_DATETIME
dates and times.
|
static int |
INPUT_TYPE_NONE
none
|
static int |
INPUT_TYPE_NUMBER
numeric text.
|
static int |
INPUT_TYPE_PHONE
phone number.
|
static int |
INPUT_TYPE_TEXT
normal text.
|
static int |
TYPE_10_POINT_STAR
10-points star type.
|
static int |
TYPE_32_POINT_STAR
32-points star type.
|
static int |
TYPE_4_POINT_STAR
4-points star type.
|
static int |
TYPE_5_POINT_STAR
5-points star type.
|
static int |
TYPE_8_POINT_STAR
8-points star type.
|
static int |
TYPE_ARC
Arc type.
|
static int |
TYPE_BENT_ARROW
Bent arrow type.
|
static int |
TYPE_BENT_UP_ARROW
Bent up arrow type.
|
static int |
TYPE_BEVEL
Bevel type.
|
static int |
TYPE_BLOCK_ARC
Block arc type.
|
static int |
TYPE_CAN
Can type.
|
static int |
TYPE_CHEVRON
Chevron type.
|
static int |
TYPE_CHORD
Chord type.
|
static int |
TYPE_CIRCULAR_ARROW
Circular arrow type.
|
static int |
TYPE_CROSS
Cross type.
|
static int |
TYPE_CUBE
Cube type.
|
static int |
TYPE_CURVED_DOWN_ARROW
Curved down arrow type.
|
static int |
TYPE_CURVED_LEFT_ARROW
Curved left arrow type.
|
static int |
TYPE_CURVED_RIGHT_ARROW
Curved right arrow type.
|
static int |
TYPE_CURVED_UP_ARROW
Curved up arrow type.
|
static int |
TYPE_DIAMOND
Diamond type.
|
static int |
TYPE_DONUT
Donut type.
|
static int |
TYPE_DOUBLE_WAVE
Double wave type.
|
static int |
TYPE_DOWN_ARROW
Down arrow type.
|
static int |
TYPE_DOWN_ARROW_CALLOUT
Down arrow callout
|
static int |
TYPE_DOWN_RIBBON
Down ribbon type.
|
static int |
TYPE_EXPLOSION_1
Explosion 1 type.
|
static int |
TYPE_EXPLOSION_2
Explosion 2 type.
|
static int |
TYPE_FLOWCHART_CARD
Flowchart: Card
|
static int |
TYPE_FLOWCHART_DELAY
Flowchart: Delay
|
static int |
TYPE_FLOWCHART_DISPLAY
Flowchart: Display
|
static int |
TYPE_FLOWCHART_DOCUMENT
Flowchart: Document
|
static int |
TYPE_FLOWCHART_MANUAL_INPUT
Flowchart: Manual input
|
static int |
TYPE_FLOWCHART_OFF_PAGE_CONNECTOR
Flowchart: Off page connector
|
static int |
TYPE_FLOWCHART_PREDEFINED_PROCESS
Flowchart: Predefined process
|
static int |
TYPE_FLOWCHART_PUNCHED_TAPE
Flowchart: Punched tape
|
static int |
TYPE_FLOWCHART_SEQUENTIAL_ACCESS_STORAGE
Flowchart: Sequential access storage
|
static int |
TYPE_FLOWCHART_STORED_DATA
Flowchart: Stored data
|
static int |
TYPE_FLOWCHART_TERMINATOR
Flowchart: Terminator
|
static int |
TYPE_FOLDED_CORNER
Folded corner type.
|
static int |
TYPE_HEART
Heart type.
|
static int |
TYPE_HEXAGON
Hexagon type.
|
static int |
TYPE_HORIZONTAL_SCROLL
Horizontal scroll type.
|
static int |
TYPE_L_SHAPE
L-shape type.
|
static int |
TYPE_LEFT_ARROW
Left arrow type.
|
static int |
TYPE_LEFT_ARROW_CALLOUT
Left arrow callout
|
static int |
TYPE_LEFT_BRACE
Left brace
|
static int |
TYPE_LEFT_BRACKET
Left bracket
|
static int |
TYPE_LEFT_RIGHT_ARROW
Left-right arrow type.
|
static int |
TYPE_LEFT_RIGHT_ARROW_CALLOUT
Left-right arrow callout
|
static int |
TYPE_LEFT_RIGHT_UP_ARROW
Left-right-up arrow type.
|
static int |
TYPE_LEFT_UP_ARROW
Left-up arrow type.
|
static int |
TYPE_LIGHTNING_BOLT
Lighting bolt type.
|
static int |
TYPE_MOON
Moon type.
|
static int |
TYPE_NO_SYMBOL
No symbol type.
|
static int |
TYPE_NOTCHED_RIGHT_ARROW
Notched right arrow type.
|
static int |
TYPE_OVAL
Oval type.
|
static int |
TYPE_OVAL_CALLOUT
Oval callout
|
static int |
TYPE_PARALLELOGRAM
Parallelogram type.
|
static int |
TYPE_PENTAGON
Pentagon type.
|
static int |
TYPE_PIE
Pie type.
|
static int |
TYPE_PLAQUE
Plaque type.
|
static int |
TYPE_QUAD_ARROW
Quad arrow type.
|
static int |
TYPE_QUAD_ARROW_CALLOUT
Quad arrow callout
|
static int |
TYPE_RECTANGLE
Rectangle type.
|
static int |
TYPE_RECTANGULAR_CALLOUT
Rectangular callout
|
static int |
TYPE_REGULAR_PENTAGON
Regular pentagon type.
|
static int |
TYPE_RIGHT_ARROW
Right arrow type.
|
static int |
TYPE_RIGHT_ARROW_CALLOUT
Right arrow callout
|
static int |
TYPE_RIGHT_BRACE
Right brace
|
static int |
TYPE_RIGHT_BRACKET
Right bracket
|
static int |
TYPE_RIGHT_TRIANGLE
Right angled triangle type.
|
static int |
TYPE_ROUNDED_RECTANGLE
Rounded rectangle type.
|
static int |
TYPE_ROUNDED_RECTANGULAR_CALLOUT
Rounded rectangular callout
|
static int |
TYPE_SMILEY_FACE
Smiley face type.
|
static int |
TYPE_STRIPED_RIGHT_ARROW
Striped right arrow type.
|
static int |
TYPE_SUN
Sun type.
|
static int |
TYPE_TRAPEZOID
Trapezoid type.
|
static int |
TYPE_TRIANGLE
Triangle type.
|
static int |
TYPE_U_TURN_ARROW
U-turn arrow type.
|
static int |
TYPE_UNKNOWN
Unknown type.
|
static int |
TYPE_UP_ARROW
Up arrow type.
|
static int |
TYPE_UP_ARROW_CALLOUT
Up arrow callout
|
static int |
TYPE_UP_DOWN_ARROW
Up-down arrow type.
|
static int |
TYPE_UP_DOWN_ARROW_CALLOUT
Up-down arrow callout
|
static int |
TYPE_UP_RIBBON
Up ribbon type
|
static int |
TYPE_VERTICAL_SCROLL
Vertical scroll type.
|
static int |
TYPE_WAVE
Wave type.
|
CONNECTION_MODE_LOOSELY_COUPLED, CONNECTION_MODE_TIGHTLY_COUPLEDOBJECT_MINIMUM_SIZE, RESIZE_OPTION_DISABLE, RESIZE_OPTION_FREE, RESIZE_OPTION_KEEP_RATIO, SPEN_INFINITY_FLOAT, SPEN_INFINITY_INT, TYPE_CONTAINER, TYPE_IMAGE, TYPE_LINE, TYPE_NONE, TYPE_SHAPE, TYPE_STROKE, TYPE_TEXT_BOX| Constructor and Description |
|---|
SpenObjectShape()
Creates a shape of the unknown type.
|
SpenObjectShape(int shapeType)
Creates a shape with the type.
|
SpenObjectShape(int shapeType,
boolean isTemplateObject)
Creates a shape with the type and template status.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendTextParagraph(SpenTextParagraphBase paragraph)
Add the specified paragraph.
Where the new paragraph overlaps with an existing paragraph, the new paragraph is merged with the existing one. |
void |
appendTextSpan(SpenTextSpanBase span)
Add the specified span information.
Where there are existing spans, this method merges the new span with the existing spans. |
boolean |
contain(PointF point)
Check whether the point is located inside.
|
ArrayList<SpenTextParagraphBase> |
findTextParagraph(int startPos,
int endPos)
Find the list of paragraphs between the specified start position and end position.
|
ArrayList<SpenTextSpanBase> |
findTextSpan(int startPos,
int endPos)
Find the list of spans between the specified start position and end position.
|
int |
getAutoFitOption()
Get the text auto fit option.
|
float |
getBottomBaseMargin()
Get the bottom margin of the text box.
|
float |
getBottomMargin()
Get the bottom margin of the text.
|
PointF |
getControlPoint(int index)
Get the position of the control point.
|
PointF |
getControlPoint(int index,
float degree)
Get the rotated position of the control point.
|
int |
getControlPointCount()
Get the number of control points.
|
int |
getCursorPosition()
Get cursor position.
|
int |
getEllipsisType()
Get the ellipsis text type.
|
void |
getFillEffect(SpenFillEffectBase effect)
Get the fill effect.
|
int |
getFillEffectType()
Get the type of the fill effect in the shape.
|
void |
getFillPath(int index,
float degree,
SpenPath path,
Integer level)
Get the rotated fill path.
|
void |
getFillPath(int index,
SpenPath path,
Integer level)
Get the fill path.
|
int |
getFillPathCount()
Get the number of fill paths.
|
int |
getGravity()
Get the text vertical gravity.
|
String |
getHintText()
Get the hint text.
|
int |
getHintTextColor()
Get the color of the hint text.
|
float |
getHintTextFontSize()
Get the font size of the hint text.
|
int |
getHintTextStyle()
Get the hint style of the hint text.
|
int |
getIMEActionType()
Get the IME Action type of text.
|
float |
getLeftBaseMargin()
Get the left margin of the text box.
|
float |
getLeftMargin()
Get the left margin of the text.
|
void |
getPath(float degree,
SpenPath path)
Get the rotated path.
|
void |
getPath(SpenPath path)
Get the current path.
|
float |
getRightBaseMargin()
Get the right margin of the text box.
|
float |
getRightMargin()
Get the right margin of the text.
|
int |
getShapeType()
Get the current shape type.
In 4.0.0, SpenObjectImage and SpenObjectTextBox should return TYPE_RECTANGLE. |
String |
getText()
Get contents of the text box.
|
int |
getTextInputType()
Get the input type of text.
|
ArrayList<SpenTextParagraphBase> |
getTextParagraph()
Get the text paragraph information of each text line.
|
ArrayList<SpenTextSpanBase> |
getTextSpan()
Get the text span information.
|
float |
getTopBaseMargin()
Get the top margin of the text box.
|
float |
getTopMargin()
Get the left margin of the text.
|
float |
getVerticalPan()
Get the vertical pan position.
|
void |
insertText(String text,
int position)
Insert the text at the position in the text box.
If the position is negative or larger than the length of the entire text, an exception is thrown.In the new text, the span style follows the existing text. |
void |
insertTextAtCursor(String text)
Insert the text at the current cursor position.
After insertion, the cursor moves to the end of the new text. In the new text, the span style follows the existing text. |
boolean |
isFlippedHorizontally()
Check if the shape is flip horizontally.
|
boolean |
isFlippedVertically()
Check if the shape is flip vertically.
|
boolean |
isHintTextEnabled()
Check if hint text is enabled.
|
boolean |
isTextReadOnlyEnabled()
Check if the text box is read-only.
It does not really prohibit changing the text box. |
void |
moveControlPoint(int index,
PointF position)
Move the control point to the position.
|
void |
parseHyperText()
Parse the text to hyper text format.
|
void |
removeAllText()
Delete the entire text including span and paragraph data.
|
void |
removeText(int startPosition,
int length)
Delete the text from the position with the length.
If the delete position is negative or larger than the length of the entire text, an exception is thrown. |
void |
removeTextParagraph(SpenTextParagraphBase paragraph)
Remove the specified paragraph from the text.
|
void |
removeTextSpan(SpenTextSpanBase span)
Remove the specified spans in the text.
|
void |
replaceText(String text,
int startPosition,
int length)
Replace the text specified by the starting position and length with the new text.
Span and paragraph data are retained and applied to the new text. |
void |
resetFillEffect()
Revert all attributes of the fill effect to be default value.
|
void |
setAutoFitOption(int textAutoFit)
Set the specified text box auto fit option.
|
void |
setCursorPosition(int position)
Set the cursor at the specified position.
|
void |
setEllipsisType(int type)
Set the specified ellipsis type.
|
void |
setFillEffect(SpenFillEffectBase effect)
Set the fill effect.
|
void |
setGravity(int textGravity)
Set the specified text vertical gravity.
|
void |
setHintText(String hintText)
Set the hint text.
|
void |
setHintTextColor(int color)
Set the specified color for hint text.
|
void |
setHintTextEnabled(boolean enable)
Show or hide the hint text.
|
void |
setHintTextFontSize(float size)
Set the hint text font size.
|
void |
setHintTextStyle(int style)
Set the font style of the hint text.
|
void |
setIMEActionType(int type)
Set the IME Action type of text.
|
void |
setMargin(float left,
float top,
float right,
float bottom)
Set the specified text margins.
|
void |
setShapeType(int type)
Change the shape type.
|
void |
setText(String text)
Set contents of text box.
|
void |
setTextInputType(int type)
Set the input type of text.
|
void |
setTextParagraph(ArrayList<SpenTextParagraphBase> paragraph)
Set the specified text paragraph information.
|
void |
setTextReadOnlyEnabled(boolean enable)
Enable or disable the read-only property for the text box.
|
void |
setTextSpan(ArrayList<SpenTextSpanBase> span)
Set the specified text span information.
|
void |
setVerticalPan(float position)
Set the vertical pan position.
|
copy, getConnectedInfoCount, getConnectionMode, getLineColorEffect, getLineStyleEffect, getMagneticConnectionInfo, getMagneticConnectionPoint, getMagneticConnectionPoint, getMagneticConnectionPointCount, getNearestMagneticConnectionPointIndex, resetLineColorEffect, resetLineStyleEffect, setConnectionMode, setLineColorEffect, setLineStyleEffectattachFile, clearChangedFlag, detachFile, equals, getAttachedFile, getDrawnRect, getExtraDataByteArray, getExtraDataInt, getExtraDataString, getExtraDataStringArray, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getRect, getResizeOption, getRotation, getRuntimeHandle, getSorDataInt, getSorDataString, getSorInfo, getSorPackageLink, getTemplateProperty, getType, getUserId, hasExtraDataByteArray, hasExtraDataInt, hasExtraDataString, hasExtraDataStringArray, hashCode, hasSorDataInt, hasSorDataString, isChanged, isFlipEnabled, isMovable, isOutOfViewEnabled, isRecorded, isRotatable, isSelectable, isVisible, removeExtraDataByteArray, removeExtraDataInt, removeExtraDataString, removeExtraDataStringArray, removeSorDataInt, removeSorDataString, setExtraDataByteArray, setExtraDataInt, setExtraDataString, setExtraDataStringArray, setFlipEnabled, setMaxSize, setMinSize, setMovable, setOutOfViewEnabled, setRecorded, setRect, setResizeOption, setRotatable, setRotation, setSelectable, setSorDataInt, setSorDataString, setSorInfo, setSorPackageLink, setUserId, setVisibilitypublic static final int TYPE_UNKNOWN
public static final int TYPE_OVAL
public static final int TYPE_TRIANGLE
public static final int TYPE_RIGHT_TRIANGLE
public static final int TYPE_RECTANGLE
public static final int TYPE_ROUNDED_RECTANGLE
public static final int TYPE_HEXAGON
public static final int TYPE_PARALLELOGRAM
public static final int TYPE_DIAMOND
public static final int TYPE_TRAPEZOID
public static final int TYPE_PENTAGON
public static final int TYPE_REGULAR_PENTAGON
public static final int TYPE_4_POINT_STAR
public static final int TYPE_5_POINT_STAR
public static final int TYPE_8_POINT_STAR
public static final int TYPE_10_POINT_STAR
public static final int TYPE_32_POINT_STAR
public static final int TYPE_CROSS
public static final int TYPE_L_SHAPE
public static final int TYPE_CHEVRON
public static final int TYPE_ARC
public static final int TYPE_MOON
public static final int TYPE_SMILEY_FACE
public static final int TYPE_HEART
public static final int TYPE_PIE
public static final int TYPE_CHORD
public static final int TYPE_CAN
public static final int TYPE_CUBE
public static final int TYPE_EXPLOSION_1
public static final int TYPE_EXPLOSION_2
public static final int TYPE_FOLDED_CORNER
public static final int TYPE_LIGHTNING_BOLT
public static final int TYPE_PLAQUE
public static final int TYPE_UP_RIBBON
public static final int TYPE_DOWN_RIBBON
public static final int TYPE_DONUT
public static final int TYPE_NO_SYMBOL
public static final int TYPE_HORIZONTAL_SCROLL
public static final int TYPE_VERTICAL_SCROLL
public static final int TYPE_BLOCK_ARC
public static final int TYPE_BEVEL
public static final int TYPE_SUN
public static final int TYPE_WAVE
public static final int TYPE_DOUBLE_WAVE
public static final int TYPE_LEFT_ARROW
public static final int TYPE_RIGHT_ARROW
public static final int TYPE_UP_ARROW
public static final int TYPE_DOWN_ARROW
public static final int TYPE_LEFT_RIGHT_ARROW
public static final int TYPE_UP_DOWN_ARROW
public static final int TYPE_LEFT_UP_ARROW
public static final int TYPE_LEFT_RIGHT_UP_ARROW
public static final int TYPE_QUAD_ARROW
public static final int TYPE_BENT_ARROW
public static final int TYPE_BENT_UP_ARROW
public static final int TYPE_CURVED_LEFT_ARROW
public static final int TYPE_CURVED_RIGHT_ARROW
public static final int TYPE_CURVED_UP_ARROW
public static final int TYPE_CURVED_DOWN_ARROW
public static final int TYPE_STRIPED_RIGHT_ARROW
public static final int TYPE_NOTCHED_RIGHT_ARROW
public static final int TYPE_U_TURN_ARROW
public static final int TYPE_CIRCULAR_ARROW
public static final int TYPE_FLOWCHART_MANUAL_INPUT
public static final int TYPE_FLOWCHART_TERMINATOR
public static final int TYPE_FLOWCHART_PREDEFINED_PROCESS
public static final int TYPE_FLOWCHART_STORED_DATA
public static final int TYPE_FLOWCHART_DELAY
public static final int TYPE_FLOWCHART_CARD
public static final int TYPE_FLOWCHART_OFF_PAGE_CONNECTOR
public static final int TYPE_FLOWCHART_DISPLAY
public static final int TYPE_FLOWCHART_DOCUMENT
public static final int TYPE_FLOWCHART_PUNCHED_TAPE
public static final int TYPE_FLOWCHART_SEQUENTIAL_ACCESS_STORAGE
public static final int TYPE_LEFT_BRACE
public static final int TYPE_RIGHT_BRACE
public static final int TYPE_LEFT_BRACKET
public static final int TYPE_RIGHT_BRACKET
public static final int TYPE_RECTANGULAR_CALLOUT
public static final int TYPE_ROUNDED_RECTANGULAR_CALLOUT
public static final int TYPE_OVAL_CALLOUT
public static final int TYPE_LEFT_ARROW_CALLOUT
public static final int TYPE_UP_ARROW_CALLOUT
public static final int TYPE_RIGHT_ARROW_CALLOUT
public static final int TYPE_DOWN_ARROW_CALLOUT
public static final int TYPE_LEFT_RIGHT_ARROW_CALLOUT
public static final int TYPE_UP_DOWN_ARROW_CALLOUT
public static final int TYPE_QUAD_ARROW_CALLOUT
public static final int FILL_TYPE_TRANSPARENT
getFillPath(int, SpenPath, Integer),
Constant Field Valuespublic static final int FILL_TYPE_NORMAL
getFillPath(int, SpenPath, Integer),
Constant Field Valuespublic static final int FILL_TYPE_LIGHTENLESS
getFillPath(int, SpenPath, Integer),
Constant Field Valuespublic static final int FILL_TYPE_LIGHTEN
getFillPath(int, SpenPath, Integer),
Constant Field Valuespublic static final int FILL_TYPE_DARKENLESS
getFillPath(int, SpenPath, Integer),
Constant Field Valuespublic static final int FILL_TYPE_DARKEN
getFillPath(int, SpenPath, Integer),
Constant Field Valuespublic static final int GRAVITY_TOP
setGravity(int),
Constant Field Valuespublic static final int GRAVITY_CENTER
setGravity(int),
Constant Field Valuespublic static final int GRAVITY_BOTTOM
setGravity(int),
Constant Field Valuespublic static final int AUTO_FIT_NONE
setAutoFitOption(int),
Constant Field Values@Deprecated public static final int AUTO_FIT_HORIZONTAL
setAutoFitOption(int),
Constant Field Valuespublic static final int AUTO_FIT_VERTICAL
setAutoFitOption(int),
Constant Field Valuespublic static final int AUTO_FIT_BOTH
setAutoFitOption(int),
Constant Field Valuespublic static final int ELLIPSIS_NONE
setEllipsisType(int),
Constant Field Valuespublic static final int ELLIPSIS_DOTS
setEllipsisType(int),
Constant Field Valuespublic static final int ELLIPSIS_TRIANGLE
setEllipsisType(int),
Constant Field Valuespublic static final int IME_ACTION_UNSPECIFIED
public static final int IME_ACTION_NONE
setIMEActionType(int),
Constant Field Valuespublic static final int IME_ACTION_GO
setIMEActionType(int),
Constant Field Valuespublic static final int IME_ACTION_SEARCH
setIMEActionType(int),
Constant Field Valuespublic static final int IME_ACTION_DONE
setIMEActionType(int),
Constant Field Valuespublic static final int IME_ACTION_SEND
setIMEActionType(int),
Constant Field Valuespublic static final int IME_ACTION_NEXT
setIMEActionType(int),
Constant Field Valuespublic static final int IME_ACTION_PREVIOUS
setIMEActionType(int),
Constant Field Valuespublic static final int INPUT_TYPE_NONE
setTextInputType(int),
Constant Field Valuespublic static final int INPUT_TYPE_TEXT
setTextInputType(int),
Constant Field Valuespublic static final int INPUT_TYPE_NUMBER
setTextInputType(int),
Constant Field Valuespublic static final int INPUT_TYPE_PHONE
setTextInputType(int),
Constant Field Valuespublic static final int INPUT_TYPE_DATETIME
setTextInputType(int),
Constant Field Valuespublic static final int CURSOR_POS_START
setInitialCursorPos(int),
Constant Field Valuespublic static final int CURSOR_POS_END
setInitialCursorPos(int),
Constant Field Valuespublic static final int HINT_TEXT_STYLE_NONE
setHintTextStyle(int),
getHintTextStyle(),
Constant Field Valuespublic static final int HINT_TEXT_STYLE_BOLD
setHintTextStyle(int),
Constant Field Valuespublic static final int HINT_TEXT_STYLE_ITALIC
setHintTextStyle(int),
Constant Field Valuespublic static final int HINT_TEXT_STYLE_UNDERLINE
setHintTextStyle(int),
Constant Field Valuespublic SpenObjectShape()
public SpenObjectShape(int shapeType)
shapeType - The shape typeIllegalArgumentException - Thrown if the shapeType is less than 0 or an invalid type.public SpenObjectShape(int shapeType,
boolean isTemplateObject)
SpenNoteDoc.revertToTemplatePage(int).shapeType - The shape typeisTemplateObject - Set to true to create a template object, set to false to create a non-template object.IllegalArgumentException - Thrown if the type is less than 0 or an invalid type.public void setShapeType(int type)
type - The shape type to set.IllegalArgumentException - Thrown if the type is less than 0 or an invalid type.getShapeType()public int getShapeType()
TYPE_RECTANGLE.setShapeType(int)public void getPath(SpenPath path)
path - (output)
The path to be copied.IllegalArgumentException - If the path is null.setPath(SpenPath)public void getPath(float degree,
SpenPath path)
degree - How many degrees to rotate.path - (output)
The path to be copied the result.IllegalArgumentException - If the path is null.setPath(SpenPath)public int getFillPathCount()
public void getFillPath(int index,
SpenPath path,
Integer level)
index - The index of the fill path.path - (output)
The path to be copied the result.level - (output)
The output level, One of FILL_TYPE_NORMAL, FILL_TYPE_LIGHTENLESS,
FILL_TYPE_LIGHTEN, FILL_TYPE_DARKENLESS, FILL_TYPE_DARKEN
and FILL_TYPE_TRANSPARENT,IllegalArgumentException - If the path is null.public void getFillPath(int index,
float degree,
SpenPath path,
Integer level)
index - The index of the fill path.degree - How many degrees to rotate.path - (output)
The output path.level - (output)
The output level.IllegalArgumentException - If the path is null.public int getControlPointCount()
getControlPoint(int)public PointF getControlPoint(int index)
index - The index of the control point.IndexOutOfBoundsException - Thrown if the index is a negative value or
if it is greater than the number of control points.getControlPoint(int, float),
moveControlPoint(int, PointF)public PointF getControlPoint(int index, float degree)
index - The index of the control point.degree - How many degrees to rotate.IndexOutOfBoundsException - Thrown if the index passed is a negative value or
if it is greater than the number of control points.getControlPoint(int),
moveControlPoint(int, PointF)public void moveControlPoint(int index,
PointF position)
point is valid, the shape would change its path and connection points.index - The index of control point.position - The position to move.IndexOutOfBoundsException - Thrown if the index is a negative value or
if it is greater than the number of control points.getControlPoint(int),
getControlPointCount()public void setText(String text)
text - The text to set.public String getText()
public void insertText(String text, int position)
position is negative or larger than the length of the entire text, an exception is thrown.text - The text to insert.position - The position in the text box to insert the text.IllegalArgumentException - If the position is negative or larger than the text box length.
If the text of TextBox is NULL and the position is not 0.insertTextAtCursor(String)public void insertTextAtCursor(String text)
text - The text to insert.insertText(String, int)public void removeText(int startPosition,
int length)
startPosition - The start index of the text to be deleted.length - The length of the text to be deleted.IllegalArgumentException - If startPosition is negative or larger than the length of the entire textIllegalStateException - If the text of TextBox is NULL.public void removeAllText()
public void replaceText(String text, int startPosition, int length)
text - The new text.startPosition - The start index of the text to be replaced.length - The length of the text to be replaced.IllegalArgumentException - If startPosition is negative or larger than the length of the entire textIllegalStateException - If the text of TextBox is NULL.public void appendTextParagraph(SpenTextParagraphBase paragraph)
paragraph - The paragraph object to append.IllegalArgumentException - Thrown if the paragraph passed is null.public void appendTextSpan(SpenTextSpanBase span)
span - The span instance.IllegalArgumentException - Thrown if the span passed is null.public ArrayList<SpenTextParagraphBase> findTextParagraph(int startPos, int endPos)
startPos - The index of the first paragraph for finding paragraph information.endPos - The index of the end paragraph for finding paragraph information.public ArrayList<SpenTextSpanBase> findTextSpan(int startPos, int endPos)
startPos - The index of the first character for finding span information.endPos - The index of the last character for finding span information.public ArrayList<SpenTextParagraphBase> getTextParagraph()
public ArrayList<SpenTextSpanBase> getTextSpan()
public void parseHyperText()
public void removeTextParagraph(SpenTextParagraphBase paragraph)
paragraph - The paragraph object to remove.IllegalArgumentException - Thrown If paragraph passed is null.public void removeTextSpan(SpenTextSpanBase span)
span - The span instance.IllegalArgumentException - Thrown if the span passed is null.public void setTextParagraph(ArrayList<SpenTextParagraphBase> paragraph)
paragraph - The text paragraph information.IllegalArgumentException - Thrown if startPos or endPos of SpenTextParagraphBase has a negative value.public void setTextSpan(ArrayList<SpenTextSpanBase> span)
span - The text span information.IllegalArgumentException - Thrown if startPos or endPos of SpenTextSpanBase has a negative value.public void setCursorPosition(int position)
position - The cursor positionIllegalArgumentException - If position passed is negative or larger than the length of the entire text.
If the text of TextBox is NULL and position is not 0.getCursorPosition()public int getCursorPosition()
setCursorPosition(int)public void setMargin(float left,
float top,
float right,
float bottom)
left - The left margin.top - The top margin.right - The right margin.bottom - The bottom margin.public float getLeftMargin()
public float getTopMargin()
public float getRightMargin()
public float getBottomMargin()
public void setGravity(int textGravity)
textGravity - The text vertical gravity value.GRAVITY_TOPpublic int getGravity()
public boolean contain(PointF point)
point - The point to checktrue, point is inside the shape.public float getLeftBaseMargin()
public float getTopBaseMargin()
public float getRightBaseMargin()
public float getBottomBaseMargin()
public boolean isFlippedVertically()
true, the shape is flip vertically.public boolean isFlippedHorizontally()
true, the shape is flip horizontally.public void setHintText(String hintText)
hintText - hint text.public String getHintText()
public void setHintTextEnabled(boolean enable)
enable - Set to true to show the hint text, set to false to hide the hint text.public boolean isHintTextEnabled()
true, The hint text is "enabled".public void setHintTextColor(int color)
color - The ARGB8888 format color.public int getHintTextColor()
public void setHintTextFontSize(float size)
size - The hint text sizeIllegalArgumentException - Thrown if size is negative.public float getHintTextFontSize()
public void setHintTextStyle(int style)
text.setHintTextStyle(SpenObjectShape.HINT_TEXT_STYLE_BOLD | SpenObjectShape.HINT_TEXT_STYLE_UNDERLINE);
style - The hint text style.IllegalArgumentException - If style is invalid.getHintTextStyle()public int getHintTextStyle()
setHintTextStyle(int)public void setAutoFitOption(int textAutoFit)
textAutoFit - The auto fit option.IndexOutOfBoundsException - Thrown if textAutoFit is out of bound.AUTO_FIT_NONE,
AUTO_FIT_VERTICAL,
AUTO_FIT_BOTHpublic int getAutoFitOption()
setAutoFitOption(int)public void setEllipsisType(int type)
type - The ellipsis type of text. One of ELLIPSIS_NONE, ELLIPSIS_DOTS or ELLIPSIS_TRIANGLEIllegalArgumentException - Thrown if type is invalid.public int getEllipsisType()
public void setIMEActionType(int type)
type - The IME Action type. One of IME_ACTION_UNSPECIFIED ~ IME_ACTION_PREVIOUS.IndexOutOfBoundsException - Thrown if type is out of bound.IME_ACTION_UNSPECIFIEDpublic int getIMEActionType()
public void setTextInputType(int type)
type - The input type of text.IndexOutOfBoundsException - If type is invalid.INPUT_TYPE_NONEpublic int getTextInputType()
public void setVerticalPan(float position)
position - The vertical pan position.public float getVerticalPan()
public void setTextReadOnlyEnabled(boolean enable)
enable - Set to true to make the textbox read-only, set to false to not make the text box read-only.public boolean isTextReadOnlyEnabled()
true, The ObjectTextBox is a
"read-only".public int getFillEffectType()
SpenFillEffectBase.TYPE_COLOR,
SpenFillEffectBase.TYPE_IMAGE and SpenFillEffectBase.TYPE_PATTERN.public void setFillEffect(SpenFillEffectBase effect)
effect - Fill effect to set.IllegalArgumentException - Thrown if the effect is null.SpenFillColorEffect,
SpenFillImageEffect,
SpenFillPatternEffectpublic void getFillEffect(SpenFillEffectBase effect)
int effectType = shape.getFillEffectType();
SpenFillEffectBase effect = SpenFillEffectBase.createFillEffect(effectType);
if (effect != null) {
shape.getFillEffect(effect);
}
effect - (output)
Fill effect to get.IllegalArgumentException - If the effect is null.SpenFillColorEffect,
SpenFillImageEffect,
SpenFillPatternEffectpublic void resetFillEffect()
setFillEffect(SpenFillEffectBase),
getFillEffect(SpenFillEffectBase)