📄 julia.java
字号:
package com.javapatterns.command.audioplayer;
/**
* This is the Client role
*/
public class Julia
{
/**
* @link aggregation
*/
private static Keypad keypad ;
/**
* @link aggregation
*/
private static AudioPlayer myAudio = new AudioPlayer();
public static void main(String[] args)
{
test1();
}
private static void test1()
{
Command play = new PlayCommand(myAudio);
Command stop = new StopCommand(myAudio);
Command rewind = new RewindCommand(myAudio);
keypad = new Keypad(play, stop, rewind);
keypad.play();
keypad.stop();
keypad.rewind();
keypad.stop();
keypad.play();
keypad.stop();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -