ActionsPublisher.java
01 /*
02  *  Copyright (c) 1995-2010, The University of Sheffield. See the file
03  *  COPYRIGHT.txt in the software or at http://gate.ac.uk/gate/COPYRIGHT.txt
04  *
05  *  This file is part of GATE (see http://gate.ac.uk/), and is free
06  *  software, licenced under the GNU Library General Public License,
07  *  Version 2, June 1991 (in the distribution as file licence.html,
08  *  and also available at http://gate.ac.uk/gate/licence.html).
09  *
10  *  Valentin Tablan 21/11/2002
11  *
12  *  $Id: ActionsPublisher.java 12006 2009-12-01 17:24:28Z thomas_heitz $
13  *
14  */
15 
16 package gate.gui;
17 
18 import java.util.List;
19 
20 /**
21  * This interface is used to mark resources that publish a list of actions
22  * that can be performed on them.
23  * Those actions will automatically be added to the appropriate menus when
24  * needed.
25  */
26 
27 public interface ActionsPublisher {
28   /**
29    * Returns a list of Action objects. This method will be called everytime a
30    * menu for this resource needs to be built, thus allowing for dynamic updates
31    * to the list of actions.
32    * A <tt>null</tt> value in this list will cause a separator to be created.
33    @return {@link List} of {@link javax.swing.Action}s.
34    */
35   public List getActions();
36 }