?? keypad.java
字號:
package com.javapatterns.command.audioplayer;
/**
* This is the Invoker role
*/
public class Keypad
{
/**
* @link aggregation
*/
private Command playCmd;
/**
* @link aggregation
*/
private Command rewindCmd;
/**
* @link aggregation
*/
private Command stopCmd;
public Keypad(Command play, Command stop, Command rewind)
{
// concrete Command registers itself with the invoker
playCmd = play;
stopCmd = stop;
rewindCmd = rewind;
}
public void play()
{
playCmd.execute();
}
public void stop()
{
stopCmd.execute();
}
public void rewind()
{
rewindCmd.execute();
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -