Quick refactoring; readme update; POM update
This commit is contained in:
		
							parent
							
								
									83d57d5ff5
								
							
						
					
					
						commit
						bb3bbc2efc
					
				
					 4 changed files with 49 additions and 52 deletions
				
			
		
							
								
								
									
										13
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								README.md
									
									
									
									
									
								
							| 
						 | 
					@ -21,6 +21,19 @@ Deep WIP multi-tool to work with NS-specific files / filesystem images.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
JRE/JDK 8u60 or higher.
 | 
					JRE/JDK 8u60 or higher.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Notes about usage
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					1. Start from clicking on 'settings' and importing keys. Use import. Don't waste your time.
 | 
				
			||||||
 | 
					2. To open sub-file from the file use right mouse click and select 'Open'. Supported formats listed below.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Build this
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					1. Install JDK
 | 
				
			||||||
 | 
					2. Install Maven
 | 
				
			||||||
 | 
					3. $ git clone https://github.com/developersu/konogonka.git
 | 
				
			||||||
 | 
					4. $ mvn -B -DskipTests clean package
 | 
				
			||||||
 | 
					5. $ java -jar target/konogonka-0.x.x-jar-with-dependencies.jar
 | 
				
			||||||
 | 
					
 | 
				
			||||||
### Checklist
 | 
					### Checklist
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* [x] NSP (PFS0)
 | 
					* [x] NSP (PFS0)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								pom.xml
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								pom.xml
									
									
									
									
									
								
							| 
						 | 
					@ -8,7 +8,7 @@
 | 
				
			||||||
    <name>konogonka</name>
 | 
					    <name>konogonka</name>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <artifactId>konogonka</artifactId>
 | 
					    <artifactId>konogonka</artifactId>
 | 
				
			||||||
    <version>0.0.1-SNAPSHOT</version>
 | 
					    <version>0.0.2-SNAPSHOT</version>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <url>https://github.com/developersu/${project.name}}/</url>
 | 
					    <url>https://github.com/developersu/${project.name}}/</url>
 | 
				
			||||||
    <description>
 | 
					    <description>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -117,64 +117,48 @@ public class Pfs0TableViewController implements Initializable {
 | 
				
			||||||
        fileSizeColumn.setCellValueFactory(new PropertyValueFactory<>("fileSize"));
 | 
					        fileSizeColumn.setCellValueFactory(new PropertyValueFactory<>("fileSize"));
 | 
				
			||||||
        fileOffsetColumn.setCellValueFactory(new PropertyValueFactory<>("fileOffset"));
 | 
					        fileOffsetColumn.setCellValueFactory(new PropertyValueFactory<>("fileOffset"));
 | 
				
			||||||
        // ><
 | 
					        // ><
 | 
				
			||||||
        uploadColumn.setCellValueFactory(new Callback<TableColumn.CellDataFeatures<Pfs0RowModel, Boolean>, ObservableValue<Boolean>>() {
 | 
					        uploadColumn.setCellValueFactory(paramFeatures -> {
 | 
				
			||||||
            @Override
 | 
					            Pfs0RowModel model = paramFeatures.getValue();
 | 
				
			||||||
            public ObservableValue<Boolean> call(TableColumn.CellDataFeatures<Pfs0RowModel, Boolean> paramFeatures) {
 | 
					 | 
				
			||||||
                Pfs0RowModel model = paramFeatures.getValue();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                SimpleBooleanProperty booleanProperty = new SimpleBooleanProperty(model.isMarkSelected());
 | 
					            SimpleBooleanProperty booleanProperty = new SimpleBooleanProperty(model.isMarkSelected());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                booleanProperty.addListener(new ChangeListener<Boolean>() {
 | 
					            booleanProperty.addListener((observableValue, oldValue, newValue) -> {
 | 
				
			||||||
                    @Override
 | 
					                model.setMarkSelected(newValue);
 | 
				
			||||||
                    public void changed(ObservableValue<? extends Boolean> observableValue, Boolean oldValue, Boolean newValue) {
 | 
					                table.refresh();
 | 
				
			||||||
                        model.setMarkSelected(newValue);
 | 
					            });
 | 
				
			||||||
                        table.refresh();
 | 
					            return booleanProperty;
 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                });
 | 
					 | 
				
			||||||
                return booleanProperty;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        uploadColumn.setCellFactory(new Callback<TableColumn<Pfs0RowModel, Boolean>, TableCell<Pfs0RowModel, Boolean>>() {
 | 
					        uploadColumn.setCellFactory(paramFeatures -> new CheckBoxTableCell<>());
 | 
				
			||||||
            @Override
 | 
					 | 
				
			||||||
            public TableCell<Pfs0RowModel, Boolean> call(TableColumn<Pfs0RowModel, Boolean> paramFeatures) {
 | 
					 | 
				
			||||||
                return new CheckBoxTableCell<>();
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
        });
 | 
					 | 
				
			||||||
        table.setRowFactory(        // this shit is made to implement context menu. It's such a pain..
 | 
					        table.setRowFactory(        // this shit is made to implement context menu. It's such a pain..
 | 
				
			||||||
                new Callback<TableView<Pfs0RowModel>, TableRow<Pfs0RowModel>>() {
 | 
					                Pfs0RowModelTableView -> {
 | 
				
			||||||
                    @Override
 | 
					                    final TableRow<Pfs0RowModel> row = new TableRow<>();
 | 
				
			||||||
                    public TableRow<Pfs0RowModel> call(TableView<Pfs0RowModel> Pfs0RowModelTableView) {
 | 
					                    ContextMenu contextMenu = new ContextMenu();
 | 
				
			||||||
                        final TableRow<Pfs0RowModel> row = new TableRow<>();
 | 
					 | 
				
			||||||
                        ContextMenu contextMenu = new ContextMenu();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        MenuItem openMenuItem = new MenuItem("Open");
 | 
					                    MenuItem openMenuItem = new MenuItem("Open");
 | 
				
			||||||
                        openMenuItem.setOnAction(new EventHandler<ActionEvent>() {
 | 
					                    openMenuItem.setOnAction(new EventHandler<ActionEvent>() {
 | 
				
			||||||
                            @Override
 | 
					                        @Override
 | 
				
			||||||
                            public void handle(ActionEvent actionEvent) {
 | 
					                        public void handle(ActionEvent actionEvent) {
 | 
				
			||||||
                                MediatorControl.getInstance().getContoller().showContentWindow(provider, row.getItem());    // TODO: change to something better
 | 
					                            MediatorControl.getInstance().getContoller().showContentWindow(provider, row.getItem());    // TODO: change to something better
 | 
				
			||||||
                            }
 | 
					                        }
 | 
				
			||||||
                        });
 | 
					                    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        contextMenu.getItems().addAll(openMenuItem);
 | 
					                    contextMenu.getItems().addAll(openMenuItem);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                        row.setContextMenu(contextMenu);
 | 
					                    row.setContextMenu(contextMenu);
 | 
				
			||||||
                        row.contextMenuProperty().bind(
 | 
					                    row.contextMenuProperty().bind(
 | 
				
			||||||
                                Bindings.when(Bindings.isNotNull(row.itemProperty())).then(contextMenu).otherwise((ContextMenu)null)
 | 
					                            Bindings.when(Bindings.isNotNull(row.itemProperty())).then(contextMenu).otherwise((ContextMenu)null)
 | 
				
			||||||
                        );
 | 
					                    );
 | 
				
			||||||
                        row.setOnMouseClicked(new EventHandler<MouseEvent>() {      // Just.. don't ask..
 | 
					                    // Just.. don't ask..
 | 
				
			||||||
                            @Override
 | 
					                    row.setOnMouseClicked(mouseEvent -> {
 | 
				
			||||||
                            public void handle(MouseEvent mouseEvent) {
 | 
					                        if (!row.isEmpty() && mouseEvent.getButton() == MouseButton.PRIMARY){
 | 
				
			||||||
                                if (!row.isEmpty() && mouseEvent.getButton() == MouseButton.PRIMARY){
 | 
					                            Pfs0RowModel thisItem = row.getItem();
 | 
				
			||||||
                                    Pfs0RowModel thisItem = row.getItem();
 | 
					                            thisItem.setMarkSelected(!thisItem.isMarkSelected());
 | 
				
			||||||
                                    thisItem.setMarkSelected(!thisItem.isMarkSelected());
 | 
					                            table.refresh();
 | 
				
			||||||
                                    table.refresh();
 | 
					                        }
 | 
				
			||||||
                                }
 | 
					                        mouseEvent.consume();
 | 
				
			||||||
                                mouseEvent.consume();
 | 
					                    });
 | 
				
			||||||
                            }
 | 
					                    return row;
 | 
				
			||||||
                        });
 | 
					 | 
				
			||||||
                        return row;
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
        table.setItems(rowsObsLst);
 | 
					        table.setItems(rowsObsLst);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +30,7 @@ import java.util.Locale;
 | 
				
			||||||
import java.util.ResourceBundle;
 | 
					import java.util.ResourceBundle;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class MainFx extends Application {
 | 
					public class MainFx extends Application {
 | 
				
			||||||
    public static final String appVersion = "v0.0-SNAPSHOT";
 | 
					    public static final String appVersion = "v0.0.2";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public void start(Stage primaryStage) throws Exception{
 | 
					    public void start(Stage primaryStage) throws Exception{
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue