/[classpath]/classpath/javax/swing/text/DefaultEditorKit.java
ViewVC logotype

Diff of /classpath/javax/swing/text/DefaultEditorKit.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7.2.10 by gnu_andrew, Wed Nov 2 00:44:02 2005 UTC revision 1.7.2.11 by gnu_andrew, Sun Nov 27 21:00:42 2005 UTC
# Line 112  public class DefaultEditorKit extends Ed Line 112  public class DefaultEditorKit extends Ed
112       */       */
113      public void actionPerformed(ActionEvent event)      public void actionPerformed(ActionEvent event)
114      {      {
115        // FIXME: Implement me. Tookit.getSystemClipboard should be used        getTextComponent(event).copy();
       // for that.  
116      }      }
117    }    }
118    
# Line 144  public class DefaultEditorKit extends Ed Line 143  public class DefaultEditorKit extends Ed
143       */       */
144      public void actionPerformed(ActionEvent event)      public void actionPerformed(ActionEvent event)
145      {      {
146        // FIXME: Implement me. Tookit.getSystemClipboard should be used        getTextComponent(event).cut();
       // for that.  
147      }      }
148    }    }
149    
# Line 174  public class DefaultEditorKit extends Ed Line 172  public class DefaultEditorKit extends Ed
172       */       */
173      public void actionPerformed(ActionEvent event)      public void actionPerformed(ActionEvent event)
174      {      {
175        // FIXME: Implement me. Tookit.getSystemClipboard should be used        getTextComponent(event).paste();
       // for that.  
176      }      }
177    }    }
178    
# Line 216  public class DefaultEditorKit extends Ed Line 213  public class DefaultEditorKit extends Ed
213          return;          return;
214    
215        JTextComponent t = getTextComponent(event);        JTextComponent t = getTextComponent(event);
216        if (t != null)        if (t != null && t.isEnabled() && t.isEditable())
217          {          t.replaceSelection(event.getActionCommand());
218            try      }    
             {  
               t.getDocument().insertString(t.getCaret().getDot(),  
                                            event.getActionCommand(), null);  
             }  
           catch (BadLocationException be)  
             {  
               // FIXME: we're not authorized to throw this.. swallow it?  
             }  
         }  
     }  
219    }    }
220    
221    /**    /**
# Line 309  public class DefaultEditorKit extends Ed Line 296  public class DefaultEditorKit extends Ed
296       */       */
297      public void actionPerformed(ActionEvent event)      public void actionPerformed(ActionEvent event)
298      {      {
299        // FIXME: Implement this.        JTextComponent t = getTextComponent(event);
300          t.replaceSelection("\t");
301      }      }
302    }    }
303    

Legend:
Removed from v.1.7.2.10  
changed lines
  Added in v.1.7.2.11

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26