01: /*
02: * Copyright Javelin Software, All rights reserved.
03: */
04:
05: package com.javelin.swinglets.event;
06:
07: import java.awt.*;
08: import java.awt.event.*;
09:
10: /**
11: * ScriptedContainerListener is used to determine what happens when
12: * a Scripted Event happens, such as a JavaScript event on the client
13: * browser.
14: *
15: * @author Robin Sharp
16: */
17:
18: public class ScriptedContainerListener extends ScriptedListener
19: implements ContainerListener {
20: public final static String COMPONENT_ADDED = "onadd";
21: public final static String COMPONENT_REMOVED = "onremove";
22:
23: /**
24: * Construct a listener with the script content type.
25: */
26: public ScriptedContainerListener(String contentType) {
27: super (contentType);
28: }
29:
30: /**
31: * Get the component Added Script.
32: */
33: public Object getComponentAddedScript() {
34: return get(COMPONENT_REMOVED);
35: }
36:
37: /**
38: * Get the component Added Script.
39: */
40: public ScriptedContainerListener setComponentAddedScript(
41: Object componentAddedScript) {
42: put(COMPONENT_REMOVED, componentAddedScript);
43: return this ;
44: }
45:
46: /**
47: * Get the component Removed Script.
48: */
49: public Object getComponentRemovedScript() {
50: return get(COMPONENT_REMOVED);
51: }
52:
53: /**
54: * Get the component Removed Script.
55: */
56: public ScriptedContainerListener setComponentRemovedScript(
57: Object componentRemovedScript) {
58: put(COMPONENT_REMOVED, componentRemovedScript);
59: return this ;
60: }
61:
62: // STUB EVENT HANDLERS /////////////////////////////////////////////////////
63:
64: public void componentAdded(ContainerEvent e) {
65: };
66:
67: public void componentRemoved(ContainerEvent e) {
68: };
69:
70: // PRIVATE /////////////////////////////////////////////////////////////////
71:
72: }
|