org.alltimeflashdreamer.filelister.xml
Class System

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.ArrayList
              extended byorg.alltimeflashdreamer.filelister.xml.AbstractConfigElementList
                  extended byorg.alltimeflashdreamer.filelister.xml.System
All Implemented Interfaces:
Cloneable, Collection, List, RandomAccess, Serializable

public class System
extends AbstractConfigElementList

Title: System

Description: The class representing the "system" tag in the config file.

Organization: All Time Flash Dreamer

Version:
0.5.1
Author:
Copyright (c) 2002-2004 by Florian Steinsiepe
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
System(Element element, boolean bLoadDefaults)
          Initializes the class based on the given element.
 
Method Summary
 ConfigElement getConfigElement(String sElementName)
          Returns the element with the given name.
 String getName()
          Returns the name of the list's underlying element.
 String getPropertyName(int iPosition)
          Returns the name of the ConfigElement at the given position.
 Object getPropertyValue(int iPosition)
          Returns the value of the ConfigElement at the given position.
 String getPropertyValue(String sName)
          Returns the value of the ConfigElement having the given name as a String .
 void setValues(FileListerTableModel model)
          Searches the model for the properties named "getName().
 
Methods inherited from class java.util.ArrayList
add, add, addAll, 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, remove, removeAll, 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, remove, removeAll, retainAll, subList
 

Constructor Detail

System

public System(Element element,
              boolean bLoadDefaults)
Initializes the class based on the given element.

Parameters:
element - the XML element named "system"
bLoadDefaults - whether to load the default values or not
Method Detail

getPropertyName

public String getPropertyName(int iPosition)
Returns the name of the ConfigElement at the given position. If this position is out of range, null is returned. The name is formatted like "<list-name>.<element-name>"

Parameters:
iPosition - the position of the wished element within the list
Returns:
the name of the ConfigElement at the given position or null

getPropertyValue

public Object getPropertyValue(int iPosition)
Returns the value of the ConfigElement at the given position. If this position is out of range, null is returned.

Parameters:
iPosition - the position of the wished element within the list
Returns:
the value of the ConfigElement at the given position or null

getPropertyValue

public String getPropertyValue(String sName)
Returns the value of the ConfigElement having the given name as a String . If this name isn't known, null is returned.

Parameters:
sName - the name of the wished element within the list
Returns:
the value of the ConfigElement having the given name or null

getName

public String getName()
Returns the name of the list's underlying element.

Returns:
the list name

getConfigElement

public ConfigElement getConfigElement(String sElementName)
Returns the element with the given name. If this element isn't found in the list, null is returned.

Parameters:
sElementName - a name specifying an ConfigElement instance
Returns:
the specified element or null

setValues

public void setValues(FileListerTableModel model)
Searches the model for the properties named "getName().<some-name>". The valueo of each such property is stored within the related ConfigElement, i.e. within the DOM itself.

Parameters:
model - the model to get the property names and values from