jview
Class SubComponentNotify
java.lang.Object
util.PropertyContainer
util.PropertyResources
util.PropertyBundles
util.rmi.RmiPropertyContainer
util.rmi.AbstractRmiCaster
jview.SubComponentNotify
- All Implemented Interfaces:
- Cloneable, Remote, SubComponentCaster, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, ResourceSupplying, RmiCaster, RmiPropertyBearing
- Direct Known Subclasses:
- JObjectDisplay.SubComponentHandler
public class SubComponentNotify
- extends AbstractRmiCaster
- implements SubComponentCaster
Skeleton implementation of a subcomponent caster. Allow registering
of listeners and provides a method for notifying all of them.
| Methods inherited from class util.rmi.AbstractRmiCaster |
bindAlternate, bindToRegistry, bindToRegistry, bindToRegistry, casterExit, casterExit, exit, getBindName, getBindName, isValid, unbindFromRegistry, unbindFromRegistry |
| Methods inherited from class util.PropertyResources |
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, init, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from interface util.PropertySupplying |
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
casting
private Class<?> casting
- The class of the subcomponent key.
ears
private List<SubComponentListener> ears
- The list of listeners.
SubComponentNotify
public SubComponentNotify(Map<String,String> prop,
SubComponent to)
throws RemoteException
- Constructs a new rmi-caster. The object is exported.
- Throws:
RemoteException
SubComponentNotify
protected SubComponentNotify(Map<String,String> prop,
Class<?> to)
throws RemoteException
- Constructs a new rmi-caster. The object is exported.
- Throws:
RemoteException
addSubComponentListener
public void addSubComponentListener(SubComponentListener notify)
throws RemoteException
- Registers a new sub-component listener. On registering, the current
view of the caster should be fired to the listener.
Whenever the caster's
component view changes, the listener is notified with its
SubComponentListner#newKey method.
- Specified by:
addSubComponentListener in interface SubComponentCaster
- Throws:
RemoteException
removeSubComponentListener
public void removeSubComponentListener(SubComponentListener notify)
throws RemoteException
- Deregisters a new sub-component listener. Is also done on dead
references.
- Specified by:
removeSubComponentListener in interface SubComponentCaster
- Throws:
RemoteException
respondTo
public Class<?> respondTo()
throws RemoteException
- For clients to check if this listener supports the right keys.
- Specified by:
respondTo in interface SubComponentCaster
- Throws:
RemoteException
fireKey
protected void fireKey(Object id)
- Called by the actual subcomponent if its view changed.