View Javadoc

1   package com.melloware.jukes.gui.view.editor;
2   
3   import javax.swing.Icon;
4   import javax.swing.JToolBar;
5   
6   
7   /**
8    * This interface describes general editor that have an <code>Icon</code>,
9    * title, <code>ToolBar</code>, and can set and return a model.
10   * <p>
11   * Copyright (c) 1999-2007 Melloware, Inc. <http://www.melloware.com>
12   * @author Emil A. Lefkof III <info@melloware.com>
13   * @version 4.0
14   */
15  public interface Editor {
16  
17      /**
18       * Answers the editor's icon.
19       */
20      Icon getIcon();
21  
22      /**
23       * Answers the editor's title.
24       */
25      String getTitle();
26  
27      /**
28       * Answers the editor's tool bar.
29       */
30      JToolBar getToolBar();
31      
32      /**
33       * Answers the editor's header tool bar.
34       */
35      JToolBar getHeaderToolBar();
36  
37      /**
38       * Activates the editor.
39       */
40      void activate();
41  
42      /**
43       * Deactivates the editor.
44       */
45      void deactivate();
46  
47      /**
48       * Returns the associated domain class used to register this editor
49       * with the EditorPanel's registry.
50       */
51      Class getDomainClass();
52  
53      /**
54       * Returns this editor's model.
55       */
56      Object getModel();
57  
58      /**
59       * Sets this editor's model. Called when the edited instance changed.
60       */
61      void setModel(Object model);
62  
63  }