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

📄 interfaceapplet.java

📁 sound recorder which supports .wav format files
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    Color b = this.getBackground().brighter();

    LineComponent left=new LineComponent(LineComponent.VERTICAL,(int)this.getSize().height,b);
    LineComponent top=new LineComponent(LineComponent.HORIZONTAL,(int)this.getSize().width,b);
    LineComponent bottom=new LineComponent(LineComponent.HORIZONTAL,(int)this.getSize().width,d);
    LineComponent right=new LineComponent(LineComponent.VERTICAL,(int)this.getSize().height,d);

    this.add(left, BorderLayout.WEST);
    this.add(top, BorderLayout.NORTH);
    this.add(bottom, BorderLayout.SOUTH);
    this.add(right, BorderLayout.EAST);

  }
//******************************************************************************
public void setMainPanelAvailable()
{
cl.show(cardPanel,"main");
}
//******************************************************************************
public void addFileName(String fname)
{
  if(((Choice)filename).getItemCount()==1)
  {
    if(((Choice)filename).getItem(0).equals("                          "))
       ((Choice)filename).remove(0);
  }
  ((Choice)filename).add(fname);
}
//******************************************************************************
public String getSelectedFileName()
{
  if(((Choice)filename).getSelectedItem().equals("                          "))return null;
  else return ((Choice)filename).getSelectedItem();
}
//******************************************************************************
  protected void bannerPressed()
  {
    URL u = null;
    try
    {
      u = new URL(Messages.bannerUrl);
    }
    catch (MalformedURLException ex)
    {
    }
//    System.out.println("u="+u);
    this.getAppletContext().showDocument(u,"_blank");
  }
//******************************************************************************
 protected void etn_clicked()
{
 URL u = null;
 try
 {
   u = new URL(Messages.bannerUrl);
 }
 catch (MalformedURLException ex)
 {
 }
 this.getAppletContext().showDocument(u,"_blank");
}
//******************************************************************************

//******************************************************************************
  //Start the applet
  public void start()
  {

  }
//******************************************************************************
 //Stop the applet
  public void stop()
  {
  }
//******************************************************************************

//******************************************************************************
  //Destroy the applet
  public void destroy()
  {
  }
//******************************************************************************
  //Get parameter info
  public String[][] getParameterInfo()
  {
    return null;
  }
//******************************************************************************
  //Main method
  public static void main(String[] args)
  {
    InterfaceApplet applet = new InterfaceApplet();
    applet.isStandalone = true;
    Frame frame;
    frame = new Frame();
    frame.setTitle("Applet Frame");
    frame.add(applet, BorderLayout.CENTER);
    applet.init();
    applet.start();
    frame.setSize(350, 80);
    Dimension d = Toolkit.getDefaultToolkit().getScreenSize();
    frame.setLocation( (d.width - frame.getSize().width) / 2,
                      (d.height - frame.getSize().height) / 2);
    frame.setVisible(true);
  }
//******************************************************************************
  public void setStatus_RP(String num, String s)
  {
    d.setStatus_RP(num,s);
//  System.out.println("setStatus_RP: num="+num+" : "+s);
  }
//******************************************************************************
  public void report_RP(String num, String s)
  {
  d.report_RP(num,s);
  }

//******************************************************************************
  public void setTimer_RP(String s)
  {
//  System.out.println("setTimer_RP: "+s);
    d.setTimer_RP(s);
  }
//******************************************************************************
  public void confirmOpen(String num, String s)
  {
  d.confirmOpen(num,s);
  }
//******************************************************************************
  public void confirmRecord(String num, String s)
  {
  d.confirmRecord(num,s);
  }
//******************************************************************************
  public void setFilename(String s)
  {
    d.setFilename(s);
//  System.out.println("setFilename> "+s);
  }
//******************************************************************************
  public void addName(String s)
  {
    d.addName(s);
  }
//******************************************************************************
  public void setRecordLevel(String s)
  {
  d.setRecordLevel(s);
  }
//******************************************************************************
  void play_actionPerformed(ActionEvent e)
  {
    d.play();
  }
//******************************************************************************
  void record_actionPerformed(ActionEvent e)
  {
    d.record();
  }
//******************************************************************************
  void pause_actionPerformed(ActionEvent e)
  {
    d.pause();
  }
//******************************************************************************
  void stop_actionPerformed(ActionEvent e)
  {
    pause.releaseButton();
    d.stop();
  }
//******************************************************************************
  void open_actionPerformed(ActionEvent e)
  {
    d.open();
  }
//******************************************************************************
  void save_actionPerformed(ActionEvent e)
  {
    d.save();
  }
//******************************************************************************
}
//******************************************************************************
class InterfaceApplet_play_actionAdapter implements java.awt.event.ActionListener {
  InterfaceApplet adaptee;

  InterfaceApplet_play_actionAdapter(InterfaceApplet adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.play_actionPerformed(e);
  }
}
//******************************************************************************
class InterfaceApplet_record_actionAdapter implements java.awt.event.ActionListener {
  InterfaceApplet adaptee;

  InterfaceApplet_record_actionAdapter(InterfaceApplet adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.record_actionPerformed(e);
  }
}
//******************************************************************************
class InterfaceApplet_pause_actionAdapter implements java.awt.event.ActionListener {
  InterfaceApplet adaptee;

  InterfaceApplet_pause_actionAdapter(InterfaceApplet adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.pause_actionPerformed(e);
  }
}
//******************************************************************************
class InterfaceApplet_stop_actionAdapter implements java.awt.event.ActionListener {
  InterfaceApplet adaptee;

  InterfaceApplet_stop_actionAdapter(InterfaceApplet adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.stop_actionPerformed(e);
  }
}
//******************************************************************************
class InterfaceApplet_open_actionAdapter implements java.awt.event.ActionListener {
  InterfaceApplet adaptee;

  InterfaceApplet_open_actionAdapter(InterfaceApplet adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.open_actionPerformed(e);
  }
}
//******************************************************************************
class InterfaceApplet_save_actionAdapter implements java.awt.event.ActionListener {
  InterfaceApplet adaptee;

  InterfaceApplet_save_actionAdapter(InterfaceApplet adaptee) {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e) {
    adaptee.save_actionPerformed(e);
  }
//******************************************************************************
}

⌨️ 快捷键说明

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