edu.umd.cfar.lamp.apploader.propertysheets
Class DescriberBasedProperties

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byedu.umd.cfar.lamp.apploader.misc.FlattenedList
              extended byedu.umd.cfar.lamp.apploader.propertysheets.DescriberBasedProperties
All Implemented Interfaces:
java.util.Collection, InstancePropertyList, java.util.List
Direct Known Subclasses:
AttrConfigExtensions, ForClassPropertyList

public abstract class DescriberBasedProperties
extends FlattenedList
implements InstancePropertyList

A set of properties for an object that are specified in the preferences.


Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
DescriberBasedProperties()
          Creates a new, empty set of properties.
DescriberBasedProperties(java.util.List inside)
          Create a new AllProperties list that uses the given child InstancePropertyLists.
 
Method Summary
 void addChangeListener(javax.swing.event.ChangeListener l)
          Adds a listener for changes to the watched properties.
 void addListenersFor(com.hp.hpl.jena.rdf.model.Resource describer)
          Gets all the listeners types associated with the given resource and adds instances of them (through dynamic proxying) to the current instance object.
 void clear()
          Removes all properties, and listeners for changes to those properties.
abstract  java.util.Collection getAllDescribers()
          Gets all property describers.
 javax.swing.event.ChangeListener[] getChangeListeners()
          Gets all current change listeners.
 void getExplicitPropertiesFor(com.hp.hpl.jena.rdf.model.Resource describer)
          Gets all the explicit properties associated with the given resource and adds them to this.
 void getExtendedPropertiesFor(com.hp.hpl.jena.rdf.model.Resource describer)
          Gets all the extended properties associated with the given resource and the current instance object and adds them to this.
 java.lang.Object getObject()
          Gets the current instance object.
 PrefsManager getPrefs()
          Gets the application preferences associated with this properties object.
protected  void justSetObject(java.lang.Object o)
          Sets the instance object, but assumes that it has all the old properties as the last one and doesn't refresh or reset anything.
protected  void parsePropertyDescriber(com.hp.hpl.jena.rdf.model.Resource describer)
          Sets up the describer-based properties using the current instance object and the passed props:Describer
 void refresh()
          Refreshes the extended attributes, but nothing else.
protected  void refreshChildren()
          Refreshes all of the child property lists (extended properties).
 void removeChangeListener(javax.swing.event.ChangeListener l)
          Removes a listener for changes to the watched properties.
 void reset()
          A harsher form of refresh, this also changes the extensions and resets the listeners.
protected  void resetChildren()
          Resets all of the child property lists (extended properties).
 void setObject(java.lang.Object o)
          Sets the object and resets the list of properties.
 void setPrefs(PrefsManager manager)
          Sets the application preferences associated with this properties object.
 
Methods inherited from class edu.umd.cfar.lamp.apploader.misc.FlattenedList
get, getInnerList, isEmpty, iterator, setInnerList, size
 
Methods inherited from class java.util.AbstractList
add, add, addAll, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
 
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
add, add, addAll, addAll, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, retainAll, set, size, subList, toArray, toArray
 

Constructor Detail

DescriberBasedProperties

public DescriberBasedProperties()
Creates a new, empty set of properties.


DescriberBasedProperties

public DescriberBasedProperties(java.util.List inside)
Create a new AllProperties list that uses the given child InstancePropertyLists.

Parameters:
inside - The property lists to aggregate
Method Detail

clear

public void clear()
Removes all properties, and listeners for changes to those properties.

Specified by:
clear in interface java.util.List
Overrides:
clear in class FlattenedList
See Also:
List.clear()

reset

public void reset()
A harsher form of refresh, this also changes the extensions and resets the listeners.


resetChildren

protected void resetChildren()
Resets all of the child property lists (extended properties).


refreshChildren

protected void refreshChildren()
Refreshes all of the child property lists (extended properties).


justSetObject

protected void justSetObject(java.lang.Object o)
Sets the instance object, but assumes that it has all the old properties as the last one and doesn't refresh or reset anything.

Parameters:
o - The new instance object.

setObject

public void setObject(java.lang.Object o)
Sets the object and resets the list of properties.

Specified by:
setObject in interface InstancePropertyList
Parameters:
o - the object to set to

getObject

public java.lang.Object getObject()
Gets the current instance object.

Specified by:
getObject in interface InstancePropertyList
Returns:
the current instance object

getExplicitPropertiesFor

public void getExplicitPropertiesFor(com.hp.hpl.jena.rdf.model.Resource describer)
Gets all the explicit properties associated with the given resource and adds them to this.

Parameters:
describer - RDF resource that is a props:Describer

getExtendedPropertiesFor

public void getExtendedPropertiesFor(com.hp.hpl.jena.rdf.model.Resource describer)
Gets all the extended properties associated with the given resource and the current instance object and adds them to this.

Parameters:
describer - RDF resource that is a props:Describer

addListenersFor

public void addListenersFor(com.hp.hpl.jena.rdf.model.Resource describer)
Gets all the listeners types associated with the given resource and adds instances of them (through dynamic proxying) to the current instance object.

Parameters:
describer - RDF resource that is a props:Describer

parsePropertyDescriber

protected void parsePropertyDescriber(com.hp.hpl.jena.rdf.model.Resource describer)
Sets up the describer-based properties using the current instance object and the passed props:Describer

Parameters:
describer - a resource that is a props:Describer

getAllDescribers

public abstract java.util.Collection getAllDescribers()
Gets all property describers.

Returns:
the property describers for the object

addChangeListener

public void addChangeListener(javax.swing.event.ChangeListener l)
Adds a listener for changes to the watched properties.

Parameters:
l - the listener to add

removeChangeListener

public void removeChangeListener(javax.swing.event.ChangeListener l)
Removes a listener for changes to the watched properties.

Parameters:
l - the listener to remove

getChangeListeners

public javax.swing.event.ChangeListener[] getChangeListeners()
Gets all current change listeners.

Returns:
all current change listeners

getPrefs

public PrefsManager getPrefs()
Gets the application preferences associated with this properties object.

Returns:
The application preferences.

setPrefs

public void setPrefs(PrefsManager manager)
Sets the application preferences associated with this properties object.

Parameters:
manager - The application preferences

refresh

public void refresh()
Refreshes the extended attributes, but nothing else. (doesn't change explicit properties or listeners)

Specified by:
refresh in interface InstancePropertyList