Source code: com/flexstor/common/awt/event/SettingsEventI.java
1 /*
2 * SettingsEventI.java
3 *
4 * Copyright $Date: 2003/08/11 02:22:42 $ FLEXSTOR.net Inc.
5 *
6 * This work is licensed for use and distribution under license terms found at
7 * http://www.flexstor.org/license.html
8 *
9 */
10
11 package com.flexstor.common.awt.event;
12
13 import java.awt.Component;
14
15 /**
16 Base interface for any kind of event generated in Address Book Viewer,
17 Send Settings Dialog and may be any other component related to setting.
18 */
19
20 public interface SettingsEventI
21 {
22 //Followings are the type of events generated by the components.
23 public final static int EMAIL_EVENT = 1;
24 public final static int FTP_EVENT = 2;
25 public final static int SEND_SETTINGS_EVENT = 2;
26 public final static int IMPORT_SETTINGS_EVENT = 3;
27
28 //Followings event id's.
29
30 //New address added added in component(eg Address Book Component).
31 public final static int NEW_ADDRESS = 50;
32 //New address selected on component(eg Address Book Component).
33 public final static int NEW_SELECTION = 51;
34 //if data updated.
35 public final static int DATA_UPDATED = 52;
36 //on data delettion.
37 public final static int DATA_DELETED = 53;
38 //Canceling the action.
39 public final static int ACTION_CANCELED = 54;
40 //For refreshing the component with the fresh data got from database.
41 public final static int DATA_REFRESHED = 55;
42 //for example this may be used for readio buttons or check boxes on component.
43 public final static int COMPONENT_STATE_CHANGED = 56 ;
44
45 /**
46 * returns the source component of the event.
47 * @return Component.
48 */
49 public Component getSourceComponent();
50
51 /**
52 * returns the event type of the event.
53 * @return int event type.
54 */
55 public int getEventType();
56
57 /**
58 * returns the event id of the event.
59 * @return int event id.
60 */
61 public int getEventId();
62
63 /**
64 * sets the source component of the event.
65 * @param Component.
66 */
67 public void setSourceComponent(Component c);
68
69 /**
70 * sets the event type of the event.
71 * @param int event type.
72 */
73 public void setEventType(int type);
74
75 /**
76 * sets the event id of the event.
77 * @param int event id.
78 */
79 public void setEventId(int id);
80
81
82
83
84 }