⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 downloadeventlistener.java

📁 peeranha42是jxta的 p2p程序核心
💻 JAVA
字号:
package de.uni_bremen.informatik.p2p.plugins.filesharing.gui.event;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import de.uni_bremen.informatik.p2p.plugins.filesharing.control.UserInputManager;


/**
 * This class is the buttonlistener of all buttons of the download panel.
 * Therefor it implements functions of ActionListener.
 *
 * @author Philipp Hoheisel, Cecile Prigge, Lars Kordes
 */
public class DownloadEventListener
    implements ActionListener {
    /**
     * Method for incoming actionevents.
     *
     * @param arg0 Incoming actionevent.
     *
     * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
     */
    public void actionPerformed(ActionEvent arg0) {
        if (arg0.getActionCommand()
                    .equals("Remove")) {
            UserInputManager.clearDownloadList();
        } else if (arg0.getActionCommand()
                           .equals("Clear")) {
            UserInputManager.clearAllDownloadList();
        } else if (arg0.getActionCommand()
                           .equals("Start")) {
            UserInputManager.startDownload();
        } else if (arg0.getActionCommand()
                           .equals("Stop")) {
            UserInputManager.stopDownload();
        } else if (arg0.getActionCommand()
                           .equals("Cancel")) {
            UserInputManager.cancelDownload();
        } /*else if (arg0.getActionCommand()
                .equals("Directory")) {
            UserInputManager.chooseDownloadDirectory();
        }*/
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -