public class UserIcon
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
IconsetPath
Iconset path is 3-tuple formatted as:
|
static java.lang.String[][] |
META_DATA_LABELS |
Constructor and Description |
---|
UserIcon()
Default Constructor
|
UserIcon(int id,
java.lang.String iconsetUid,
java.lang.String group,
java.lang.String fileName,
java.lang.String cotType,
android.graphics.Bitmap bitmap,
int usecnt) |
Modifier and Type | Method and Description |
---|---|
static android.graphics.Bitmap |
decodeBitMap(byte[] blob) |
boolean |
equals(java.lang.Object rhs) |
java.lang.String |
get2525cType() |
android.graphics.Bitmap |
getBitMap() |
java.lang.String |
getFileName() |
java.lang.Object |
getFromMetaDataLabel(java.lang.String label) |
java.lang.String |
getGroup() |
static UserIcon |
GetIcon(java.lang.String query,
boolean bBitmap,
android.content.Context context)
Get Bitmap based on query created via GetIconBitmapQuery
|
static android.graphics.Bitmap |
GetIconBitmap(java.lang.String queryUri,
android.content.Context context)
Get Bitmap based on query created via GetIconBitmapQuery
|
java.lang.String |
getIconBitmapQuery() |
static java.lang.String |
GetIconBitmapQuery(int id)
Create an optimized query based on id (indexed primary key), query
only returns "bitmap" column
|
static java.lang.String |
GetIconBitmapQueryFromIconsetPath(java.lang.String iconsetPath,
android.content.Context context)
Lookup icon and create an optimzed bitmap query
|
static byte[] |
GetIconBytes(java.lang.String queryUri,
android.content.Context context)
Get Bitmap based on query created via GetIconBitmapQuery
|
static UserIcon |
GetIconFromIconsetPath(java.lang.String iconsetPath,
boolean bBitmap,
android.content.Context context)
Lookup icon based on iconset
|
static int |
GetIconID(java.lang.String query)
Get icon ID based on query created via GetIconBitmapQuery
|
java.lang.String |
getIconsetPath()
Get iconset path uniquely describing this icon
|
static java.lang.String |
GetIconsetPath(java.lang.String iconsetUid,
java.lang.String group,
java.lang.String fileName) |
java.lang.String |
getIconsetUid() |
int |
getId() |
static MapGroup |
GetOrAddSubGroup(MapGroup group,
java.lang.String iconsetPath,
android.content.Context context)
Get subgroup for the specified iconset path
|
int |
getUseCount() |
int |
hashCode() |
boolean |
isValid() |
static boolean |
IsValidIconsetPath(java.lang.String iconsetPath,
boolean requireDatabaseMatch,
android.content.Context context)
Check if iconset is well-formed and references an icon currently stored
on this device.
|
static boolean |
IsValidIconsetPath(java.lang.String iconsetPath,
android.content.Context context)
Check if iconset is well-formed and references an icon currently stored
on this device.
|
void |
set2525cType(java.lang.String t) |
void |
setBitMap(android.graphics.Bitmap bitMap) |
void |
setFileName(java.lang.String fileName) |
void |
setGroup(java.lang.String group) |
static void |
setGroupIcon(MapGroup group,
java.lang.String groupFilter,
android.content.Context context) |
void |
setIconsetUid(java.lang.String uid) |
void |
setId(int id) |
void |
setUseCount(int useCnt) |
java.lang.String |
toString() |
public static final java.lang.String IconsetPath
public static final java.lang.String[][] META_DATA_LABELS
public UserIcon()
public UserIcon(int id, java.lang.String iconsetUid, java.lang.String group, java.lang.String fileName, java.lang.String cotType, android.graphics.Bitmap bitmap, int usecnt)
public static boolean IsValidIconsetPath(java.lang.String iconsetPath, boolean requireDatabaseMatch, android.content.Context context)
iconsetPath
- requireDatabaseMatch
- public static boolean IsValidIconsetPath(java.lang.String iconsetPath, android.content.Context context)
iconsetPath
- public java.lang.Object getFromMetaDataLabel(java.lang.String label)
public int getId()
public void setId(int id)
public java.lang.String getIconsetUid()
public void setIconsetUid(java.lang.String uid)
public java.lang.String getFileName()
public void setFileName(java.lang.String fileName)
public java.lang.String get2525cType()
public void set2525cType(java.lang.String t)
public android.graphics.Bitmap getBitMap()
public void setBitMap(android.graphics.Bitmap bitMap)
public int getUseCount()
public void setUseCount(int useCnt)
public java.lang.String getGroup()
public void setGroup(java.lang.String group)
public boolean isValid()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object rhs)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getIconBitmapQuery()
public static java.lang.String GetIconBitmapQuery(int id)
id
- public java.lang.String getIconsetPath()
public static java.lang.String GetIconsetPath(java.lang.String iconsetUid, java.lang.String group, java.lang.String fileName)
public static UserIcon GetIconFromIconsetPath(java.lang.String iconsetPath, boolean bBitmap, android.content.Context context)
iconsetPath
- the iconset path that describes a iconset icon starting with the uuid for
the iconset and then the path.bBitmap
- if the bitmap is required in the returnpublic static java.lang.String GetIconBitmapQueryFromIconsetPath(java.lang.String iconsetPath, android.content.Context context)
iconsetPath
- the iconset path that describes a iconset icon starting with the uuid for
the iconset and then the path.context
- to use when getting the UserIconDatabasepublic static MapGroup GetOrAddSubGroup(MapGroup group, java.lang.String iconsetPath, android.content.Context context)
group
- iconsetPath
- context
- public static void setGroupIcon(MapGroup group, java.lang.String groupFilter, android.content.Context context)
public static byte[] GetIconBytes(java.lang.String queryUri, android.content.Context context)
queryUri
- public static android.graphics.Bitmap GetIconBitmap(java.lang.String queryUri, android.content.Context context)
queryUri
- the uri to use for getting the bitmap.public static int GetIconID(java.lang.String query)
query
- public static UserIcon GetIcon(java.lang.String query, boolean bBitmap, android.content.Context context)
query
- bBitmap
- public static android.graphics.Bitmap decodeBitMap(byte[] blob)