001: /*
002: * TesterBean.java --
003: *
004: * This is a tester JavaBean that tests the java::bind command.
005: *
006: * Copyright (c) 1997 Sun Microsystems, Inc.
007: *
008: * See the file "license.terms" for information on usage and
009: * redistribution of this file, and for a DISCLAIMER OF ALL
010: * WARRANTIES.
011: *
012: * RCS: @(#) $Id: TesterBean.java,v 1.1 1999/05/10 04:09:01 dejong Exp $
013: */
014:
015: package tcl.lang;
016:
017: import java.util.*;
018:
019: /*
020: * This is a tester JavaBean that tests the java::bind command.
021: */
022:
023: public class TesterBean {
024:
025: Tester1Listener t1;
026: Tester2Listener t2;
027:
028: public TesterBean() {
029: }
030:
031: public synchronized void addTester1Listener(Tester1Listener l) {
032: t1 = l;
033: }
034:
035: public synchronized void removeTester1Listener(Tester1Listener l) {
036: t1 = null;
037: }
038:
039: public synchronized void addTester2Listener(Tester2Listener l) {
040: t2 = l;
041: }
042:
043: public synchronized void removeTester2Listener(Tester2Listener l) {
044: t2 = null;
045: }
046:
047: public void fire0() {
048: Tester1Event evtObj = new Tester1Event(this );
049: t1.method0(evtObj);
050: }
051:
052: public void fire1(boolean b) {
053: t1.method1(b);
054: }
055:
056: public void fire2(boolean p0, byte p1, char p2, double p3,
057: float p4, int p5, long p6, short p7, String p8) {
058: t1.method2(p0, p1, p2, p3, p4, p5, p6, p7, p8);
059: }
060:
061: public void fire3(Tester1Event eventObj) throws SecurityException {
062: t1.method3(eventObj);
063: }
064:
065: public Vector fire4(Tester1Event eventObj, boolean b, int i,
066: Object o) throws SecurityException, NullPointerException,
067: NumberFormatException, IllegalAccessError {
068: return t1.method4(eventObj, b, i, o);
069: }
070:
071: public boolean fire_boolean(Tester1Event eventObj) {
072: return t1.method_boolean(eventObj);
073: }
074:
075: public byte fire_byte(Tester1Event eventObj) {
076: return t1.method_byte(eventObj);
077: }
078:
079: public char fire_char(Tester1Event eventObj) {
080: return t1.method_char(eventObj);
081: }
082:
083: public double fire_double(Tester1Event eventObj) {
084: return t1.method_double(eventObj);
085: }
086:
087: public float fire_float(Tester1Event eventObj) {
088: return t1.method_float(eventObj);
089: }
090:
091: public int fire_int(Tester1Event eventObj) {
092: return t1.method_int(eventObj);
093: }
094:
095: public long fire_long(Tester1Event eventObj) {
096: return t1.method_long(eventObj);
097: }
098:
099: public short fire_short(Tester1Event eventObj) {
100: return t1.method_short(eventObj);
101: }
102:
103: public Object fire_Object(Tester1Event eventObj) {
104: return t1.method_Object(eventObj);
105: }
106:
107: public String fire_String(Tester1Event eventObj) {
108: return t1.method_String(eventObj);
109: }
110:
111: public Vector fire_Vector(Tester1Event eventObj) {
112: return t1.method_Vector(eventObj);
113: }
114:
115: } // end TesterBean
|