📄 rpappletinterface.java
字号:
package com.vimas.interfaceapplet;
import java.lang.reflect.*;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: Vimas technologies</p>
* @author miha
* @version 1.0
*/
public class RPAppletInterface
{
Object applet=null;
Method RECORD=null;
Method PLAYBACK=null;
Method PAUSE=null;
Method STOP_RP=null;
Method WEBPLAY=null;
Method UPLOAD=null;
Method getInterfaceAppletAgain=null;
public RPAppletInterface(Object applet)
{
this.applet=applet;
try
{
Method[] m=applet.getClass().getMethods();
for(int i=0;i<m.length;i++)
{
if(m[i].getName().equals("RECORD")) {RECORD=m[i];continue;}
if(m[i].getName().equals("PLAYBACK")) {PLAYBACK=m[i];continue;}
if(m[i].getName().equals("PAUSE")) {PAUSE=m[i];continue;}
if(m[i].getName().equals("STOP_RP")) {STOP_RP=m[i];continue;}
if(m[i].getName().equals("WEBPLAY")) {WEBPLAY=m[i];continue;}
if(m[i].getName().equals("UPLOAD")) {UPLOAD=m[i];continue;}
if(m[i].getName().equals("getInterfaceAppletAgain")) {getInterfaceAppletAgain=m[i];continue;}
}
String[] s= new String[0];
getInterfaceAppletAgain.invoke(applet,s);
}
catch (Exception ex) {System.out.println("err "+ex);}
}
//******************************************************************************
public void STOP()
{
String[] s= new String[0];
try
{
STOP_RP.invoke(applet, s);
}
catch (InvocationTargetException ex)
{
System.out.println("Stop1 error "+ex);
}
catch (IllegalArgumentException ex)
{
System.out.println("Stop2 error "+ex);
}
catch (IllegalAccessException ex)
{
System.out.println("Stop3 error "+ex);
}
}
//******************************************************************************
public void PAUSE()
{
String[] s= new String[0];
try
{
PAUSE.invoke(applet, s);
}
catch (InvocationTargetException ex)
{
System.out.println("PAUSE1 error "+ex);
}
catch (IllegalArgumentException ex)
{
System.out.println("PAUSE2 error "+ex);
}
catch (IllegalAccessException ex)
{
System.out.println("PAUSE3 error "+ex);
}
}
//******************************************************************************
public void RECORD()
{
String[] s= new String[0];
try
{
RECORD.invoke(applet, s);
}
catch (InvocationTargetException ex)
{
System.out.println("RECORD1 error "+ex);
}
catch (IllegalArgumentException ex)
{
System.out.println("RECORD2 error "+ex);
}
catch (IllegalAccessException ex)
{
System.out.println("RECORD3 error "+ex);
}
}
//******************************************************************************
public void PLAYBACK()
{
String[] s= new String[0];
try
{
PLAYBACK.invoke(applet, s);
}
catch (InvocationTargetException ex)
{
System.out.println("PLAYBACK1 error "+ex);
}
catch (IllegalArgumentException ex)
{
System.out.println("PLAYBACK2 error "+ex);
}
catch (IllegalAccessException ex)
{
System.out.println("PLAYBACK3 error "+ex);
}
}
//******************************************************************************
public void WEBPLAY(String str)
{
String[] s= new String[1];
s[0]=str;
try
{
WEBPLAY.invoke(applet, s);
}
catch (InvocationTargetException ex)
{
System.out.println("WEBPLAY1 error "+ex);
}
catch (IllegalArgumentException ex)
{
System.out.println("WEBPLAY2 error "+ex);
}
catch (IllegalAccessException ex)
{
System.out.println("WEBPLAY3 error "+ex);
}
}
//******************************************************************************
public void UPLOAD(String str)
{
String[] s= new String[1];
s[0]=str;
try
{
UPLOAD.invoke(applet, s);
}
catch (InvocationTargetException ex)
{
System.out.println("UPLOAD1 error "+ex);
}
catch (IllegalArgumentException ex)
{
System.out.println("UPLOAD2 error "+ex);
}
catch (IllegalAccessException ex)
{
System.out.println("UPLOAD3 error "+ex);
}
}
//******************************************************************************
public void getInterfaceAppletAgain()
{
String[] s= new String[0];
try
{
getInterfaceAppletAgain.invoke(applet, s);
}
catch (InvocationTargetException ex)
{
System.out.println("getInterfaceAppletAgain1 error "+ex);
}
catch (IllegalArgumentException ex)
{
System.out.println("getInterfaceAppletAgain2 error "+ex);
}
catch (IllegalAccessException ex)
{
System.out.println("getInterfaceAppletAgain3 error "+ex);
}
}
//******************************************************************************
//******************************************************************************
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -