-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The basic window interface for the bibliography consistency check #12086
Closed
+80
−0
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
src/main/java/org/jabref/gui/entryeditor/JabRefEntryEditor.java
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,80 @@ | ||
package org.jabref.gui.entryeditor; | ||
|
||
import javafx.application.Application; | ||
import javafx.scene.Scene; | ||
import javafx.scene.control.*; | ||
import javafx.scene.layout.*; | ||
import javafx.stage.Stage; | ||
|
||
public class JabRefEntryEditor extends Application { | ||
|
||
// Main entry point for JavaFX application | ||
@Override | ||
public void start(Stage primaryStage) { | ||
primaryStage.setTitle("JabRef Entry Editor"); | ||
|
||
// Create the main layout | ||
VBox mainLayout = new VBox(10); | ||
// mainLayout.setPadding(new Insets(15, 15, 15, 15)); | ||
|
||
// Section 1: Entry Details (e.g., Title, Author) | ||
Label entryLabel = new Label("Edit Entry Information:"); | ||
TextField titleField = new TextField(); | ||
titleField.setPromptText("Enter Title"); | ||
TextField authorField = new TextField(); | ||
authorField.setPromptText("Enter Author"); | ||
|
||
// Section 2: Linked Files | ||
Label linkedFilesLabel = new Label("Linked Files:"); | ||
ListView<String> linkedFilesList = new ListView<>(); | ||
linkedFilesList.getItems().addAll("File1.pdf", "File2.pdf"); | ||
|
||
// Button to link new file | ||
Button linkFileButton = new Button("Link New File"); | ||
linkFileButton.setOnAction(e -> { | ||
// Logic to add a new linked file (mock behavior here) | ||
linkedFilesList.getItems().add("NewLinkedFile.pdf"); | ||
}); | ||
|
||
// Section 3: Search Indexing Status | ||
Label searchStatusLabel = new Label("Search Index Status:"); | ||
CheckBox reindexCheckbox = new CheckBox("Reindex linked files after editing"); | ||
reindexCheckbox.setSelected(true); // Default is to reindex | ||
|
||
reindexCheckbox.setOnAction(e -> { | ||
if (reindexCheckbox.isSelected()) { | ||
System.out.println("Reindexing enabled for linked files."); | ||
// Add logic to trigger reindexing of linked files | ||
} else { | ||
System.out.println("Reindexing disabled for linked files."); | ||
} | ||
}); | ||
|
||
// Button to save the entry changes | ||
Button saveButton = new Button("Save Entry"); | ||
saveButton.setOnAction(e -> { | ||
// Here you would add logic to save the entry changes | ||
String title = titleField.getText(); | ||
String author = authorField.getText(); | ||
System.out.println("Entry saved: " + title + " by " + author); | ||
}); | ||
|
||
// Add components to layout | ||
mainLayout.getChildren().addAll( | ||
entryLabel, titleField, authorField, | ||
linkedFilesLabel, linkedFilesList, linkFileButton, | ||
searchStatusLabel, reindexCheckbox, | ||
saveButton | ||
); | ||
|
||
// Set up the scene and stage | ||
Scene scene = new Scene(mainLayout, 400, 400); | ||
primaryStage.setScene(scene); | ||
primaryStage.show(); | ||
} | ||
|
||
// Entry point for the program | ||
public static void main(String[] args) { | ||
launch(args); | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No effort at all.