Skip to content

Commit 815d39c

Browse files
committed
Basic code documentation and removal of unused imports.
1 parent a0db1e9 commit 815d39c

20 files changed

Lines changed: 205 additions & 85 deletions

nbproject/private/private.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
33
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
44
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
5-
<group>
6-
<file>file:/E:/NPROY7/Projects/FileRenamer/FileRenamerFX/readme.md</file>
7-
</group>
5+
<group/>
86
</open-files>
97
</project-private>

src/org/grios/filerenfx/core/ActionsPersist.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
/*
2-
* To change this license header, choose License Headers in Project Properties.
3-
* To change this template file, choose Tools | Templates
4-
* and open the template in the editor.
2+
* Project: FileRenamerFX
3+
* Artifact: ActionsPersist.java
4+
* Version: 0.1
5+
* Date: 2021-09-09 20:03:00
6+
* Author: Miguel Angel Gil Rios (LiveGrios)
7+
* Email: angel.grios@gmail.com
8+
* Comments: This class is intended to persist the actions that
9+
* users add to their workspace.
510
*/
611
package org.grios.filerenfx.core;
712

src/org/grios/filerenfx/core/parse/Action.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
/*
2-
* To change this license header, choose License Headers in Project Properties.
3-
* To change this template file, choose Tools | Templates
4-
* and open the template in the editor.
2+
* Project: FileRenamerFX
3+
* Artifact: Action.java
4+
* Version: 0.1
5+
* Date: 2021-09-09 20:03:00
6+
* Author: Miguel Angel Gil Rios (LiveGrios)
7+
* Email: angel.grios@gmail.com
8+
* Comments: First code proposal.
59
*/
610
package org.grios.filerenfx.core.parse;
711

812
/**
9-
*
10-
* @author LiveGrios
13+
* This class represents the concept of an Action which defines
14+
* an operation to generate new file names or part of the new name.
15+
* @author LiveGrios
1116
*/
1217
public abstract class Action
1318
{

src/org/grios/filerenfx/core/parse/ActionConstant.java

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
/*
2-
* To change this license header, choose License Headers in Project Properties.
3-
* To change this template file, choose Tools | Templates
4-
* and open the template in the editor.
2+
* Project: FileRenamerFX
3+
* Artifact: ActionConstant.java
4+
* Version: 0.1
5+
* Date: 2021-09-09 20:03:00
6+
* Author: Miguel Angel Gil Rios (LiveGrios)
7+
* Email: angel.grios@gmail.com
8+
* Comments: First code proposal.
59
*/
610
package org.grios.filerenfx.core.parse;
711

812
/**
9-
*
10-
* @author LiveGrios
13+
* This class implements the functionality to put a constant string in the
14+
* new file names.
15+
* @author LiveGrios
1116
*/
1217
public class ActionConstant extends Action
1318
{

src/org/grios/filerenfx/core/parse/ActionCounter.java

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
/*
2-
* To change this license header, choose License Headers in Project Properties.
3-
* To change this template file, choose Tools | Templates
4-
* and open the template in the editor.
2+
* Project: FileRenamerFX
3+
* Artifact: ActionCounter.java
4+
* Version: 0.1
5+
* Date: 2021-09-09 20:03:00
6+
* Author: Miguel Angel Gil Rios (LiveGrios)
7+
* Email: angel.grios@gmail.com
8+
* Comments: First code proposal.
59
*/
610
package org.grios.filerenfx.core.parse;
711

812
import java.text.DecimalFormat;
913

1014
/**
11-
*
12-
* @author LiveGrios
15+
* This class implements the functionality to perform a counter task
16+
* that will be reflected in the new file names.
17+
* @author LiveGrios
1318
*/
1419
public class ActionCounter extends Action
1520
{
@@ -20,7 +25,7 @@ public class ActionCounter extends Action
2025

2126
public ActionCounter()
2227
{
23-
pattern = "#";
28+
pattern = "0";
2429
df = new DecimalFormat(pattern);
2530
}
2631

src/org/grios/filerenfx/core/parse/ActionExtract.java

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
/*
2-
* To change this license header, choose License Headers in Project Properties.
3-
* To change this template file, choose Tools | Templates
4-
* and open the template in the editor.
2+
* Project: FileRenamerFX
3+
* Artifact: ActionExtract.java
4+
* Version: 0.1
5+
* Date: 2021-09-09 20:03:00
6+
* Author: Miguel Angel Gil Rios (LiveGrios)
7+
* Email: angel.grios@gmail.com
8+
* Comments: First code proposal.
59
*/
610
package org.grios.filerenfx.core.parse;
711

812
/**
9-
*
10-
* @author LiveGrios
13+
* This class implements the functionality to define an extract operation
14+
* that will act over the original file name in order to substract specific
15+
* character sequences from it.
16+
* @author LiveGrios
1117
*/
1218
public class ActionExtract extends Action
1319
{

src/org/grios/filerenfx/core/parse/Renamer.java

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
/*
2-
* To change this license header, choose License Headers in Project Properties.
3-
* To change this template file, choose Tools | Templates
4-
* and open the template in the editor.
2+
* Project: FileRenamerFX
3+
* Artifact: Renamer.java
4+
* Version: 0.1
5+
* Date: 2021-09-09 20:03:00
6+
* Author: Miguel Angel Gil Rios (LiveGrios)
7+
* Email: angel.grios@gmail.com
8+
* Comments: First code proposal.
59
*/
610
package org.grios.filerenfx.core.parse;
711

812
import java.util.List;
913

1014
/**
11-
*
12-
* @author LiveGrios
15+
* This class contains the method to process actions and generate new
16+
* file names.
17+
* @author LiveGrios
1318
*/
1419
public class Renamer
1520
{
1621
/**
17-
*
22+
* This method processes a set of actions in order to compute
23+
* the new file name based on them.
1824
* @param fname The Filename whithout extension.
1925
* @param ext The File Extension.
2026
* @param actions The array of renaming actions to be aplied.

src/org/grios/filerenfx/gui/Main.java

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
/*
2-
* To change this license header, choose License Headers in Project Properties.
3-
* To change this template file, choose Tools | Templates
4-
* and open the template in the editor.
2+
* Project: FileRenamerFX
3+
* Artifact: Main.java
4+
* Version: 0.1
5+
* Date: 2021-09-09 20:03:00
6+
* Author: Miguel Angel Gil Rios (LiveGrios)
7+
* Email: angel.grios@gmail.com
8+
* Comments: This is the main entry point to the project execution.
59
*/
610
package org.grios.filerenfx.gui;
711

@@ -32,7 +36,6 @@
3236
import javafx.stage.FileChooser;
3337
import javafx.stage.Stage;
3438
import javafx.stage.StageStyle;
35-
import org.grios.filerenfx.core.ActionsPersist;
3639
import org.grios.filerenfx.gui.components.action.IPaneActionListener;
3740
import org.grios.filerenfx.gui.components.action.PaneAction;
3841
import org.grios.filerenfx.model.FileDescriptor;
@@ -42,8 +45,8 @@
4245
import org.grios.filerenfx.task.TaskRenameFiles;
4346

4447
/**
45-
*
46-
* @author LiveGrios
48+
* This is the main class of the project.
49+
* @author LiveGrios
4750
*/
4851
public class Main extends Application
4952
{

src/org/grios/filerenfx/gui/WindowAbout.java

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
/*
2-
* To change this license header, choose License Headers in Project Properties.
3-
* To change this template file, choose Tools | Templates
4-
* and open the template in the editor.
2+
* Project: FileRenamerFX
3+
* Artifact: WindowAbout.java
4+
* Version: 0.1
5+
* Date: 2021-09-09 20:03:00
6+
* Author: Miguel Angel Gil Rios (LiveGrios)
7+
* Email: angel.grios@gmail.com
8+
* Comments: This is the first proposal code.
59
*/
610
package org.grios.filerenfx.gui;
711

812
import java.io.File;
9-
import javafx.beans.value.ChangeListener;
1013
import javafx.beans.value.ObservableValue;
1114
import javafx.fxml.FXML;
1215
import javafx.fxml.FXMLLoader;
1316
import javafx.scene.Scene;
14-
import javafx.scene.image.Image;
1517
import javafx.scene.input.KeyCode;
16-
import javafx.scene.layout.BorderPane;
1718
import javafx.scene.web.WebView;
1819
import javafx.stage.Stage;
1920
import javafx.stage.StageStyle;
2021

2122
/**
22-
*
23-
* @author LiveGrios
23+
* This class is the JavaFX Stage that will display the
24+
* about information.
25+
* @author LiveGrios
2426
*/
2527
public class WindowAbout extends Stage
2628
{

src/org/grios/filerenfx/gui/components/TableAdapterFile.java

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
/*
2-
* To change this license header, choose License Headers in Project Properties.
3-
* To change this template file, choose Tools | Templates
4-
* and open the template in the editor.
2+
* Project: FileRenamerFX
3+
* Artifact: TableAdapterFile.java
4+
* Version: 0.1
5+
* Date: 2021-09-09 20:03:00
6+
* Author: Miguel Angel Gil Rios (LiveGrios)
7+
* Email: angel.grios@gmail.com
8+
* Comments: This is the first proposal code.
59
*/
610
package org.grios.filerenfx.gui.components;
711

@@ -16,11 +20,18 @@
1620
import org.grios.filerenfx.model.FileDescriptor;
1721

1822
/**
19-
*
20-
* @author LiveGrios
23+
* This class contains the methods to create columns and their corresponding
24+
* renderers in order to display information of the loaded files.
25+
* @author LiveGrios
2126
*/
2227
public class TableAdapterFile
2328
{
29+
/**
30+
* This method creates the TableColumns and their respective renderers
31+
* that will contain the files information.
32+
* @param tv
33+
* @param files
34+
*/
2435
public static void adapt(TableView<FileDescriptor> tv, ObservableList<FileDescriptor> files)
2536
{
2637
TableColumn<FileDescriptor, Void> tcRowNumber = new TableColumn<>("");

0 commit comments

Comments
 (0)