public class ActivityBag extends Object implements Editable, Domable, MediaBag.Listener
JClicProject.
The collection is managed through a private ArrayList of objects
of type ActivityBagElement.| Modifier and Type | Field and Description |
|---|---|
static String |
ELEMENT_NAME
The name of the XML elements of type ActivityBag
|
protected JClicProject |
project
The project that this ActivityBag belongs to
|
| Constructor and Description |
|---|
ActivityBag(JClicProject project)
Creates new ActivityBag
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
activityExists(String name) |
void |
addActivity(Activity act) |
void |
addElement(ActivityBagElement el) |
void |
addJDomElement(Element e) |
ActivityBagElement |
elementAt(int index) |
Editor |
getEditor(Editor parent)
Returns the
Editor associated to this object. |
ActivityBagElement |
getElement(String name) |
ActivityBagElement |
getElementByName(String name) |
int |
getElementIndex(String name) |
ActivityBagElement[] |
getElements() |
Element |
getJDomElement() |
JClicProject |
getProject()
Returns the project this ActiivityBag belongs to
|
void |
insertElementAt(ActivityBagElement el,
int index) |
void |
listReferences(String type,
Map<String,String> map) |
void |
listReferencesTo(String name,
String type,
Map<String,String> map) |
boolean |
removeElement(ActivityBagElement el) |
void |
removeElementAt(int index) |
void |
removeElementByName(String name) |
void |
setProperties(Element e,
Object aux) |
int |
size() |
void |
sortByClassAndName() |
void |
sortByName() |
protected JClicProject project
public static final String ELEMENT_NAME
public ActivityBag(JClicProject project)
project - The project this ActivityBag belongs topublic JClicProject getProject()
public int size()
public ActivityBagElement elementAt(int index) throws ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsExceptionpublic void insertElementAt(ActivityBagElement el, int index) throws ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsExceptionpublic void removeElementAt(int index)
throws ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsExceptionpublic void addElement(ActivityBagElement el)
public boolean removeElement(ActivityBagElement el)
public int getElementIndex(String name)
public ActivityBagElement getElementByName(String name)
public ActivityBagElement getElement(String name) throws Exception
Exceptionpublic boolean activityExists(String name)
public Element getJDomElement()
getJDomElement in interface Domablepublic void addActivity(Activity act)
public void addJDomElement(Element e)
public ActivityBagElement[] getElements()
public void sortByName()
public void sortByClassAndName()
public void setProperties(Element e, Object aux) throws Exception
setProperties in interface DomableExceptionpublic void removeElementByName(String name)
public Editor getEditor(Editor parent)
EditableEditor associated to this object.public void listReferencesTo(String name, String type, Map<String,String> map)
listReferencesTo in interface MediaBag.Listenerpublic void listReferences(String type, Map<String,String> map)
listReferences in interface MediaBag.ListenerCopyright © 2004-15 Francesc Busquets (fbusquets@xtec.cat) & Departament d'Educació de la Generalitat de Catalunya (info@xtec.cat)
Licensed under the terms of the GNU General Public License.