|
Mobile Tools for Java Release 1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<Configuration>
org.eclipse.mtj.core.model.configuration.Configurations
public class Configurations
This class is used to maintains configurations for Midlet project. Each Midlet project have one instance of this class. We retrieve the instance by IMidletSuiteProject#getConfigurations().
| Field Summary | |
|---|---|
static String |
ELEM_CONFIGURATION
The configuration element name the meta data xml file. |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
Configurations()
The constructor used for create Configurations for a Midlet project that have not yet configurations. |
|
Configurations(Element configsElement)
Construct Configurations from meta data XML file. |
|
| Method Summary | |
|---|---|
boolean |
add(Configuration config)
|
boolean |
addAll(Collection<? extends Configuration> configs)
|
void |
addConfigsChangeListener(IConfigurationsChangeListener listener)
|
Configuration |
getActiveConfiguration()
Get the active configuration. |
boolean |
remove(Object o)
|
boolean |
removeAll(Collection<?> configs)
|
void |
removeConfigsChangeListener(IConfigurationsChangeListener listener)
Note:Since instance of Configurations have a long life cycle (as long as the Midlet project), so we should remove listener manually when it no longer used. |
void |
switchActiveConfiguration(Configuration configuration)
Switch the current active configuration. |
| Methods inherited from class java.util.ArrayList |
|---|
add, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, retainAll, subList |
| Field Detail |
|---|
public static final String ELEM_CONFIGURATION
| Constructor Detail |
|---|
public Configurations()
public Configurations(Element configsElement)
throws PersistenceException
configsElement - - The <configurations> xml element.
PersistenceException| Method Detail |
|---|
public boolean add(Configuration config)
add in interface Collection<Configuration>add in interface List<Configuration>add in class ArrayList<Configuration>public boolean addAll(Collection<? extends Configuration> configs)
addAll in interface Collection<Configuration>addAll in interface List<Configuration>addAll in class ArrayList<Configuration>public void addConfigsChangeListener(IConfigurationsChangeListener listener)
public Configuration getActiveConfiguration()
public boolean remove(Object o)
remove in interface Collection<Configuration>remove in interface List<Configuration>remove in class ArrayList<Configuration>public boolean removeAll(Collection<?> configs)
removeAll in interface Collection<Configuration>removeAll in interface List<Configuration>removeAll in class AbstractCollection<Configuration>public void removeConfigsChangeListener(IConfigurationsChangeListener listener)
listener - public void switchActiveConfiguration(Configuration configuration)
configuration - - configuration to be set as active one.
|
Mobile Tools for Java Release 1.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||