FileDocCategorySizeDatePackage
MIDletSuiteInfo.javaAPI DocphoneME MR2 API (J2ME)4370Wed May 02 18:00:04 BST 2007com.sun.midp.midletsuite

MIDletSuiteInfo

public class MIDletSuiteInfo extends Object
Simple attribute storage for MIDlet suites

Fields Summary
public int
suiteId
ID of the MIDlet suite.
public int
storageId
ID of the storage where the MIDlet is installed.
public String
displayName
Display name of the MIDlet suite.
public String
midletToRun
Name of the MIDlet to run.
public int
numberOfMidlets
Is this single MIDlet MIDlet suite.
public boolean
enabled
Is this suite enabled.
public boolean
trusted
Is this suite trusted.
public boolean
preinstalled
Is this suite preinstalled.
public String
iconName
Icon's name for this suite.
Constructors Summary
public MIDletSuiteInfo(int theID)
Constructs a MIDletSuiteInfo object for a suite.

param
theID ID the system has for this suite


                         
       
        suiteId = theID;
    
public MIDletSuiteInfo(int theID, String theMidletToRun, String theDisplayName, boolean isEnabled)
Constructs a MIDletSuiteInfo object for a suite.

param
theID ID the system has for this suite
param
theMidletToRun Class name of the only midlet in the suite
param
theDisplayName Name to display to the user
param
isEnabled true if the suite is enabled

        suiteId = theID;
        midletToRun = theMidletToRun;
        displayName = theDisplayName;
        enabled = isEnabled;
    
public MIDletSuiteInfo(int theID, MIDletSuiteImpl theMidletSuite)
Constructs a MIDletSuiteInfo object for a suite.

param
theID ID the system has for this suite
param
theMidletSuite MIDletSuite information

        init(theID, theMidletSuite);

        numberOfMidlets = theMidletSuite.getNumberOfMIDlets();

        if (numberOfMidlets == 1) {
            MIDletInfo midlet =
                new MIDletInfo(theMidletSuite.getProperty("MIDlet-1"));

            midletToRun = midlet.classname;
        }
    
Methods Summary
public booleanhasSingleMidlet()
Checks if the midlet suite contains single or multiple midlets.

return
true is this midlet suite contains only one midlet, false otherwise

        return (numberOfMidlets == 1);
    
voidinit(int theID, MIDletSuiteImpl theMidletSuite)
Initializes MIDletSuiteInfo object.

param
theID ID the system has for this suite
param
theMidletSuite MIDletSuite information

        displayName =
            theMidletSuite.getProperty(MIDletSuiteImpl.SUITE_NAME_PROP);

        if (displayName == null) {
            displayName = String.valueOf(theID);
        }

        suiteId = theID;

        enabled = theMidletSuite.isEnabled();
    
public java.lang.StringtoString()
Returns a string representation of the MIDletSuiteInfo object. For debug only.

        StringBuffer b = new StringBuffer();
        b.append("id = " + suiteId);
        b.append(", midletToRun = " + midletToRun);
        return b.toString();