01: /*
02: * Copyright Javelin Software, All rights reserved.
03: */
04:
05: package com.javelin.swinglets;
06:
07: import java.awt.*;
08: import java.util.*;
09: import java.io.*;
10:
11: /**
12: * SLink defines a timer, and an associated link.
13: *
14: * @author Robin Sharp
15: */
16:
17: public class STimer {
18: /**
19: * Creates a Timer, with a 1 second timeout.
20: */
21: public STimer() {
22: this .millis = 1000;
23: }
24:
25: /**
26: * Creates a Timer.
27: */
28: public STimer(int millis, SLink link) {
29: this .millis = millis;
30: this .link = link;
31: }
32:
33: /**
34: * Get the milliseconds
35: */
36: public int getMillis() {
37: return millis;
38: }
39:
40: /**
41: * Set the milliseconds before firing.
42: */
43: public STimer setMillis(int millis) {
44: this .millis = millis;
45: return this ;
46: }
47:
48: /**
49: * Get the link for the timer.
50: */
51: public SLink getLink() {
52: return link;
53: }
54:
55: /**
56: * Set the target frame for the link.
57: */
58: public STimer setLink(SLink link) {
59: this .link = link;
60: return this ;
61: }
62:
63: // PRIVATE ////////////////////////////////////////////////////////
64:
65: protected SLink link;
66: protected int millis;
67:
68: }
|