public class SpenContentBase extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
STATE_CANCELED
Cancel state.
|
static int |
STATE_DONE
Done state.
|
static int |
STATE_EXCEPTION
Exception state.
|
static int |
STATE_FAIL
Fail state.
|
static int |
STATE_INIT
Initialization state.
|
static int |
STATE_NONE
Invalid content state
|
static int |
STATE_READY
Ready state.
|
static int |
STATE_RUNNING
Running state.
|
static int |
TASK_BULLET
Bullet task style.
|
static int |
TASK_DONE
Done task style.
|
static int |
TASK_NONE
Invalid task style.
|
static int |
TASK_NUMBER
Numerical task style.
|
static int |
TASK_TODO
To-do task style.
|
static int |
TYPE_DRAWING
ContentDrawing content.
|
static int |
TYPE_HANDWRITING
ContentHandwriting content.
|
static int |
TYPE_IMAGE
ContentImage content.
|
static int |
TYPE_NONE
Invalid content.
|
static int |
TYPE_TEXT
ContentText content.
|
| Modifier and Type | Method and Description |
|---|---|
void |
appendSpan(SpenTextSpan span)
Add the specified span information.
Where there are existing spans, this method merges the new span with the existing spans. |
void |
clearChangedFlag()
Clear the set changed flag.
The changed flag is set when content data is changed using the API. If this content is saved by SpenSDoc, clear the flag. |
void |
copy(SpenContentBase source)
Copy data from the specified content.
|
boolean |
equals(Object o)
Check if the specified content is the same as the current content.
|
ArrayList<SpenTextSpan> |
findSpan(int startIndex,
int endIndex)
Find the list of spans between the specified start position and end position.
|
int |
getItemHeight()
Get the specified height of the content.
|
int |
getLength()
Get the length of content.
|
ArrayList<SpenTextSpan> |
getSpan()
Get the span information.
|
int |
getState()
Get the state.
|
int |
getTaskId()
Get the task Id.
|
int |
getTaskNumber()
Get the task number.
|
int |
getTaskStyle()
Get the task style.
|
String |
getText()
Get the text.
|
String |
getThumbnailPath()
Get the source image file path.
|
int |
getType()
Get the content type.
|
boolean |
isChanged()
Check if the content is changed.
The changed flag is set when content data is changed using the API. If this content is saved by SpenSDoc, clear the flag. |
void |
removeSpan(SpenTextSpan span)
Remove the specified spans.
|
void |
setItemHeight(int height)
Set the specified height of the content.
|
void |
setSpan(ArrayList<SpenTextSpan> spanList)
Set the specified span information.
|
void |
setState(int state)
Set the state.
|
void |
setTaskId(int id)
Set the task Id.
|
void |
setTaskNumber(int number)
Set the task number.
|
void |
setTaskStyle(int style)
Set the task style.
|
void |
setText(String text)
Set the text.
|
void |
setThumbnailPath(String path)
Set the thumbnail image from the specified file.
|
public static final int TYPE_NONE
public static final int TYPE_TEXT
public static final int TYPE_IMAGE
public static final int TYPE_HANDWRITING
public static final int TYPE_DRAWING
public static final int TASK_NONE
public static final int TASK_TODO
public static final int TASK_DONE
public static final int TASK_BULLET
public static final int TASK_NUMBER
public static final int STATE_NONE
public static final int STATE_INIT
public static final int STATE_READY
public static final int STATE_RUNNING
public static final int STATE_DONE
public static final int STATE_FAIL
public static final int STATE_EXCEPTION
public static final int STATE_CANCELED
public int getType()
TYPE_TEXT, TYPE_IMAGE, TYPE_HANDWRITING, TYPE_DRAWING and TYPE_VOICE.public void setThumbnailPath(String path)
path - The image file path.public String getThumbnailPath()
setThumbnailPath(java.lang.String)public void setTaskId(int id)
id - The id.getTaskId()public int getTaskId()
setTaskId(int)public void setTaskNumber(int number)
TASK_NUMBERnumber - The number.getTaskNumber()public int getTaskNumber()
setTaskNumber(int)public void setTaskStyle(int style)
style - The style.#TASK_BULLET}, {@link #TASK_DONE}, {@link #TASK_TODO} {@link #TASK_NUMBER},
getTaskStyle()public int getTaskStyle()
#TASK_BULLET}, {@link #TASK_DONE}, {@link #TASK_TODO} {@link #TASK_NUMBER},
setTaskStyle(int)public void setState(int state)
state - The style.#TASK_BULLET}, {@link #STATE_CANCELED}, {@link #STATE_DONE}, {@link #STATE_EXCEPTION}, {@link #STATE_FAIL}, {@link #STATE_INIT}, {@link #STATE_READY}, {@link #STATE_NONE}, {@link #STATE_RUNNING},
getState()public int getState()
#TASK_BULLET}, {@link #STATE_CANCELED}, {@link #STATE_DONE}, {@link #STATE_EXCEPTION}, {@link #STATE_FAIL}, {@link #STATE_INIT}, {@link #STATE_READY}, {@link #STATE_NONE}, {@link #STATE_RUNNING},
setState(int)public void setText(String text)
text - The text to set.getText()public String getText()
setText(String)public void setItemHeight(int height)
height - The height.getItemHeight()public int getItemHeight()
setItemHeight(int)public boolean equals(Object o)
public void copy(SpenContentBase source)
source - The source content.IllegalArgumentException - Thrown if class type is different.
Or if source is null.public void setSpan(ArrayList<SpenTextSpan> spanList)
spanList - The span information.public ArrayList<SpenTextSpan> getSpan()
public ArrayList<SpenTextSpan> findSpan(int startIndex, int endIndex)
startIndex - The index of the first character for finding span information.endIndex - The index of the last character for finding span information.public void removeSpan(SpenTextSpan span)
span - The span instance.public void appendSpan(SpenTextSpan span)
span - The span instance.public boolean isChanged()
true if content data is changed or created. Otherwise false.public void clearChangedFlag()
public int getLength()