|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.w3c.tools.resources.AttributeHolder
|
+--org.w3c.tools.resources.Resource
|
+--org.w3c.tools.resources.FramedResource
A FramedResource manage frames which are called during the lookup and the perform.
| Field Summary | |
protected static int |
ATTR_OID
Attribute index - The object identifier. |
protected AttributeChangedListener |
attrListener
Our AttributeChangedListener. |
protected boolean |
debugEvent
Debug flag |
protected boolean |
event_disabled
Do we handle events? |
protected java.util.Hashtable |
framesRef
Our frames references. |
protected StructureChangedListener |
structListener
Our StructureChangedListener. |
| Fields inherited from class org.w3c.tools.resources.Resource |
ATTR_CONTEXT,
ATTR_HELP_URL,
ATTR_IDENTIFIER,
ATTR_LAST_MODIFIED,
ATTR_PARENT,
ATTR_RESOURCE_FRAMES,
ATTR_STORE_ENTRY,
ATTR_URL |
| Fields inherited from class org.w3c.tools.resources.AttributeHolder |
attributes,
values |
| Constructor Summary | |
FramedResource()
|
|
| Method Summary | |
void |
addAttributeChangedListener(AttributeChangedListener l)
Add an attribute change listener. |
void |
addStructureChangedListener(StructureChangedListener l)
Add a structure change listener. |
ResourceReference[] |
collectFramesReference(java.lang.Class c)
Collect any frame reference pointing to an instance of the given class. |
void |
delete()
Delete this Resource instance, and remove it from its store. |
protected void |
disableEvent()
|
protected void |
displayEvent(FramedResource fr,
java.util.EventObject evt)
|
protected void |
enableEvent()
|
protected boolean |
eventDisabled()
|
protected void |
fireAttributeChangeEvent(AttributeChangedEvent evt)
Fire an attribute change event. |
protected void |
fireStructureChangedEvent(int type)
Fire an structure change event. |
protected void |
fireStructureChangedEvent(StructureChangedEvent evt)
Fire an structure change event. |
void |
frameAdded(FrameEvent evt)
This handles the FRAME_ADDED kind of events. |
void |
frameModified(FrameEvent evt)
This handles the FRAME_MODIFIED kind of events. |
void |
frameRemoved(FrameEvent evt)
A frame is about to be removed This handles the FRAME_REMOVED kind of events. |
java.lang.Object |
getClone(java.lang.Object[] values)
Clone this attribute holder, and init it with the given attributes. |
ResourceFrame |
getFrame(java.lang.Class c,
java.lang.String identifier)
Get the frame of the given class and identifier. |
ResourceFrame |
getFrame(java.lang.String classname)
Get the frame of the given class. |
ResourceReference |
getFrameReference(java.lang.Class c)
Get the first occurence of a frame of the given class. |
ResourceReference |
getFrameReference(ResourceFrame frame)
Get The FrameReference of the given frame, or null if the frame is not registered. |
ResourceReference[] |
getFramesReference()
Collect all frames references. |
int |
getOid()
Get this resource's object identifier. |
void |
initialize(java.lang.Object[] values)
Initialize the frames of that framed resource. |
boolean |
lookup(LookupState ls,
LookupResult lr)
Lookup the target resource. |
void |
markModified()
Mark this resource as having been modified. |
void |
notifyUnload()
This resource is being unloaded. |
ReplyInterface |
perform(RequestInterface request)
Perform the request. |
protected ReplyInterface |
performFrames(RequestInterface request)
Perform the request on all the frames of that resource. |
protected void |
postAttributeChangeEvent(int idx,
java.lang.Object newvalue)
post an attribute change event. |
void |
postEvent(ResourceEvent evt)
Post an Event in the Event Queue. |
protected void |
postStructureChangedEvent(int type)
post an structure change event. |
protected void |
postStructureChangedEvent(ResourceReference rr,
int type)
post an structure change event. |
void |
processEvent(ResourceEvent evt)
(AWT Like), dspatch the Event to all our listeners. |
void |
registerFrame(ResourceFrame frame,
java.util.Hashtable defs)
Initialize and attach a new ResourceFrame to that resource. |
protected void |
registerFrameIfNone(java.lang.String classname,
java.lang.String identifier)
Register a new ResourceFrame if none (from the same class) has been registered. |
void |
removeAttributeChangedListener(AttributeChangedListener l)
Remove an attribute change listener. |
void |
removeStructureChangedListener(StructureChangedListener l)
Remove a structure change listener. |
void |
setSilentValue(int idx,
java.lang.Object value)
Set a value, without posting event. |
void |
setSilentValue(java.lang.String name,
java.lang.Object value)
Set a value, without posting event. |
void |
setValue(int idx,
java.lang.Object value)
Set some of this resource attribute. |
void |
unregisterFrame(ResourceFrame frame)
Unregister a resource frame from the given resource. |
| Methods inherited from class org.w3c.tools.resources.Resource |
acceptUnload,
checkMultipleLock,
collectFrames,
getContext,
getFrame,
getFrames,
getHelpURL,
getHelpURL,
getIdentifier,
getLastModified,
getParent,
getResourceReference,
getServer,
getSpace,
getSpaceEntry,
getStoreEntry,
getURLPath,
getValue,
getValue,
isInitialized,
isUnloaded,
setContext,
setContext,
setValue,
updateAttributes |
| Methods inherited from class org.w3c.tools.resources.AttributeHolder |
definesAttribute,
definesAttribute,
getAttributes,
getBoolean,
getChar,
getClone,
getClone,
getDouble,
getFloat,
getInt,
getLong,
getString,
getValue,
initialize,
lookupAttribute,
pickleValues,
print,
setBoolean,
setChar,
setDouble,
setFloat,
setInt,
setLong,
setString,
setValue,
unsafeGetValue |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected final boolean debugEvent
protected boolean event_disabled
protected java.util.Hashtable framesRef
protected AttributeChangedListener attrListener
protected StructureChangedListener structListener
protected static int ATTR_OID
| Constructor Detail |
public FramedResource()
| Method Detail |
protected void disableEvent()
protected void enableEvent()
protected boolean eventDisabled()
public java.lang.Object getClone(java.lang.Object[] values)
values - Attribute values to overide in the clone.public int getOid()
protected void displayEvent(FramedResource fr,
java.util.EventObject evt)
public void frameAdded(FrameEvent evt)
FRAME_ADDED kind of events.evt - The FrameEvent.public void frameModified(FrameEvent evt)
FRAME_MODIFIED kind of events.evt - The event describing the change.public void frameRemoved(FrameEvent evt)
FRAME_REMOVED kind of events.evt - The event describing the change.
public void registerFrame(ResourceFrame frame,
java.util.Hashtable defs)
frame - An uninitialized ResourceFrame instance.defs - A default set of attribute values.
protected void registerFrameIfNone(java.lang.String classname,
java.lang.String identifier)
throws java.lang.ClassNotFoundException,
java.lang.IllegalAccessException,
java.lang.InstantiationException,
java.lang.ClassCastException
classname - The ResourceFrame classidentifier - The ResourceFrame identifierpublic void unregisterFrame(ResourceFrame frame)
frame - The frame to unregister from the resource.public ResourceReference[] getFramesReference()
public ResourceReference[] collectFramesReference(java.lang.Class c)
cls - The class of frames we are looking for.public ResourceReference getFrameReference(java.lang.Class c)
cls - The class of te frame to look for.public ResourceReference getFrameReference(ResourceFrame frame)
frame - The ResourceFrame.
public ResourceFrame getFrame(java.lang.Class c,
java.lang.String identifier)
cls - The class of frames we are looking for.identifier - the frame identifierpublic ResourceFrame getFrame(java.lang.String classname)
classname - the class namepublic void processEvent(ResourceEvent evt)
evt - The resourceEvent to dispatch.public void postEvent(ResourceEvent evt)
evt - The Event to post.public void addAttributeChangedListener(AttributeChangedListener l)
l - The new attribute change listener.public void removeAttributeChangedListener(AttributeChangedListener l)
l - The listener to remove.
protected void postAttributeChangeEvent(int idx,
java.lang.Object newvalue)
idx - The index of the attribute that has changed.newvalue - The new value for that attribute.protected void fireAttributeChangeEvent(AttributeChangedEvent evt)
evt - the AttributeChangedEvent to fire.public void addStructureChangedListener(StructureChangedListener l)
l - The new structure change listener.public void removeStructureChangedListener(StructureChangedListener l)
l - The listener to remove.
protected void postStructureChangedEvent(ResourceReference rr,
int type)
rr - the ResourceReference of the source.type - The type of the event.protected void postStructureChangedEvent(int type)
type - The type of the event.protected void fireStructureChangedEvent(int type)
type - The type of the event.protected void fireStructureChangedEvent(StructureChangedEvent evt)
evt - the StructureChangedEvent to fire.public void notifyUnload()
public void delete()
throws MultipleLockException
public void markModified()
public void setValue(int idx,
java.lang.Object value)
idx - The index of the attribute to modify.value - The new attribute value.
public void setSilentValue(int idx,
java.lang.Object value)
idx - The attribute index, in the list of attributes advertized by
the resource.value - The new value for this attribute.
public void setSilentValue(java.lang.String name,
java.lang.Object value)
name - The attribute name.value - The new value for the attribute.
public boolean lookup(LookupState ls,
LookupResult lr)
throws ProtocolException
ls - The current lookup statelr - The result
protected ReplyInterface performFrames(RequestInterface request)
throws ProtocolException,
ResourceException
request - A RequestInterface instance.
public ReplyInterface perform(RequestInterface request)
throws ProtocolException,
ResourceException
public void initialize(java.lang.Object[] values)
values - Default attribute values.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||