package eg.edittools;

import eg.document.FileDocument;
import eg.ui.ToolPanel;

/**
 * The interface to add an edit tool to the <code>ToolPanel</code>
 * in the main window
 */
public interface AddableEditTool {
   
   /**
    * Sets the <code>FileDocument</code> that is edited
    *
    * @param fDoc  the {@link FileDocument}
    */
   public void setFileDocument(FileDocument fDoc);

   /**
    * Adds this component to the tool panel. Must call
    * {@link ToolPanel#addComponent(Component,String)}
    *
    * @param toolPnl  the reference to {@link ToolPanel}
    */
   public void addComponent(ToolPanel toolPnl);
}

@@ -23,16 +23,73 @@
 %0Aimport 
+java.awt.Component;%0A%0Aimport javax.swing.JButton;%0A%0Aimport 
 eg.docum
@@ -108,32 +108,8 @@
 ment
-;%0Aimport eg.ui.ToolPanel
 ;%0A%0A/
@@ -260,57 +260,564 @@
   * 
-Sets the %3Ccode%3EFileDocument%3C/code%3E that is edited
+Creates the panel that can be added to the %3Ccode%3EToolPanel%3C/code%3E.%0A    * The specified button which the action to close the panel is attached to%0A    * must be added to the view.%0A    *%0A    * @param closeBt  the closing button%0A    */%0A   public void createToolPanel(JButton closeBt);%0A%0A   /**%0A    * Returns the Component to be added to the %3Ccode%3EToolPanel%3C/code%3E%0A    *%0A    * @return  the %3Ccode%3EComponent%3C/code%3E%0A    */%0A   public Component toolComponent();%0A   %0A   /**%0A    * Sets the %3Ccode%3EFileDocument%3C/code%3E that is currently%0A    * viewed in the editor (or tab)
 %0A   
@@ -921,16 +921,19 @@
  fDoc);%0A
+   
 %0A   /**%0A
@@ -942,227 +942,68 @@
   * 
-Adds this component to the tool panel. Must call%0A    * %7B@link ToolPanel#addComponent(Component,String)%7D%0A    *%0A    * @param toolPnl  the reference to %7B@link ToolPanel%7D%0A    */%0A   public void addComponent(ToolPanel toolPnl
+Called when the program is exited%0A    */%0A   public void end(
 );%0A%7D

rewrite interface