4158 |
22 Feb 08 |
nicklas |
1 |
/** |
4158 |
22 Feb 08 |
nicklas |
$Id$ |
4158 |
22 Feb 08 |
nicklas |
3 |
|
4158 |
22 Feb 08 |
nicklas |
Copyright (C) Authors contributing to this file. |
4158 |
22 Feb 08 |
nicklas |
5 |
|
4158 |
22 Feb 08 |
nicklas |
This file is part of BASE - BioArray Software Environment. |
4158 |
22 Feb 08 |
nicklas |
Available at http://base.thep.lu.se/ |
4158 |
22 Feb 08 |
nicklas |
8 |
|
4158 |
22 Feb 08 |
nicklas |
BASE is free software; you can redistribute it and/or |
4158 |
22 Feb 08 |
nicklas |
modify it under the terms of the GNU General Public License |
4479 |
05 Sep 08 |
jari |
as published by the Free Software Foundation; either version 3 |
4158 |
22 Feb 08 |
nicklas |
of the License, or (at your option) any later version. |
4158 |
22 Feb 08 |
nicklas |
13 |
|
4158 |
22 Feb 08 |
nicklas |
BASE is distributed in the hope that it will be useful, |
4158 |
22 Feb 08 |
nicklas |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
4158 |
22 Feb 08 |
nicklas |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4158 |
22 Feb 08 |
nicklas |
GNU General Public License for more details. |
4158 |
22 Feb 08 |
nicklas |
18 |
|
4158 |
22 Feb 08 |
nicklas |
You should have received a copy of the GNU General Public License |
4515 |
11 Sep 08 |
jari |
along with BASE. If not, see <http://www.gnu.org/licenses/>. |
4158 |
22 Feb 08 |
nicklas |
21 |
*/ |
4158 |
22 Feb 08 |
nicklas |
22 |
package net.sf.basedb.util.extensions; |
4158 |
22 Feb 08 |
nicklas |
23 |
|
4158 |
22 Feb 08 |
nicklas |
24 |
/** |
4158 |
22 Feb 08 |
nicklas |
A renderer is an object that knows how to render an action |
4158 |
22 Feb 08 |
nicklas |
in the client interface. In the web client, this usually means |
4158 |
22 Feb 08 |
nicklas |
outputting some HTML. In other types of clients, this may |
4158 |
22 Feb 08 |
nicklas |
mean something completely different, such as creating a swing button, |
4158 |
22 Feb 08 |
nicklas |
or menu item. |
4158 |
22 Feb 08 |
nicklas |
30 |
|
4158 |
22 Feb 08 |
nicklas |
@author nicklas |
4158 |
22 Feb 08 |
nicklas |
@version 2.7 |
4158 |
22 Feb 08 |
nicklas |
@base.modified $Date$ |
4163 |
28 Feb 08 |
nicklas |
34 |
*/ |
4158 |
22 Feb 08 |
nicklas |
35 |
public interface Renderer<A extends Action> |
4158 |
22 Feb 08 |
nicklas |
36 |
{ |
4158 |
22 Feb 08 |
nicklas |
37 |
|
4158 |
22 Feb 08 |
nicklas |
38 |
/** |
4158 |
22 Feb 08 |
nicklas |
Render the action in the client application. |
4158 |
22 Feb 08 |
nicklas |
@param action The action to render |
8144 |
21 Apr 23 |
nicklas |
@deprecated In 3.19.8, implement the {@link #render(Action, Extension)} |
8144 |
21 Apr 23 |
nicklas |
method instead. This method will never be called from the BASE |
8144 |
21 Apr 23 |
nicklas |
core except for the default implementation of {@link #render(Action, Extension)}. |
4158 |
22 Feb 08 |
nicklas |
44 |
*/ |
8144 |
21 Apr 23 |
nicklas |
45 |
@Deprecated |
4158 |
22 Feb 08 |
nicklas |
46 |
public void render(A action); |
4158 |
22 Feb 08 |
nicklas |
47 |
|
8144 |
21 Apr 23 |
nicklas |
48 |
/** |
8144 |
21 Apr 23 |
nicklas |
Render the action in the client application. |
8144 |
21 Apr 23 |
nicklas |
<p> |
8144 |
21 Apr 23 |
nicklas |
The default implementation of this method simply call the {@link #render(Action)} |
8144 |
21 Apr 23 |
nicklas |
method. |
8144 |
21 Apr 23 |
nicklas |
53 |
|
8144 |
21 Apr 23 |
nicklas |
@param action The action to render |
8144 |
21 Apr 23 |
nicklas |
@since 3.19.8 |
8144 |
21 Apr 23 |
nicklas |
56 |
*/ |
8144 |
21 Apr 23 |
nicklas |
57 |
public default void render(A action, Extension<? extends A> ext) |
8144 |
21 Apr 23 |
nicklas |
58 |
{ |
8144 |
21 Apr 23 |
nicklas |
59 |
render(action); |
8144 |
21 Apr 23 |
nicklas |
60 |
} |
8144 |
21 Apr 23 |
nicklas |
61 |
|
4158 |
22 Feb 08 |
nicklas |
62 |
} |