refactored to cz.kamma
This commit is contained in:
parent
0a95ad9f53
commit
fe546f6368
@ -19,7 +19,7 @@ Dvoupanelový souborový manažer podobný Total Commander, vytvořený v Java 1
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
mvn clean compile
|
mvn clean compile
|
||||||
mvn exec:java -Dexec.mainClass="com.kfmanager.MainApp"
|
mvn exec:java -Dexec.mainClass="cz.kamma.kfmanager.MainApp"
|
||||||
```
|
```
|
||||||
|
|
||||||
Nebo vytvoření JAR souboru:
|
Nebo vytvoření JAR souboru:
|
||||||
|
|||||||
6
pom.xml
6
pom.xml
@ -5,7 +5,7 @@
|
|||||||
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>com.kfmanager</groupId>
|
<groupId>cz.kamma.kfmanager</groupId>
|
||||||
<artifactId>kf-manager</artifactId>
|
<artifactId>kf-manager</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
<configuration>
|
<configuration>
|
||||||
<archive>
|
<archive>
|
||||||
<manifest>
|
<manifest>
|
||||||
<mainClass>com.kfmanager.MainApp</mainClass>
|
<mainClass>cz.kamma.kfmanager.MainApp</mainClass>
|
||||||
</manifest>
|
</manifest>
|
||||||
</archive>
|
</archive>
|
||||||
</configuration>
|
</configuration>
|
||||||
@ -69,7 +69,7 @@
|
|||||||
</descriptorRefs>
|
</descriptorRefs>
|
||||||
<archive>
|
<archive>
|
||||||
<manifest>
|
<manifest>
|
||||||
<mainClass>com.kfmanager.MainApp</mainClass>
|
<mainClass>cz.kamma.kfmanager.MainApp</mainClass>
|
||||||
</manifest>
|
</manifest>
|
||||||
</archive>
|
</archive>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package com.kfmanager;
|
package cz.kamma.kfmanager;
|
||||||
|
|
||||||
import com.kfmanager.ui.MainWindow;
|
import cz.kamma.kfmanager.ui.MainWindow;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.kfmanager.config;
|
package cz.kamma.kfmanager.config;
|
||||||
|
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.kfmanager.model;
|
package cz.kamma.kfmanager.model;
|
||||||
|
|
||||||
import javax.swing.Icon;
|
import javax.swing.Icon;
|
||||||
import javax.swing.filechooser.FileSystemView;
|
import javax.swing.filechooser.FileSystemView;
|
||||||
@ -1,6 +1,6 @@
|
|||||||
package com.kfmanager.service;
|
package cz.kamma.kfmanager.service;
|
||||||
|
|
||||||
import com.kfmanager.model.FileItem;
|
import cz.kamma.kfmanager.model.FileItem;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.nio.file.*;
|
import java.nio.file.*;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.kfmanager.ui;
|
package cz.kamma.kfmanager.ui;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
@ -1,6 +1,6 @@
|
|||||||
package com.kfmanager.ui;
|
package cz.kamma.kfmanager.ui;
|
||||||
|
|
||||||
import com.kfmanager.config.AppConfig;
|
import cz.kamma.kfmanager.config.AppConfig;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
@ -1,6 +1,6 @@
|
|||||||
package com.kfmanager.ui;
|
package cz.kamma.kfmanager.ui;
|
||||||
|
|
||||||
import com.kfmanager.model.FileItem;
|
import cz.kamma.kfmanager.model.FileItem;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
@ -16,7 +16,7 @@ public class FilePanel extends JPanel {
|
|||||||
private JTabbedPane tabbedPane;
|
private JTabbedPane tabbedPane;
|
||||||
private JComboBox<File> driveCombo;
|
private JComboBox<File> driveCombo;
|
||||||
private JLabel driveInfoLabel;
|
private JLabel driveInfoLabel;
|
||||||
private com.kfmanager.config.AppConfig appConfig;
|
private cz.kamma.kfmanager.config.AppConfig appConfig;
|
||||||
private Runnable onDirectoryChangedAll;
|
private Runnable onDirectoryChangedAll;
|
||||||
|
|
||||||
public FilePanel(String initialPath) {
|
public FilePanel(String initialPath) {
|
||||||
@ -290,7 +290,7 @@ public class FilePanel extends JPanel {
|
|||||||
/**
|
/**
|
||||||
* Provide AppConfig so tabs can persist/retrieve sort settings
|
* Provide AppConfig so tabs can persist/retrieve sort settings
|
||||||
*/
|
*/
|
||||||
public void setAppConfig(com.kfmanager.config.AppConfig cfg) {
|
public void setAppConfig(cz.kamma.kfmanager.config.AppConfig cfg) {
|
||||||
this.appConfig = cfg;
|
this.appConfig = cfg;
|
||||||
// propagate to existing tabs
|
// propagate to existing tabs
|
||||||
for (int i = 0; i < tabbedPane.getTabCount(); i++) {
|
for (int i = 0; i < tabbedPane.getTabCount(); i++) {
|
||||||
@ -1,6 +1,6 @@
|
|||||||
package com.kfmanager.ui;
|
package cz.kamma.kfmanager.ui;
|
||||||
|
|
||||||
import com.kfmanager.model.FileItem;
|
import cz.kamma.kfmanager.model.FileItem;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.filechooser.FileSystemView;
|
import javax.swing.filechooser.FileSystemView;
|
||||||
@ -1,6 +1,6 @@
|
|||||||
package com.kfmanager.ui;
|
package cz.kamma.kfmanager.ui;
|
||||||
|
|
||||||
import com.kfmanager.model.FileItem;
|
import cz.kamma.kfmanager.model.FileItem;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.table.AbstractTableModel;
|
import javax.swing.table.AbstractTableModel;
|
||||||
@ -50,7 +50,7 @@ public class FilePanelTab extends JPanel {
|
|||||||
// Sorting state for FULL mode header clicks
|
// Sorting state for FULL mode header clicks
|
||||||
private int sortColumn = -1; // 0=name,1=size,2=date
|
private int sortColumn = -1; // 0=name,1=size,2=date
|
||||||
private boolean sortAscending = true;
|
private boolean sortAscending = true;
|
||||||
private com.kfmanager.config.AppConfig persistedConfig;
|
private cz.kamma.kfmanager.config.AppConfig persistedConfig;
|
||||||
// Track last selection to restore it if focus is requested on empty area
|
// Track last selection to restore it if focus is requested on empty area
|
||||||
private int lastValidRow = 0;
|
private int lastValidRow = 0;
|
||||||
private int lastValidBriefColumn = 0;
|
private int lastValidBriefColumn = 0;
|
||||||
@ -1280,7 +1280,7 @@ public class FilePanelTab extends JPanel {
|
|||||||
|
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
try {
|
try {
|
||||||
com.kfmanager.service.FileOperations.delete(toDelete, new com.kfmanager.service.FileOperations.ProgressCallback() {
|
cz.kamma.kfmanager.service.FileOperations.delete(toDelete, new cz.kamma.kfmanager.service.FileOperations.ProgressCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onProgress(long current, long total, String currentFile) {
|
public void onProgress(long current, long total, String currentFile) {
|
||||||
progressDialog.updateProgress(current, total, currentFile);
|
progressDialog.updateProgress(current, total, currentFile);
|
||||||
@ -2035,7 +2035,7 @@ public class FilePanelTab extends JPanel {
|
|||||||
/**
|
/**
|
||||||
* Provide AppConfig so this tab can persist and restore sort settings.
|
* Provide AppConfig so this tab can persist and restore sort settings.
|
||||||
*/
|
*/
|
||||||
public void setAppConfig(com.kfmanager.config.AppConfig cfg) {
|
public void setAppConfig(cz.kamma.kfmanager.config.AppConfig cfg) {
|
||||||
this.persistedConfig = cfg;
|
this.persistedConfig = cfg;
|
||||||
// Apply persisted sort if present
|
// Apply persisted sort if present
|
||||||
if (cfg != null) {
|
if (cfg != null) {
|
||||||
@ -2275,7 +2275,7 @@ public class FilePanelTab extends JPanel {
|
|||||||
|
|
||||||
// Perform rename using FileOperations and refresh the directory
|
// Perform rename using FileOperations and refresh the directory
|
||||||
try {
|
try {
|
||||||
com.kfmanager.service.FileOperations.rename(item.getFile(), newName);
|
cz.kamma.kfmanager.service.FileOperations.rename(item.getFile(), newName);
|
||||||
// reload current directory to reflect updated names
|
// reload current directory to reflect updated names
|
||||||
FilePanelTab.this.loadDirectory(FilePanelTab.this.getCurrentDirectory());
|
FilePanelTab.this.loadDirectory(FilePanelTab.this.getCurrentDirectory());
|
||||||
// After reload, select the renamed item and focus the table
|
// After reload, select the renamed item and focus the table
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.kfmanager.ui;
|
package cz.kamma.kfmanager.ui;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
@ -1,9 +1,9 @@
|
|||||||
package com.kfmanager.ui;
|
package cz.kamma.kfmanager.ui;
|
||||||
|
|
||||||
import com.kfmanager.MainApp;
|
import cz.kamma.kfmanager.MainApp;
|
||||||
import com.kfmanager.config.AppConfig;
|
import cz.kamma.kfmanager.config.AppConfig;
|
||||||
import com.kfmanager.model.FileItem;
|
import cz.kamma.kfmanager.model.FileItem;
|
||||||
import com.kfmanager.service.FileOperations;
|
import cz.kamma.kfmanager.service.FileOperations;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.kfmanager.ui;
|
package cz.kamma.kfmanager.ui;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.*;
|
import java.awt.*;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.kfmanager.ui;
|
package cz.kamma.kfmanager.ui;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.border.EmptyBorder;
|
import javax.swing.border.EmptyBorder;
|
||||||
@ -1,7 +1,7 @@
|
|||||||
package com.kfmanager.ui;
|
package cz.kamma.kfmanager.ui;
|
||||||
|
|
||||||
import com.kfmanager.model.FileItem;
|
import cz.kamma.kfmanager.model.FileItem;
|
||||||
import com.kfmanager.service.FileOperations;
|
import cz.kamma.kfmanager.service.FileOperations;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import java.awt.event.KeyEvent;
|
import java.awt.event.KeyEvent;
|
||||||
@ -33,9 +33,9 @@ public class SearchDialog extends JDialog {
|
|||||||
private volatile int foundCount = 0;
|
private volatile int foundCount = 0;
|
||||||
private File searchDirectory;
|
private File searchDirectory;
|
||||||
private volatile boolean searching = false;
|
private volatile boolean searching = false;
|
||||||
private com.kfmanager.config.AppConfig config;
|
private cz.kamma.kfmanager.config.AppConfig config;
|
||||||
|
|
||||||
public SearchDialog(Frame parent, File searchDirectory, com.kfmanager.config.AppConfig config) {
|
public SearchDialog(Frame parent, File searchDirectory, cz.kamma.kfmanager.config.AppConfig config) {
|
||||||
// Make the dialog modeless so it does not remain forced above other windows
|
// Make the dialog modeless so it does not remain forced above other windows
|
||||||
super(parent, "Search files", false);
|
super(parent, "Search files", false);
|
||||||
this.searchDirectory = searchDirectory;
|
this.searchDirectory = searchDirectory;
|
||||||
@ -1,6 +1,6 @@
|
|||||||
package com.kfmanager.ui;
|
package cz.kamma.kfmanager.ui;
|
||||||
|
|
||||||
import com.kfmanager.config.AppConfig;
|
import cz.kamma.kfmanager.config.AppConfig;
|
||||||
|
|
||||||
import javax.swing.*;
|
import javax.swing.*;
|
||||||
import javax.swing.table.DefaultTableModel;
|
import javax.swing.table.DefaultTableModel;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.kfmanager.ui;
|
package cz.kamma.kfmanager.ui;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display mode for the panel
|
* Display mode for the panel
|
||||||
Loading…
x
Reference in New Issue
Block a user