View Javadoc

1   /*
2    * Copyright 1999-2006 Faculty of Mathematics, Physics and Informatics, Comenius
3    * University, Bratislava. This file is protected by the Mozilla Public License
4    * version 1.1 (the License); you may not use this file except in compliance
5    * with the License. You may obtain a copy of the License at
6    * http://euromath2.sourceforge.net/license.html Unless required by applicable
7    * law or agreed to in writing, software distributed under the License is
8    * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9    * KIND, either express or implied. See the License for the specific language
10   * governing permissions and limitations under the License.
11   */
12  package sk.uniba.euromath.editor;
13  
14  
15  
16  /***
17   * Listener that implements this interface handles focus changes in EditorSite -
18   * in IEditors.
19   * <p>
20   * After creating an instance of a class that implements this interface it can
21   * be added to EditorSite using the <code>addFocusListener</code> method and
22   * removed using the <code>removeFocusListener</code> method. When a IEditor
23   * gains or loses focus, the appropriate method will be invoked.
24   * </p>
25   * 
26   * @author Tomáš Studva 22.10.2005
27   */
28  public interface IFocusListener {
29  
30      /***
31       * Sent when IEditor gets focus.
32       * 
33       * @param editor
34       *            which has acquired focus
35       */
36      public void focusGained(IEditor editor);
37  
38      /***
39       * Sent when IEditor loses focus.
40       * 
41       * @param editor
42       *            which has lost focus
43       */
44      public void focusLost(IEditor editor);
45  }