Changeset 2759


Ignore:
Timestamp:
07/04/03 12:57:58 (19 years ago)
Author:
piso
Message:

enter(): call MailCommands?.openMailbox() directly.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/j/OpenFileTextFieldHandler.java

    r2749 r2759  
    33 *
    44 * Copyright (C) 1998-2003 Peter Graves
    5  * $Id: OpenFileTextFieldHandler.java,v 1.49 2003-07-03 14:54:42 piso Exp $
     5 * $Id: OpenFileTextFieldHandler.java,v 1.50 2003-07-04 12:57:58 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3939import javax.swing.MenuSelectionManager;
    4040import javax.swing.SwingUtilities;
     41import org.armedbear.j.mail.MailCommands;
    4142
    4243public final class OpenFileTextFieldHandler extends DefaultTextFieldHandler
     
    121122        if (entry.startsWith("pop://") || entry.startsWith("{") ||
    122123            entry.startsWith("mailbox:")) {
    123             openMailbox(editor, entry);
     124            MailCommands.openMailbox(editor, entry);
    124125            editor.ensureActive();
    125126            editor.setFocusToDisplay();
     
    252253        encoding = s.substring(index+4).trim();
    253254        return s.substring(0, index).trim();
    254     }
    255 
    256     private void openMailbox(Editor editor, String input)
    257     {
    258         try {
    259             Class c = Class.forName("org.armedbear.j.mail.MailCommands");
    260             Class[] parameterTypes = new Class[2];
    261             parameterTypes[0] = Class.forName("org.armedbear.j.Editor");
    262             parameterTypes[1] = Class.forName("java.lang.String");
    263             Method method = c.getMethod("openMailbox", parameterTypes);
    264             Object[] parameters = new Object[2];
    265             parameters[0] = editor;
    266             parameters[1] = input;
    267             method.invoke(null, parameters);
    268         }
    269         catch (Throwable t) {
    270             Log.error(t);
    271         }
    272255    }
    273256
     
    10351018    public void mousePressed(MouseEvent e)
    10361019    {
     1020        Editor.setCurrentEditor(editor);
    10371021        originalText = null;
    10381022        originalPrefix = null;
Note: See TracChangeset for help on using the changeset viewer.