// FileInfoUI.java
// Gayathri Singh, March 2008, gayathri@byteblend.com
/* The FileInfoUI class provides a GUI frontend for the FileInfo class.
Usage:
java -cp c:\jinvoke\jinvoke.jar;. jinvoke.win32demos.fileinfo.FileInfoUI [ file-path ]
*/
package jinvoke.win32demos.fileinfo;
import java.awt.event.ActionListener;
import java.io.File;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.UIManager;
public class FileInfoUI extends javax.swing.JFrame {
JFileChooser fc;
/** Creates new form GetFileInfoUI */
public FileInfoUI(String filepath) {
initComponents();
txtFieldSource.setText(filepath);
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
displayFileInfo();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
txtFieldSource = new javax.swing.JTextField();
btnBrowse = new javax.swing.JButton();
btnGetFileInfo = new javax.swing.JButton();
lblFileInfo = new javax.swing.JLabel();
jSeparator1 = new javax.swing.JSeparator();
lblFileImage = new javax.swing.JLabel();
lblFileName = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jLabel4 = new javax.swing.JLabel();
lblFileType = new javax.swing.JLabel();
jLabel5 = new javax.swing.JLabel();
lblCompressedSize = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jSeparator2 = new javax.swing.JSeparator();
jLabel7 = new javax.swing.JLabel();
jLabel8 = new javax.swing.JLabel();
jSeparator3 = new javax.swing.JSeparator();
jLabel9 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jLabel11 = new javax.swing.JLabel();
jSeparator4 = new javax.swing.JSeparator();
jLabel12 = new javax.swing.JLabel();
chkHidden = new javax.swing.JCheckBox();
lblVolumeSerialNum = new javax.swing.JLabel();
lblNumLinks = new javax.swing.JLabel();
lblUniqueIdentifier = new javax.swing.JLabel();
lblCreated = new javax.swing.JLabel();
lblAccessed = new javax.swing.JLabel();
lblModified = new javax.swing.JLabel();
chkSystem = new javax.swing.JCheckBox();
chkArchive = new javax.swing.JCheckBox();
chkCompressed = new javax.swing.JCheckBox();
chkTemporary = new javax.swing.JCheckBox();
chkReadOnly = new javax.swing.JCheckBox();
btnClose = new javax.swing.JButton();
btnClose.addActionListener(new ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
System.exit(0);
}
});
lblFileSize = new javax.swing.JLabel();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("File Information"); // NOI18N
setResizable(false);
jLabel1.setText("Select a File:");
btnBrowse.setText("...");
btnBrowse.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnBrowseActionPerformed(evt);
}
});
btnGetFileInfo.setText("Get File Information");
btnGetFileInfo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnGetFileInfoActionPerformed(evt);
}
});
lblFileInfo.setText("File Information:");
lblFileName.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jLabel2.setText("Type:");
jLabel3.setText("Size:");
jLabel5.setText("Compressed Size:");
jLabel6.setText("Volume Serial Number:");
jLabel7.setText("Number of Links to File:");
jLabel8.setText("File Unique Identifier:");
jLabel9.setText("Created:");
jLabel10.setText("Accessed:");
jLabel11.setText("Modified:");
jLabel12.setText("Attributes:");
chkHidden.setText("Hidden");
chkHidden.setOpaque(false);
chkSystem.setText("System");
chkSystem.setOpaque(false);
chkArchive.setText("Archive");
chkArchive.setOpaque(false);
chkCompressed.setText("Compressed");
chkCompressed.setOpaque(false);
chkTemporary.setText("Temporary");
chkTemporary.setOpaque(false);
chkTemporary.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
chkTemporaryActionPerformed(evt);
}
});
chkReadOnly.setText("Read-Only");
chkReadOnly.setOpaque(false);
btnClose.setText("Close");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(101, 101, 101)
.addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 273, Short.MAX_VALUE)
.addGap(26, 26, 26))
.addGroup(layout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(jLabel12)
.addGap(96, 96, 96)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(chkArchive)
.addComponent(chkTemporary)
.addComponent(chkHidden))
.addGap(31, 31, 31)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(chkSystem)
.addComponent(chkReadOnly)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(btnClose)
.addComponent(chkCompressed)))
.addContainerGap(41, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(jSeparator4, javax.swing.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE)
.addContainerGap(39, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(18, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE)
.addComponent(jSeparator3, javax.swing.GroupLayout.DEFAULT_SIZE, 343, Short.MAX_VALUE))
.addGap(39, 39, 39))
.addGroup(layout.createSequentialGroup()
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(btnGetFileInfo)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel1)
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
jnative jinvoke (506个子文件)
TaskManager.class 14KB
EventLogViewer.class 14KB
FileInfoUI.class 11KB
RecycleBinUI.class 10KB
NewFileTypeUI.class 9KB
FileOperationsUI.class 9KB
RegistryTree.class 9KB
VersionInfoUI.class 9KB
NewFileTypeUI.class 9KB
FileSystemWatcherUI.class 8KB
VersionInfo.class 8KB
GetServices.class 7KB
FileInfo.class 6KB
KeyBoardProc.class 6KB
WindowWithHoles.class 5KB
RecycleBin.class 5KB
AddContextMenu.class 4KB
KeyboardHook.class 4KB
MouseHook.class 4KB
NewFileType.class 4KB
UsbDevice.class 3KB
FileSystemWatcher.class 3KB
RegistryViewer.class 3KB
FindFirstFile.class 3KB
FileOperations.class 3KB
MyRenderer.class 3KB
FileChangeNotification.class 3KB
CreateWin.class 3KB
MouseProc.class 2KB
OverlappedIO.class 2KB
TaskManager$2.class 2KB
TaskManager$3.class 2KB
RegistryTree$1.class 2KB
ChooseColorSample.class 2KB
StartProcess.class 2KB
NewFileType.class 2KB
EnumerateWindows.class 2KB
TaskManager$8.class 2KB
KeyboardHook$3.class 2KB
TaskManager$9.class 2KB
MouseHook$3.class 2KB
RegistryTree$2.class 2KB
BrowseForFolder.class 2KB
ShapedJavaWindow.class 2KB
NewFileTypeUI$IconFilter.class 1KB
ShapedJavaWindow$1.class 1KB
SelectionListener.class 1KB
TaskManager$7.class 1KB
FileOperations$1.class 1KB
RecycleBin$1.class 1KB
TaskManager$10.class 1KB
MessageBoxJFrame.class 1KB
ProcessTableModel.class 1KB
TaskManager$4.class 1KB
AppFilter.class 1KB
EventLogTableModel.class 1KB
FileSystemWatcher$1.class 1KB
ServicesTableModel.class 1KB
JarFilter.class 1KB
IconFilter.class 1KB
TaskManager$6.class 1KB
TaskManager$5.class 1KB
KeyValueTableModel.class 1KB
KeyValueTableModel.class 1KB
GetUserName.class 1KB
MemQuery.class 1KB
GetServices$1.class 1KB
FileSystemWatcherUI$3.class 982B
FileSystemWatcherUI$2.class 982B
FileSystemWatcherUI$1.class 982B
FileOperationsUI$1.class 943B
FileOperationsUI$3.class 943B
FileOperationsUI$2.class 943B
VersionInfoUI$4.class 935B
NewFileTypeUI$2.class 928B
NewFileTypeUI$1.class 928B
NewFileTypeUI$3.class 928B
TaskManager$1.class 927B
FileInfoUI$5.class 905B
NewFileTypeUI$1.class 904B
VersionInfoUI$1.class 904B
NewFileTypeUI$2.class 904B
VersionInfoUI$2.class 904B
RecycleBinUI$4.class 891B
RecycleBinUI$3.class 891B
RecycleBinUI$2.class 891B
RecycleBinUI$1.class 891B
FileSystemWatcher$2.class 876B
FileInfoUI$4.class 865B
FileInfoUI$3.class 865B
FileInfoUI$2.class 865B
ShowHideWindow.class 855B
VersionInfoUI$3.class 845B
GetSystemDirectory.class 836B
RecycleBinUI$5.class 834B
EventLogViewer$2.class 819B
FileSystemWatcherUI$4.class 812B
FileInfoUI$1.class 812B
TaskManager$11.class 802B
MessageBoxJFrame$1.class 793B
共 506 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
fengyuboqing
- 粉丝: 0
- 资源: 12
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功