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
ArrayIndexOutOfBoundsException
public void insertElementAt(ActivityBagElement el, int index) throws ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
public void removeElementAt(int index) throws ArrayIndexOutOfBoundsException
ArrayIndexOutOfBoundsException
public 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
Exception
public boolean activityExists(String name)
public Element getJDomElement()
getJDomElement
in interface Domable
public 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 Domable
Exception
public void removeElementByName(String name)
public Editor getEditor(Editor parent)
Editable
Editor
associated to this object.public void listReferencesTo(String name, String type, Map<String,String> map)
listReferencesTo
in interface MediaBag.Listener
public void listReferences(String type, Map<String,String> map)
listReferences
in interface MediaBag.Listener
Copyright © 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.