亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? recordingframe.java

?? 一個遠程登陸器的原代碼
?? JAVA
字號:
//
//  Copyright (C) 2002 Constantin Kaplinsky.  All Rights Reserved.
//
//  This is free software; you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation; either version 2 of the License, or
//  (at your option) any later version.
//
//  This software is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this software; if not, write to the Free Software
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307,
//  USA.
//

//
// Recording frame. It allows to control recording RFB sessions into
// FBS (FrameBuffer Stream) files.
//

import java.io.*;
import java.awt.*;
import java.awt.event.*;

class RecordingFrame extends Frame
  implements WindowListener, ActionListener {

  boolean recording;

  TextField fnameField;
  Button browseButton;

  Label statusLabel;

  Button recordButton, nextButton, closeButton;
  VncViewer viewer;

  //
  // Check if current security manager allows to create a
  // RecordingFrame object.
  //

  public static boolean checkSecurity() {
    SecurityManager security = System.getSecurityManager();
    if (security != null) {
      try {
	security.checkPropertyAccess("user.dir");
	security.checkPropertyAccess("file.separator");
      } catch (SecurityException e) {
	System.out.println("SecurityManager restricts session recording.");
	return false;
      }
    }
    return true;
  }

  //
  // Constructor.
  //

  RecordingFrame(VncViewer v) {
    super("TightVNC Session Recording");

    viewer = v;

    // Determine initial filename for next saved session.
    // FIXME: Check SecurityManager.

    String fname = nextNewFilename(System.getProperty("user.dir") +
				   System.getProperty("file.separator") +
				   "vncsession.fbs");

    // Construct new panel with file name field and "Browse" button.

    Panel fnamePanel = new Panel();
    GridBagLayout fnameGridbag = new GridBagLayout();
    fnamePanel.setLayout(fnameGridbag);

    GridBagConstraints fnameConstraints = new GridBagConstraints();
    fnameConstraints.gridwidth = GridBagConstraints.RELATIVE;
    fnameConstraints.fill = GridBagConstraints.BOTH;
    fnameConstraints.weightx = 4.0;

    fnameField = new TextField(fname, 64);
    fnameGridbag.setConstraints(fnameField, fnameConstraints);
    fnamePanel.add(fnameField);
    fnameField.addActionListener(this);

    fnameConstraints.gridwidth = GridBagConstraints.REMAINDER;
    fnameConstraints.weightx = 1.0;

    browseButton = new Button("Browse");
    fnameGridbag.setConstraints(browseButton, fnameConstraints);
    fnamePanel.add(browseButton);
    browseButton.addActionListener(this);

    // Construct the frame.

    GridBagLayout gridbag = new GridBagLayout();
    setLayout(gridbag);

    GridBagConstraints gbc = new GridBagConstraints();
    gbc.gridwidth = GridBagConstraints.REMAINDER;
    gbc.fill = GridBagConstraints.BOTH;
    gbc.weighty = 1.0;
    gbc.insets = new Insets(10, 0, 0, 0);

    Label helpLabel =
      new Label("File name to save next recorded session in:", Label.CENTER);
    gridbag.setConstraints(helpLabel, gbc);
    add(helpLabel);

    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weighty = 0.0;
    gbc.insets = new Insets(0, 0, 0, 0);

    gridbag.setConstraints(fnamePanel, gbc);
    add(fnamePanel);

    gbc.fill = GridBagConstraints.BOTH;
    gbc.weighty = 1.0;
    gbc.insets = new Insets(10, 0, 10, 0);

    statusLabel = new Label("", Label.CENTER);
    gridbag.setConstraints(statusLabel, gbc);
    add(statusLabel);

    gbc.fill = GridBagConstraints.HORIZONTAL;
    gbc.weightx = 1.0;
    gbc.weighty = 0.0;
    gbc.gridwidth = 1;
    gbc.insets = new Insets(0, 0, 0, 0);

    recordButton = new Button("Record");
    gridbag.setConstraints(recordButton, gbc);
    add(recordButton);
    recordButton.addActionListener(this);

    nextButton = new Button("Next file");
    gridbag.setConstraints(nextButton, gbc);
    add(nextButton);
    nextButton.addActionListener(this);

    closeButton = new Button("Close");
    gridbag.setConstraints(closeButton, gbc);
    add(closeButton);
    closeButton.addActionListener(this);

    // Set correct text, font and color for the statusLabel.
    stopRecording();

    pack();

    addWindowListener(this);
  }

  //
  // If the given string ends with ".NNN" where NNN is a decimal
  // number, increase this number by one. Otherwise, append ".001"
  // to the given string.
  //

  protected String nextFilename(String fname) {
    int len = fname.length();
    int suffixPos = len;
    int suffixNum = 1;

    if (len > 4 && fname.charAt(len - 4) == '.') {
      try {
	suffixNum = Integer.parseInt(fname.substring(len - 3, len)) + 1;
	suffixPos = len - 4;
      } catch (NumberFormatException e) { }
    }

    char[] zeroes = {'0', '0', '0'};
    String suffix = String.valueOf(suffixNum);
    if (suffix.length() < 3) {
      suffix = new String(zeroes, 0, 3 - suffix.length()) + suffix;
    }

    return fname.substring(0, suffixPos) + '.' + suffix;
  }

  //
  // Find next name of a file which does not exist yet.
  //

  protected String nextNewFilename(String fname) {
    String newName = fname;
    File f;
    try {
      do {
	newName = nextFilename(newName);
	f = new File(newName);
      } while (f.exists());
    } catch (SecurityException e) { }

    return newName;
  }

  //
  // Let the user choose a file name showing a FileDialog.
  //

  protected boolean browseFile() {
    File currentFile = new File(fnameField.getText());

    FileDialog fd =
      new FileDialog(this, "Save next session as...", FileDialog.SAVE);
    fd.setDirectory(currentFile.getParent());
    fd.setVisible(true);
    if (fd.getFile() != null) {
      String newDir = fd.getDirectory();
      String sep = System.getProperty("file.separator");
      if (newDir.length() > 0) {
	if (!sep.equals(newDir.substring(newDir.length() - sep.length())))
	  newDir += sep;
      }
      String newFname = newDir + fd.getFile();
      if (newFname.equals(fnameField.getText())) {
	fnameField.setText(newFname);
	return true;
      }
    }
    return false;
  }

  //
  // Start recording.
  //

  public void startRecording() {
    statusLabel.setText("Status: Recording...");
    statusLabel.setFont(new Font("Helvetica", Font.BOLD, 12));
    statusLabel.setForeground(Color.red);
    recordButton.setLabel("Stop recording");

    recording = true;

    viewer.setRecordingStatus(fnameField.getText());
  }

  //
  // Stop recording.
  //

  public void stopRecording() {
    statusLabel.setText("Status: Not recording.");
    statusLabel.setFont(new Font("Helvetica", Font.PLAIN, 12));
    statusLabel.setForeground(Color.black);
    recordButton.setLabel("Record");

    recording = false;

    viewer.setRecordingStatus(null);
  }

  //
  // Close our window properly.
  //

  public void windowClosing(WindowEvent evt) {
    setVisible(false);
  }

  //
  // Ignore window events we're not interested in.
  //

  public void windowActivated(WindowEvent evt) {}
  public void windowDeactivated (WindowEvent evt) {}
  public void windowOpened(WindowEvent evt) {}
  public void windowClosed(WindowEvent evt) {}
  public void windowIconified(WindowEvent evt) {}
  public void windowDeiconified(WindowEvent evt) {}


  //
  // Respond to button presses
  //

  public void actionPerformed(ActionEvent evt) {
    if (evt.getSource() == browseButton) {
      if (browseFile() && recording)
	startRecording();

    } else if (evt.getSource() == recordButton) {
      if (!recording) {
	startRecording();
      } else {
	stopRecording();
        fnameField.setText(nextNewFilename(fnameField.getText()));
      }

    } else if (evt.getSource() == nextButton) {
      fnameField.setText(nextNewFilename(fnameField.getText()));
      if (recording)
	startRecording();

    } else if (evt.getSource() == closeButton) {
      setVisible(false);

    }
  }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人avav影音| 一区二区三区成人| 国产精品毛片大码女人 | 国产精品资源站在线| 国产成人精品亚洲午夜麻豆| 91免费版pro下载短视频| 91精品国产综合久久久久久久久久| 日韩色在线观看| 欧美激情综合网| 亚洲地区一二三色| 国产精品一区二区三区99| 色哟哟国产精品| 9191久久久久久久久久久| 国产欧美日韩综合| 亚洲bdsm女犯bdsm网站| 国产精品一线二线三线精华| 欧美中文字幕亚洲一区二区va在线| 日韩欧美中文一区二区| 亚洲婷婷国产精品电影人久久| 日日噜噜夜夜狠狠视频欧美人| 国产乱对白刺激视频不卡| 精品视频一区二区三区免费| 国产欧美精品一区aⅴ影院| 亚洲无人区一区| 国产91精品一区二区麻豆网站 | 日韩福利电影在线| 成人av一区二区三区| 在线播放一区二区三区| 国产精品视频线看| 欧美aⅴ一区二区三区视频| av一区二区三区四区| 日韩欧美一级二级| 亚洲青青青在线视频| 狠狠色伊人亚洲综合成人| 色8久久人人97超碰香蕉987| 久久久久久久av麻豆果冻| 亚洲成人动漫av| av在线不卡免费看| 久久影院午夜论| 日韩精品1区2区3区| 99riav一区二区三区| 久久众筹精品私拍模特| 日本不卡视频一二三区| 色狠狠综合天天综合综合| 日本一区二区综合亚洲| 捆绑调教美女网站视频一区| 欧美日韩一本到| 一区二区在线看| 成人精品视频.| 久久久久久久久久久久久夜| 日韩国产欧美视频| 91久久人澡人人添人人爽欧美| 国产亚洲精品资源在线26u| 免费视频一区二区| 欧美日韩在线播放一区| 亚洲欧洲日本在线| 成人黄色软件下载| 久久久高清一区二区三区| 久久精品国产亚洲aⅴ| 欧美日韩国产经典色站一区二区三区 | 亚洲444eee在线观看| 91污在线观看| 亚洲人成亚洲人成在线观看图片| 国产成人精品www牛牛影视| 久久综合九色综合欧美98| 蜜桃一区二区三区在线| 6080午夜不卡| 日韩成人免费电影| 欧美福利电影网| 日韩vs国产vs欧美| 91精品国产麻豆国产自产在线 | 精品日韩在线一区| 久久国产成人午夜av影院| 777奇米成人网| 日韩国产在线观看| 日韩欧美电影一二三| 美女视频一区二区| 欧美变态凌虐bdsm| 国产一区二区在线影院| 国产欧美一二三区| 成人免费高清在线| 日韩一区中文字幕| 色婷婷国产精品| 亚洲在线视频网站| 欧美日韩激情一区二区三区| 日韩av午夜在线观看| 91精品国产麻豆| 精品一区二区三区在线播放 | 精品亚洲免费视频| 中文字幕国产一区二区| 99re66热这里只有精品3直播 | 欧洲色大大久久| 亚洲一卡二卡三卡四卡无卡久久| 欧美午夜精品久久久| 午夜国产精品一区| 日韩一区二区影院| 国产剧情一区二区三区| 成人免费在线播放视频| 欧美亚洲丝袜传媒另类| 日本免费在线视频不卡一不卡二 | 国产伦精一区二区三区| 中文字幕成人网| 亚洲第一电影网| 有码一区二区三区| 欧美美女一区二区在线观看| 久久精品国产99国产| 久久久99精品免费观看不卡| 成a人片国产精品| 亚洲伊人伊色伊影伊综合网| 欧美一二三区在线| 国产成人综合在线播放| 亚洲精品久久嫩草网站秘色| 欧美人动与zoxxxx乱| 国产在线精品免费| 综合激情网...| 91精品国产色综合久久不卡蜜臀| 国产伦精品一区二区三区在线观看| 亚洲男人的天堂网| 欧美va亚洲va在线观看蝴蝶网| 成人免费视频一区二区| 亚洲不卡在线观看| 久久天天做天天爱综合色| 91精品1区2区| 久草这里只有精品视频| 亚洲视频一区二区在线观看| 日韩一区二区三免费高清| www.日韩av| 日本成人中文字幕| 亚洲欧洲av在线| 日韩一区二区三区在线观看| 不卡视频在线看| 狂野欧美性猛交blacked| 自拍偷拍国产精品| 日韩午夜激情av| 一本到三区不卡视频| 国模娜娜一区二区三区| 亚洲午夜电影在线| 国产精品美女久久久久aⅴ| 91精品国产福利在线观看| 色综合中文综合网| 亚洲国产精品高清| 欧美一区二区视频免费观看| 91麻豆国产在线观看| 国产一区视频网站| 日日夜夜精品视频免费| 国产精品色哟哟网站| 精品久久久久一区| 欧美日韩精品专区| 91视频你懂的| 国产98色在线|日韩| 精品亚洲成a人| 三级欧美在线一区| 亚洲少妇30p| 日本一区二区三区在线观看| 欧美成人高清电影在线| 欧美午夜一区二区三区免费大片| 成人av电影免费在线播放| 国产精品综合av一区二区国产馆| 日本免费新一区视频| 亚洲一区二区三区四区五区中文| 国产精品久久久久国产精品日日 | 五月激情综合网| 亚洲人成精品久久久久久 | 精品无码三级在线观看视频| 亚洲免费三区一区二区| 日韩三级视频在线观看| 色中色一区二区| 懂色av一区二区三区免费观看| 日韩国产欧美在线观看| 五月天网站亚洲| 亚洲欧美精品午睡沙发| 欧美国产乱子伦 | 日韩精品自拍偷拍| 91精品福利在线一区二区三区 | 美女网站视频久久| 亚洲国产视频一区| 国产精品女主播在线观看| 精品理论电影在线观看| 欧美性一级生活| 欧美日韩在线直播| 色吊一区二区三区| 北条麻妃国产九九精品视频| 成人av网站在线观看免费| 极品美女销魂一区二区三区免费| 亚洲大片免费看| 亚洲一区影音先锋| 国产午夜精品在线观看| 精品成人一区二区三区| 欧美一区二区视频观看视频| 欧美三级电影精品| 欧美精品第1页| 欧美日韩三级一区二区| 日本久久一区二区三区| 欧美综合色免费| 欧美三级韩国三级日本三斤| 在线一区二区三区四区| 91传媒视频在线播放| 欧美精品久久一区二区三区| 欧美放荡的少妇| 91麻豆精品国产91久久久使用方法|