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: * ScriptedFocusListener 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 ScriptedFocusListener extends ScriptedListener implements
19: FocusListener {
20: public final static String FOCUS_GAINED = "onfocus";
21: public final static String FOCUS_LOST = "onblur";
22:
23: /**
24: * Construct a listener with the script content type.
25: */
26: public ScriptedFocusListener(String contentType) {
27: super (contentType);
28: }
29:
30: /**
31: * Get the focus Gained Script.
32: */
33: public Object getFocusGainedScript() {
34: return get(FOCUS_GAINED);
35: }
36:
37: /**
38: * Get the focus Gained Script.
39: */
40: public ScriptedFocusListener setFocusGainedScript(
41: Object focusGainedScript) {
42: put(FOCUS_GAINED, focusGainedScript);
43: return this ;
44: }
45:
46: /**
47: * Get the focus Lost Script.
48: */
49: public Object getFocusLostScript() {
50: return get(FOCUS_LOST);
51: }
52:
53: /**
54: * Get the focus Lost Script.
55: */
56: public ScriptedFocusListener setFocusLostScript(
57: Object focusLostScript) {
58: put(FOCUS_LOST, focusLostScript);
59: return this ;
60: }
61:
62: // STUB EVENT HANDLERS /////////////////////////////////////////////////////
63:
64: public void focusGained(FocusEvent e) {
65: };
66:
67: public void focusLost(FocusEvent e) {
68: };
69:
70: // PRIVATE /////////////////////////////////////////////////////////////////
71:
72: }
|