com.taursys.xml.event
Class ParameterDispatcher

java.lang.Object
  extended bycom.taursys.xml.event.Dispatcher
      extended bycom.taursys.xml.event.ParameterDispatcher

public class ParameterDispatcher
extends Dispatcher

ParameterDispatcher is a Dispatcher for ParameterEvents.

Version:
1.0
Author:
Marty Phelan

Field Summary
 
Fields inherited from class com.taursys.xml.event.Dispatcher
components, map
 
Constructor Summary
ParameterDispatcher()
          Constructs a new ParameterDispatcher
 
Method Summary
 void dispatchToComponent(Component c)
          Dispatches a ParameterEvent to the given component.
 
Methods inherited from class com.taursys.xml.event.Dispatcher
addNotify, dispatch, dispatch, dispatch, getIndex, getParameter, getParentDispatcher, getParentIndex, incrementIndex, removeNotify, resetIndex, setParentDispatcher
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterDispatcher

public ParameterDispatcher()
Constructs a new ParameterDispatcher

Method Detail

dispatchToComponent

public void dispatchToComponent(Component c)
                         throws java.lang.Exception

Dispatches a ParameterEvent to the given component. If the given Component is a Container, a ParameterEvent with the entire value map is dispatched. If the given Component is a Parameter then normal dispatching occurs (see following). If the given Component is neither of the above two types, then no dispatching occurs.

A components will only be dispatched its own input as specified by its parameter property. If the component's parameter is present, then the event will contain that value. If the parameter is NOT present, AND the component's defaultValue is set, then the event will contain the defaultValue. If the parameter is NOT present and defaultValue is NULL, no event will be dispatched.

Specified by:
dispatchToComponent in class Dispatcher
Parameters:
c - the Component to dispatch to
Throws:
java.lang.Exception - from the components dispatchEvent method if occurs.


Copyright © 2007 Martin T Phelan. All Rights Reserved.