-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
427 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
*/target | ||
out |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# F: FULLSEARCH L:LOCALSEARCH | ||
searchMethod: F | ||
excludeFilePathList: [node_modules, $RECYCLE.BIN\\S] | ||
fileList: [docx, doc, xls, xlsx, pdf, txt] | ||
compressFileList: [7z, zip, rar] | ||
# mb | ||
limitFileSize: 500 |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?import javafx.geometry.Insets?> | ||
<?import javafx.scene.layout.GridPane?> | ||
|
||
<?import javafx.scene.control.Button?> | ||
<?import javafx.scene.control.Label?> | ||
<GridPane fx:controller="controller.Controller" | ||
xmlns:fx="http://javafx.com/fxml" alignment="center" hgap="10" vgap="10"> | ||
</GridPane> |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import java.lang.*?> | ||
<?import javafx.scene.control.*?> | ||
<?import javafx.scene.layout.*?> | ||
|
||
<BorderPane prefHeight="400.0" prefWidth="600.0" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8"> | ||
<top><MenuBar BorderPane.alignment="CENTER"> | ||
<menus> | ||
<Menu mnemonicParsing="false" text="File"> | ||
<items> | ||
<MenuItem mnemonicParsing="false" text="Close" /> | ||
</items> | ||
</Menu> | ||
<Menu mnemonicParsing="false" text="Edit"> | ||
<items> | ||
<MenuItem mnemonicParsing="false" text="Delete" /> | ||
</items> | ||
</Menu> | ||
<Menu mnemonicParsing="false" text="Help"> | ||
<items> | ||
<MenuItem mnemonicParsing="false" text="About" /> | ||
</items> | ||
</Menu> | ||
</menus> | ||
</MenuBar> | ||
</top></BorderPane> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<?import java.lang.*?> | ||
<?import javafx.scene.control.*?> | ||
<?import javafx.scene.layout.*?> | ||
|
||
<AnchorPane prefHeight="300.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8"> | ||
<children><SplitPane focusTraversable="true" layoutX="183.0" layoutY="76.0" prefHeight="300.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> | ||
<items> | ||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0" /> | ||
</items> | ||
</SplitPane> | ||
<BorderPane prefHeight="200.0" prefWidth="200.0" /> | ||
<TabPane prefHeight="200.0" prefWidth="200.0" tabClosingPolicy="UNAVAILABLE"> | ||
<tabs> | ||
<Tab text="Untitled Tab 1"> | ||
<content> | ||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" /> | ||
</content> | ||
</Tab> | ||
<Tab text="Untitled Tab 2"> | ||
<content> | ||
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" /> | ||
</content> | ||
</Tab> | ||
</tabs> | ||
</TabPane> | ||
</children></AnchorPane> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package constants; | ||
|
||
public class Constants { | ||
public static String CONFIG_FILEPATH = "config.yaml"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package setting; | ||
|
||
import constants.Constants; | ||
import org.yaml.snakeyaml.Yaml; | ||
import org.yaml.snakeyaml.constructor.Constructor; | ||
|
||
import java.io.File; | ||
import java.io.FileOutputStream; | ||
import java.io.InputStream; | ||
import java.nio.file.Files; | ||
import java.nio.file.Paths; | ||
|
||
public class ConfigController { | ||
|
||
public static ConfigSetting readConfig() { | ||
ConfigSetting configSetting = null; | ||
try { | ||
InputStream configIs = Files.newInputStream(Paths.get(Constants.CONFIG_FILEPATH)); | ||
Yaml yaml = new Yaml(new Constructor(ConfigSetting.class)); | ||
configSetting = yaml.loadAs(configIs, ConfigSetting.class); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
return configSetting; | ||
} | ||
|
||
public static void writeConfigToYaml(ConfigSetting configSetting) { | ||
try { | ||
Yaml yaml = new Yaml(); | ||
String output = yaml.dump(configSetting); | ||
byte[] sourceByte = output.getBytes(); | ||
File file = new File(Constants.CONFIG_FILEPATH); | ||
if (!file.exists()) { | ||
file.createNewFile(); | ||
} | ||
FileOutputStream fileOutputStream = new FileOutputStream(file); | ||
fileOutputStream.write(sourceByte); | ||
fileOutputStream.close(); | ||
} catch (Exception e) { | ||
e.printStackTrace(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package setting; | ||
|
||
import java.util.List; | ||
|
||
public class ConfigSetting { | ||
|
||
private String searchMethod; | ||
|
||
private List<String> excludeFilePathList; | ||
|
||
private List<String> fileList; | ||
|
||
private List<String> compressFileList; | ||
|
||
private boolean hasCreateIndex; | ||
|
||
public String getSearchMethod() { | ||
return searchMethod; | ||
} | ||
|
||
public void setSearchMethod(String searchMethod) { | ||
this.searchMethod = searchMethod; | ||
} | ||
|
||
public List<String> getExcludeFilePathList() { | ||
return excludeFilePathList; | ||
} | ||
|
||
public void setExcludeFilePathList(List<String> excludeFilePathList) { | ||
this.excludeFilePathList = excludeFilePathList; | ||
} | ||
|
||
public List<String> getFileList() { | ||
return fileList; | ||
} | ||
|
||
public void setFileList(List<String> fileList) { | ||
this.fileList = fileList; | ||
} | ||
|
||
public List<String> getCompressFileList() { | ||
return compressFileList; | ||
} | ||
|
||
public void setCompressFileList(List<String> compressFileList) { | ||
this.compressFileList = compressFileList; | ||
} | ||
|
||
public boolean getHasCreateIndex() { | ||
return hasCreateIndex; | ||
} | ||
|
||
public void setHasCreateIndex(boolean hasCreateIndex) { | ||
this.hasCreateIndex = hasCreateIndex; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters