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

📄 keypad.java

📁 Java与模式 源代码
💻 JAVA
字号:
package com.javapatterns.command.audioplayer2;

/** This is the Invoker role */
public class Keypad
{
    private Command playCmd;
    private Command rewindCmd;
    private Command stopCmd;

    //correction
    public Keypad(Command aPlayCmd, Command aStopCmd, Command aRewindCmd)
    {
        // concrete Command registers itself with the invoker
        playCmd = aPlayCmd;
        stopCmd = aStopCmd;
        rewindCmd = aRewindCmd;
    }

    public void play()
    {
        playCmd.execute();
    }

    public void stop()
    {
        stopCmd.execute();
    }

    public void rewind()
    {
        rewindCmd.execute();
    }

    public void playMacro() { }
}

⌨️ 快捷键说明

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