Spring 2019-2020 Java Programming course lab -- Chongqing University. Include my source codes and lab reports.

Overview

JAVA_GUI_File_Manager

Spring 2019-2020 JAVA Programming course homeworks -- Chongqing University. Include my source codes and reports.

Contents:

  1. achieve folder creation, delete, enter.

  2. the realization of the current folder under the list of content.

  3. Realize file copy and folder copy (folder copy refers to deep copy, including all subdirectories and files).

  4. Encrypt and decrypt the specified files.

  5. achieve the specified file and folder compression.

  6. to achieve the decompression of compressed files.

  7. The document manager has a graphical interface.

Design of Classes

Using the MVC design pattern, the program has Model, View and Control three parts:

(1) Model

Contains the FileTree class, which is a custom data structure for the formation and display of the left tree file management interface.

(2) the View

Contains the MainFrame class for displaying the main interface and the MyCellRenderer class for rerendering the generated interface.

(3) Control

Contains classes such as AccessFile and AccessIcon for operation of the entire program function. For the functionality of specific classes, see the class functionality analysis below.

Description of various functions
(1) AccessFile

Gets the filename or folder name of the current path and all subordinate file names under the current path (if the current path is a folder)

GetSingleName: Gets the name of the file or folder in the current path

GetAllName: Gets the names of all subordinate files or folders under the current path (if the current path is a folder)

(2) AccessIcon class:

Get the small ICONS corresponding to the file name or folder of the current path, and the small ICONS corresponding to all subordinate files of the current path (if folder) for file tree rendering

GetSingleIcon: Small icon to get a file or folder in the current path

GetAllIcon: Gets a small icon of all subordinate files or folders under the current path (if the current path is a folder)

(3) CopyFileAndFolder:

To copy folders or files, click Copy in the function box that is displayed

Init: Initializes a member variable of a class, leaving it in its initial state. The purpose is to reset the member variable after each paste, that is, each copy of the content after a paste after the failure, imitate the Windows file management system.

GenerateDir: Source path used during copy generation based on the selected path, which is convenient for pasting.

(4)DeleteFileAndFolder class:

Delete a file or directory

Delete Directly receives the path to be deleted

DeleteFile and deleteFolder are static and can be called separately outside the class, but we use them as utility functions here.

(5) DirectoryHelp class:

Iterate over capital letters A-z to get drive letters

FindDisk obtains the drive letter of the path by iterating

(6)LockAndUnlock class:

The operation of encrypting and decrypting files

EncryptFile: Gets the path to the current file and the folder where the file is located, along with the secret keys

Functions of the secret key: encryption as an operation, set by the user; Decryption is used to restore computations and can only be decrypted if the user enters the correct secret key

(7)PasteFileAndFolder class:

Paste the copied content, calling Either pasteFile or pasteFolder, depending on the type of the copied content

PasteFile: paste a file

PasteFolder: Paste folders

ZipAndUnzip class:

Compress and unzip files

Zip: compressed file

Unzip: Decompresses the file

(9)FileTree class:

Custom data result FileTree, used to mimic Windows style file manager, generates a FileTree on the left side

Modified from Github_Kirill Grouchnikov open source project

(10) MainFrame class:

The main interface of the file operating system

It belongs to the VIEW part of the MVC design structure

Undertake the task of interface interaction with the user

(11)MyCellRenderer class:

Rewrite the re-render class

Used to re-render ICONS

Undertake the task of interface interaction with the user

Design of Process

AccessFile, AccessIcon as a tool class, used to get the name and icon of the file, used to get the icon and name in the panel, so that there is a rendering of the material;

CopyFileAndFolder and PasteFileAndFolder are used to copy and paste selected files or folders, respectively;

DeleteFileAndFolder Is used to delete a single file/folder or multiple files/folders that are selected.

DirectoryHelp is used to find the corresponding drive letter in the system root directory for the current path;

LockAndUnlock encrypts or decrypts a selected file.

ZipandUnzip is used to compress the selected folder/file or multiple folders/files and decompress the selected compressed files.

See codes and corresponding lab reports in the folder of each lab project.

You might also like...

A sideproject to learn more about object-oriented programming, design patterns and Java meanwhile studying an OOP-course.

MyBank Description A console application that simulates a bank with very simple functions. Potential story could be an employee using this application

Mar 23, 2022

The Java implementation of "A Survey of Trajectory Distance Measures and Performance Evaluation". VLDBJ 2020

The Java implementation of

A Survey of Trajectory Distance Measures and Performance Evaluation The Java implementation of the following paper: Han Su, Shuncheng Liu, Bolong Zhen

Oct 19, 2022

This repository contains source code examples to support my course Spring Data JPA and Hibernate Beginner to Guru

Spring Data JPA - Spring Data JPA This repository contains source code examples to support my course Spring Data JPA and Hibernate Beginner to Guru Co

Aug 24, 2022

Solution of all the lectures of "Programming In Java course" (CSE310)

Solution of all the lectures of "Programming In Java course" (CSE310)

May 18, 2022

A mod that delays your chat messages so that they are delayed in reports

A mod that delays your chat messages so that they are delayed in reports

A mod that delays your chat messages so that they are delayed in reports. Making it harder for Mojang to validate, and hopefully a temporary solution to Fabricated chat reports

Aug 16, 2022

Java-Programs---For-Practice is one of the Java Programming Practice Series By Shaikh Minhaj ( minhaj-313 ). This Series will help you to level up your Programming Skills. This Java Programs are very much helpful for Beginners.

Java-Programs---For-Practice is one of the Java Programming Practice Series By Shaikh Minhaj ( minhaj-313 ).  This Series will help you to level up your Programming Skills. This Java Programs are very much helpful for Beginners.

Java-Programs---For-Practice is one of the Java Programming Practice Series By Shaikh Minhaj ( minhaj-313 ). This Series will help you to level up your Programming Skills. This Java Programs are very much helpful for Beginners. If You Have any doubt or query you can ask me here or you can also ask me on My LinkedIn Profile

Nov 8, 2022

Source code of course - Building Real-Time REST APIs with Spring Boot

springboot-blog-rest-api Learn how to build real-time REST APIs with Spring Boot by building a complete Blog App. Source code of Popular Building Real

Jan 6, 2023

Source code of Spring boot + Apache Kafka Udemy Course

Spring Boot + Apache Kafka - The Quickstart Practical Guide- Udemy course Course link: https://www.udemy.com/course/spring-boot-and-apache-kafka/?refe

Dec 21, 2022

Object Oriented Programming Course - Fall Semester 2021

Object Oriented Programming Course (Fall Semester 2021) This repository will store the code we use during the lectures and the exercises sessions of t

Jul 10, 2022
Owner
Chase/Jiaxuan Cai
CQU_CS undergraduate Computational Biology, Deep Learning and Coding Theory
Chase/Jiaxuan Cai
Dynamic Reports using Jasper Reports

DynamicJasper DynamicJasper (DJ) is an API that hides the complexity of JasperReports, it helps developers to save time when designing simple/medium c

intive-FDV 218 Dec 28, 2022
This repo contains all the materials for placement as well as Practical lab codes for all subjects and notes. For students graduating in 2023

UEMK_PLACEMENT_2023 This repo contains all the materials for placement as well as Practical lab codes for all subjects and notes. For students graduat

Shambashib Majumdar 8 Mar 5, 2022
OBJECT ORIENTED PROGRAMING IN JAVA Coursera SPECIALIZATION by DUKE UNIVERSITY & UNIVERSITY OF CALIFORNIA, SAN DIEGO

COURSERA Object Oriented Programming in Java Object Oriented Programming in Java -> by Duke University & University of California, San Diego Java Prog

Farhan Sheth 6 Dec 29, 2022
CSL304: OOPM (Java) Lab [OOPM Lab]

OOPM-JAVA-LAB CSL304: OOPM LAB [SEMESTER III] Syllabus OOPM (JAVA) - Reference Books OOPM Lab 1D Array 2D Array Abstract Class Accept Input From User

AMEY THAKUR 8 Nov 8, 2022
Teaching repository for the undergraduate course in Operations Research at Technical University Munich.

Tutorial for Operations Research SS22 Konstantin Kuchenmeister Teaching repository for the undergraduate course in Operations Research at Technical Un

Konstantin Kuchenmeister 9 Aug 27, 2022
For Jack language. Most of codes were commented with their usage, which can be useful for beginner to realize the running principle of a compiler for object-oriented programming language.

Instructions: Download the Java source codes Store these codes into a local folder and open this folder Click the right key of mouse and click ‘Open i

gooooooood 1.1k Jan 5, 2023
Three Java projects assigned for the Introduction to Object-Oriented Programming (CMPE 160) course in the Spring 2021 semester.

CMPE160-projects Three Java projects assigned for the Introduction to Object-Oriented Programming (CMPE 160) course in the Spring 2021 semester. These

Aras Güngöre 21 Dec 6, 2022
SpringBlade 是一个由商业级项目升级优化而来的SpringCloud分布式微服务架构、SpringBoot单体式微服务架构并存的综合型项目,采用Java8 API重构了业务代码,完全遵循阿里巴巴编码规范。采用Spring Boot 2.4 、Spring Cloud 2020 、Mybatis 等核心技术,同时提供基于React和Vue的两个前端框架用于快速搭建企业级的SaaS多租户微服务平台。

SpringBlade微服务开发平台 采用前后端分离的模式,前端开源两个框架:Sword (基于 React、Ant Design)、Saber (基于 Vue、Element-UI) 后端采用SpringCloud全家桶,并同时对其基础组件做了高度的封装,单独开源出一个框架:BladeTool B

Chill 5.9k Jan 7, 2023
Source codes of book Java Concurrency In Practice, rebuild by maven.

Introduction Source codes of book: Java Concurrency In Practice(2011, Brain Goetz etc. jcip for short.), rebuild from https://jcip.net/ with maven. Mo

Sam Sune 2 Jun 9, 2022
循序渐进,学习Spring Boot、Spring Boot & Shiro、Spring Batch、Spring Cloud、Spring Cloud Alibaba、Spring Security & Spring Security OAuth2,博客Spring系列源码:https://mrbird.cc

Spring 系列教程 该仓库为个人博客https://mrbird.cc中Spring系列源码,包含Spring Boot、Spring Boot & Shiro、Spring Cloud,Spring Boot & Spring Security & Spring Security OAuth2

mrbird 24.8k Jan 6, 2023