KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > aspects > gui > web > CollectionListener


1 /*
2   Copyright (C) 2001 Laurent Martelli
3   
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as
6   published by the Free Software Foundation; either version 2 of the
7   License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   GNU Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public License
15   along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */

17
18 package org.objectweb.jac.aspects.gui.web;
19
20 /**
21  * This interface defines a callbacks used when events occur on a collection.
22  */

23
24 public interface CollectionListener {
25     /**
26      * Called when the user selects an item to view it.
27      *
28      * @param index the index of the element to view
29      */

30     void onView(int index);
31
32     /**
33      * Called when the user selects an item to view it.
34      *
35      * @param name the name of the object to view
36      *
37      * @see #onView(int)
38      */

39     void onViewObject(String JavaDoc name);
40
41     /**
42      * Called when the user selects an item to remove it.
43      *
44      * @param index the index of the element to remove
45      */

46     void onRemove(int index);
47
48     /**
49      * Called when a method is called on an object belonging to the
50      * collection.
51      * @param index the index of the element to view
52      * @param methodName the name of the method to invoke */

53     void onTableInvoke(int index,String JavaDoc methodName);
54
55     /**
56      * Called when the user wants to add an object to the collection.
57      * @see #onAddExistingToCollection()
58      */

59     void onAddToCollection();
60
61     /**
62      * Called when the user wants to add an object to the collection,
63      * without creating a new one even if the collection is "autocreate".
64      * @see #onAddToCollection() */

65     void onAddExistingToCollection();
66
67     /**
68      * Called when the user wants to remove an object to the collection.
69      */

70     void onRemoveFromCollection();
71
72     /**
73      * Display the next page of items
74      */

75     void onNext();
76
77     /**
78      * Display the previous page of items
79      */

80     void onPrevious();
81    
82     /**
83      * Display to the first page of items
84      */

85     void onFirst();
86
87     /**
88      * Display to the last page of items
89      */

90     void onLast();
91
92     /**
93      * Call when a parameter of the view has changed and the view
94      * should be refresh to take it into account.
95      */

96     void onRefreshCollection();
97 }
98
99
Popular Tags