danger.app
Class ResourceDatabase

java.lang.Object
  |
  +--danger.app.ResourceDatabase
All Implemented Interfaces:
AppResources

public abstract class ResourceDatabase
extends java.lang.Object
implements AppResources


Field Summary
protected  ResourceDatabase mNext
           
static int RSRC_ALERT
           
static int RSRC_BITMAP
           
static int RSRC_BITMAP_ARRAY
           
static int RSRC_COMPRESSED
           
static int RSRC_DIALOG
           
static int RSRC_MENU
           
static int RSRC_SCREEN
           
static int RSRC_SEQUENCE
           
static int RSRC_SOUND
           
static int RSRC_STRING
           
static int RSRC_STRING_ARRAY
           
static int RSRC_STRINGTABLE
           
 
Fields inherited from interface danger.app.AppResources
ID_AppClass, ID_AppFlags, ID_AppName, ID_LargeIcon, ID_Locale, ID_SmallIcon, ID_SplashScreen
 
Constructor Summary
ResourceDatabase()
           
 
Method Summary
 void addMenuItemFromResource(BaseMenu menu, int id, int menuItemID, int eventData, java.lang.Object eventArg, Listener listener)
           
 void addToMenuFromResource(BaseMenu menu, int id, Listener listener, Window textEditBaseWindow)
           
 void addToWindowFromDialogResource(Window window, int id, Listener listener)
           
static void flush()
           
 StandardAlertWindow getAlert(int id)
           
 StandardAlertWindow getAlert(int id, Listener listener)
           
static java.lang.String[] getAvailableLocales()
           
 Bitmap getBitmap(int id)
          Obtain a specific bitmap resource or null if such a bitmap resource does not exist.
 DialogWindow getDialog(int id)
           
 DialogWindow getDialog(int id, Listener listener)
           
 int[] getIds(int wantedType)
           
 java.lang.String getLocaleString(java.lang.String inLocale, int id)
           
 Menu getMenu(int id)
           
 Menu getMenu(int id, Listener listener)
           
protected  Menu getMenu(int id, Listener listener, Window textEditBaseWindow)
           
 Resource getResource(int type, int id)
          Obtain a specific resource, locating it by type and id.
 java.io.InputStream getResourceStream(int type, int id)
          Obtain a specific resource, locating it by type and id.
 ScreenWindow getScreen(int id)
           
 ScreenWindow getScreen(int id, Listener listener)
           
 java.lang.String getString(int id)
          Obtain a specific string resource or the null string if such a string resource does not exist.
 java.lang.String[] getStringArray(int id)
           
static StandardAlertWindow getSysAlert(int id)
           
static StandardAlertWindow getSysAlert(int id, Listener listener)
           
static Bitmap getSysBitmap(int id)
           
static int[] getSysIds(int wantedType)
           
static java.lang.String getSysLocaleString(java.lang.String inLocale, int id)
           
static Resource getSysResource(int type, int id)
           
static java.lang.String getSysString(int id)
           
static java.lang.String[] getSysStringArray(int id)
           
protected  void init()
           
 ResourceDatabase sort()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mNext

protected ResourceDatabase mNext

RSRC_STRING

public static final int RSRC_STRING

RSRC_BITMAP

public static final int RSRC_BITMAP

RSRC_SOUND

public static final int RSRC_SOUND

RSRC_SEQUENCE

public static final int RSRC_SEQUENCE

RSRC_MENU

public static final int RSRC_MENU

RSRC_STRINGTABLE

public static final int RSRC_STRINGTABLE

RSRC_ALERT

public static final int RSRC_ALERT

RSRC_DIALOG

public static final int RSRC_DIALOG

RSRC_SCREEN

public static final int RSRC_SCREEN

RSRC_STRING_ARRAY

public static final int RSRC_STRING_ARRAY

RSRC_BITMAP_ARRAY

public static final int RSRC_BITMAP_ARRAY

RSRC_COMPRESSED

public static final int RSRC_COMPRESSED
Constructor Detail

ResourceDatabase

public ResourceDatabase()
Method Detail

init

protected void init()

getString

public java.lang.String getString(int id)
Obtain a specific string resource or the null string if such a string resource does not exist.

getSysString

public static java.lang.String getSysString(int id)

getStringArray

public java.lang.String[] getStringArray(int id)

getSysStringArray

public static java.lang.String[] getSysStringArray(int id)

getBitmap

public Bitmap getBitmap(int id)
Obtain a specific bitmap resource or null if such a bitmap resource does not exist.

getSysBitmap

public static Bitmap getSysBitmap(int id)

getMenu

public Menu getMenu(int id)

getMenu

public Menu getMenu(int id,
                    Listener listener)

getMenu

protected Menu getMenu(int id,
                       Listener listener,
                       Window textEditBaseWindow)

addToMenuFromResource

public void addToMenuFromResource(BaseMenu menu,
                                  int id,
                                  Listener listener,
                                  Window textEditBaseWindow)

addMenuItemFromResource

public void addMenuItemFromResource(BaseMenu menu,
                                    int id,
                                    int menuItemID,
                                    int eventData,
                                    java.lang.Object eventArg,
                                    Listener listener)

getAlert

public StandardAlertWindow getAlert(int id)

getAlert

public StandardAlertWindow getAlert(int id,
                                    Listener listener)

getSysAlert

public static StandardAlertWindow getSysAlert(int id)

getSysAlert

public static StandardAlertWindow getSysAlert(int id,
                                              Listener listener)

getScreen

public ScreenWindow getScreen(int id)

getScreen

public ScreenWindow getScreen(int id,
                              Listener listener)

addToWindowFromDialogResource

public void addToWindowFromDialogResource(Window window,
                                          int id,
                                          Listener listener)

getDialog

public DialogWindow getDialog(int id)

getDialog

public DialogWindow getDialog(int id,
                              Listener listener)

getResource

public Resource getResource(int type,
                            int id)
Obtain a specific resource, locating it by type and id.

getSysResource

public static Resource getSysResource(int type,
                                      int id)

getResourceStream

public java.io.InputStream getResourceStream(int type,
                                             int id)
Obtain a specific resource, locating it by type and id. Return the resource as a stream.

getIds

public int[] getIds(int wantedType)

getSysIds

public static int[] getSysIds(int wantedType)

sort

public final ResourceDatabase sort()

getAvailableLocales

public static final java.lang.String[] getAvailableLocales()

getLocaleString

public final java.lang.String getLocaleString(java.lang.String inLocale,
                                              int id)

getSysLocaleString

public static final java.lang.String getSysLocaleString(java.lang.String inLocale,
                                                        int id)

flush

public static void flush()


Danger Confidential. Copyright © 2000-2003, Danger Inc.