src/core/net/sf/basedb/util/extensions/Renderer.java

Code
Comments
Other
Rev Date Author Line
4158 22 Feb 08 nicklas 1 /**
4158 22 Feb 08 nicklas 2   $Id$
4158 22 Feb 08 nicklas 3
4158 22 Feb 08 nicklas 4   Copyright (C) Authors contributing to this file.
4158 22 Feb 08 nicklas 5
4158 22 Feb 08 nicklas 6   This file is part of BASE - BioArray Software Environment.
4158 22 Feb 08 nicklas 7   Available at http://base.thep.lu.se/
4158 22 Feb 08 nicklas 8
4158 22 Feb 08 nicklas 9   BASE is free software; you can redistribute it and/or
4158 22 Feb 08 nicklas 10   modify it under the terms of the GNU General Public License
4479 05 Sep 08 jari 11   as published by the Free Software Foundation; either version 3
4158 22 Feb 08 nicklas 12   of the License, or (at your option) any later version.
4158 22 Feb 08 nicklas 13
4158 22 Feb 08 nicklas 14   BASE is distributed in the hope that it will be useful,
4158 22 Feb 08 nicklas 15   but WITHOUT ANY WARRANTY; without even the implied warranty of
4158 22 Feb 08 nicklas 16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4158 22 Feb 08 nicklas 17   GNU General Public License for more details.
4158 22 Feb 08 nicklas 18
4158 22 Feb 08 nicklas 19   You should have received a copy of the GNU General Public License
4515 11 Sep 08 jari 20   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 25   A renderer is an object that knows how to render an action
4158 22 Feb 08 nicklas 26   in the client interface. In the web client, this usually means
4158 22 Feb 08 nicklas 27   outputting some HTML. In other types of clients, this may
4158 22 Feb 08 nicklas 28   mean something completely different, such as creating a swing button,
4158 22 Feb 08 nicklas 29   or menu item.
4158 22 Feb 08 nicklas 30
4158 22 Feb 08 nicklas 31   @author nicklas
4158 22 Feb 08 nicklas 32   @version 2.7
4158 22 Feb 08 nicklas 33   @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 39     Render the action in the client application.
4158 22 Feb 08 nicklas 40     @param action The action to render
8144 21 Apr 23 nicklas 41     @deprecated In 3.19.8, implement the {@link #render(Action, Extension)}
8144 21 Apr 23 nicklas 42       method instead. This method will never be called from the BASE 
8144 21 Apr 23 nicklas 43       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 49     Render the action in the client application.
8144 21 Apr 23 nicklas 50     <p>
8144 21 Apr 23 nicklas 51     The default implementation of this method simply call the {@link #render(Action)}
8144 21 Apr 23 nicklas 52     method. 
8144 21 Apr 23 nicklas 53     
8144 21 Apr 23 nicklas 54     @param action The action to render
8144 21 Apr 23 nicklas 55     @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 }