java.lang.Object | |
↳ | com.htc.painting.tool.pen.PenProps |
![]() |
Pen Property Bundle is used to store all key-value properties of a pen. There are some pre-defined key with specific type. When you want to new a PenPropsBundle, you must set them.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | FLAG_IS_DEFAULT_PEN | Flag which is used at KEY_FLAGS
Set it to KEY_FLAGS if this pen is the default pen |
|||||||||
int | FLAG_IS_ERASER | Flag which is used at KEY_FLAGS
Set it to KEY_FLAGS if this pen is an eraser |
|||||||||
int | FLAG_IS_HIGHLIGHTER | Flag which is used at KEY_FLAGS
Set it to KEY_FLAGS if this pen is the default pen |
|||||||||
int | FLAG_IS_RENDER_SUPPLIER | Flag which is used at KEY_FLAGS
Set it to KEY_FLAGS if this pen is also an interface of IRenderSupplier |
|||||||||
int | FLAG_IS_SKIA_SIMPLE_PEN | Flag which is used at KEY_FLAGS
Set it to KEY_FLAGS if this pen is a simple pen |
|||||||||
String | KEY_APP_PACKAGENAME | The application package name which is written at AndroidManifest.xml
Type: String Require Field: true |
|||||||||
String | KEY_BACKGROUND_RESID | The pen background image resource id
Type: int Require Field: false |
|||||||||
String | KEY_COLOR_ADJUSTABLE | The user can change pen width or not
Type: boolean Require Field: true Default Value: true |
|||||||||
String | KEY_COLOR_DEFAULT | The default pen color
Type: int Require Field: true Default Value: Color.BLACK |
|||||||||
String | KEY_DISPLAY_NAME_RESID | The pen display name resource id
Type: long Require Field: true |
|||||||||
String | KEY_FIXED_WIDTH_ARRAY | Current pen tool box only support 5 width, if this value is set,
PIM will use these width values
Type: float[] Require Field: false |
|||||||||
String | KEY_FLAGS | Some basic flags
Type: int Require Field: true Default Value: 0x0000 |
|||||||||
String | KEY_PEN_CLASSNAME | The classname which inherits com.htc.painting.tool.pen.Pen
Type: String Require Field: true |
|||||||||
String | KEY_PEN_DISABLE_IMAGE_RESID | The pen disable image resource id
Type: int Require Field: false |
|||||||||
String | KEY_PEN_NAME | The pen unique name
Type: String Require Field: true |
|||||||||
String | KEY_SUPPORTED_COLOR_ARRAY | if this value is set, PIM will use these color values only
Type: int[] Require Field: false |
|||||||||
String | KEY_THUMBNAIL_RESID | The pen thumbnail resource id
Type: int Require Field: false |
|||||||||
String | KEY_TRANSPARENCY_ADJUSTABLE | The user can adjust pen transparency or not
Type: boolean Require Field: true Default Value: false |
|||||||||
String | KEY_TRANSPARENCY_ALPHA_DEFAULT | The transparency alpha value
Type: int Require Field: true Default Value: 0 Value: 0-255 (follow skia design) |
|||||||||
String | KEY_VERSION | This pen version, we can use this version info to know that we shall use new pen to replace old pen or not. | |||||||||
String | KEY_WIDTH_ADJUSTABLE | The user can change pen width or not
Type: boolean Require Field: true Default Value: true |
|||||||||
String | KEY_WIDTH_DEFAULT | The default pen width
Type: float Require Field: true Default Value: 25 |
|||||||||
String | KEY_WIDTH_MAX | The maximum available pen width
Type: float Require Field: true Default Value: 20 |
|||||||||
String | KEY_WIDTH_MIN | The minimum available pen width
Type: float Require Field: true Default Value: 1 |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
mMap |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Default constructor
| |||||||||||
Constructor with binary property map
| |||||||||||
Constructor with PenProps
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Make sure that all key which is declared at this class has been set.
| |||||||||||
This key has been set or not
| |||||||||||
Compares the specified object to this instance, and returns
true
if the specified object is a PenProps and both PenProps contain the same
PenProps. | |||||||||||
Returns the value associated with the given key, or false if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or null if
no mapping of the desired type exists for the given key or a null
value is explicitly associated with the key.
| |||||||||||
Returns the value associated with the given key, or (byte) 0 if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or null if
no mapping of the desired type exists for the given key or a null
value is explicitly associated with the key.
| |||||||||||
Returns the value associated with the given key, or false if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or (char) 0 if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or null if
no mapping of the desired type exists for the given key or a null
value is explicitly associated with the key.
| |||||||||||
Returns the value associated with the given key, or 0.0 if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or null if
no mapping of the desired type exists for the given key or a null
value is explicitly associated with the key.
| |||||||||||
Returns the value associated with the given key, or 0.0f if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or null if
no mapping of the desired type exists for the given key or a null
value is explicitly associated with the key.
| |||||||||||
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or 0 if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or null if
no mapping of the desired type exists for the given key or a null
value is explicitly associated with the key.
| |||||||||||
Returns the value associated with the given key, or 0L if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or null if
no mapping of the desired type exists for the given key or a null
value is explicitly associated with the key.
| |||||||||||
Returns the value associated with the given key, or (short) 0 if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or defaultValue if
no mapping of the desired type exists for the given key.
| |||||||||||
Returns the value associated with the given key, or null if
no mapping of the desired type exists for the given key or a null
value is explicitly associated with the key.
| |||||||||||
Returns the value associated with the given key, or null if
no mapping of the desired type exists for the given key or a null
value is explicitly associated with the key.
| |||||||||||
Returns the value associated with the given key, or null if
no mapping of the desired type exists for the given key or a null
value is explicitly associated with the key.
| |||||||||||
Inserts a Boolean value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a boolean array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a byte value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a byte array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a char value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a char array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a double value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a double array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a float value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a float array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts an int value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts an int array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a long value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a long array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a short value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a short array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a String value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Inserts a String array value into the mapping of this Bundle, replacing
any existing value for the given key.
| |||||||||||
Remove specific key if exist
| |||||||||||
Returns the number of mappings.
| |||||||||||
Transform key-value data into byte array
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Inserts a value into the mapping of this Bundle, replacing any
existing value for the given key.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Flag which is used at KEY_FLAGS
Set it to KEY_FLAGS if this pen is the default pen
Flag which is used at KEY_FLAGS
Set it to KEY_FLAGS if this pen is an eraser
Flag which is used at KEY_FLAGS
Set it to KEY_FLAGS if this pen is the default pen
Flag which is used at KEY_FLAGS
Set it to KEY_FLAGS if this pen is also an interface of IRenderSupplier
Flag which is used at KEY_FLAGS
Set it to KEY_FLAGS if this pen is a simple pen
The application package name which is written at AndroidManifest.xml
Type: String
Require Field: true
The pen background image resource id
Type: int
Require Field: false
The user can change pen width or not
Type: boolean
Require Field: true
Default Value: true
The default pen color
Type: int
Require Field: true
Default Value: Color.BLACK
The pen display name resource id
Type: long
Require Field: true
Current pen tool box only support 5 width, if this value is set, PIM will use these width values
Type: float[]
Require Field: false
Some basic flags
Type: int
Require Field: true
Default Value: 0x0000
The classname which inherits com.htc.painting.tool.pen.Pen
Type: String
Require Field: true
The pen disable image resource id
Type: int
Require Field: false
The pen unique name
Type: String
Require Field: true
if this value is set, PIM will use these color values only
Type: int[]
Require Field: false
The pen thumbnail resource id
Type: int
Require Field: false
The user can adjust pen transparency or not
Type: boolean
Require Field: true
Default Value: false
The transparency alpha value
Type: int
Require Field: true
Default Value: 0
Value: 0-255 (follow skia design)
This pen version, we can use this version info to know that we shall use new pen to replace old pen or not.
Type: int
Require Field: true
The user can change pen width or not
Type: boolean
Require Field: true
Default Value: true
The default pen width
Type: float
Require Field: true
Default Value: 25
The maximum available pen width
Type: float
Require Field: true
Default Value: 20
The minimum available pen width
Type: float
Require Field: true
Default Value: 1
Constructor with binary property map
bProperties | a byte[], or null |
---|
Make sure that all key which is declared at this class has been set.
PenException |
---|
This key has been set or not
key | a String, or null |
---|
Compares the specified object to this instance, and returns true
if the specified object is a PenProps and both PenProps contain the same
PenProps.
object | the object to compare with this object. |
---|
true
if the object is the same as this object,
and false
if it is different from this object.
Returns the value associated with the given key, or false if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
key | a String, or null |
---|
Returns the value associated with the given key, or (byte) 0 if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
key | a String, or null |
---|
Returns the value associated with the given key, or false if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or (char) 0 if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
key | a String, or null |
---|
Returns the value associated with the given key, or 0.0 if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
key | a String, or null |
---|
Returns the value associated with the given key, or 0.0f if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
key | a String, or null |
---|
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or 0 if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
key | a String, or null |
---|
Returns the value associated with the given key, or 0L if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
key | a String, or null |
---|
Returns the value associated with the given key, or (short) 0 if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or defaultValue if no mapping of the desired type exists for the given key.
key | a String |
---|
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
key | a String, or null |
---|
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
key | a String, or null |
---|
Returns the value associated with the given key, or null if no mapping of the desired type exists for the given key or a null value is explicitly associated with the key.
key | a String, or null |
---|
Inserts a Boolean value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a Boolean, or null |
PenException |
---|
Inserts a boolean array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a boolean array object, or null |
PenException |
---|
Inserts a byte value into the mapping of this Bundle, replacing any existing value for the given key.
key | a String, or null |
---|---|
value | a byte |
PenException |
---|
Inserts a byte array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a byte array object, or null |
PenException |
---|
Inserts a char value into the mapping of this Bundle, replacing any existing value for the given key.
key | a String, or null |
---|---|
value | a char, or null |
PenException |
---|
Inserts a char array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a char array object, or null |
PenException |
---|
Inserts a double value into the mapping of this Bundle, replacing any existing value for the given key.
key | a String, or null |
---|---|
value | a double |
PenException |
---|
Inserts a double array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a double array object, or null |
PenException |
---|
Inserts a float value into the mapping of this Bundle, replacing any existing value for the given key.
key | a String, or null |
---|---|
value | a float |
PenException |
---|
Inserts a float array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a float array object, or null |
PenException |
---|
Inserts an int value into the mapping of this Bundle, replacing any existing value for the given key.
key | a String, or null |
---|---|
value | an int, or null |
PenException |
---|
Inserts an int array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | an int array object, or null |
PenException |
---|
Inserts a long value into the mapping of this Bundle, replacing any existing value for the given key.
key | a String, or null |
---|---|
value | a long |
PenException |
---|
Inserts a long array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a long array object, or null |
PenException |
---|
Inserts a short value into the mapping of this Bundle, replacing any existing value for the given key.
key | a String, or null |
---|---|
value | a short |
PenException |
---|
Inserts a short array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a short array object, or null |
PenException |
---|
Inserts a String value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a String, or null |
PenException |
---|
Inserts a String array value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|---|
value | a String array object, or null |
PenException |
---|
Remove specific key if exist
key | a String, or null |
---|
Returns the number of mappings.
Transform key-value data into byte array
Inserts a value into the mapping of this Bundle, replacing any existing value for the given key. Either key or value may be null.
key | a String, or null |
---|
PenException |
---|