-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fixes for method execution * Made modular * Moved some classes into their own file * New theme (JMetro) * Dependency and JRE update
- Loading branch information
1 parent
4f34585
commit 25e6b61
Showing
28 changed files
with
1,695 additions
and
1,486 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
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,19 @@ | ||
#ScenicView properties | ||
#Sat Oct 07 23:07:07 BST 2023 | ||
stageWidth=1023.0 | ||
showBaseline=false | ||
ignoreMouseTransparentNodes=true | ||
splitPaneDividerPosition=0.4530791788856305 | ||
showNodesIdInTree=false | ||
showDefaultProperties=true | ||
showCSSProperties=true | ||
collapseControls=true | ||
showSearchBar=true | ||
showFilteredNodesInTree=true | ||
autoRefreshStyleSheets=true | ||
showBounds=true | ||
collapseContainerControls=false | ||
automaticScenegraphStructureRefreshing=true | ||
registerShortcuts=true | ||
stageHeight=777.0 | ||
showInvisibleNodes=false |
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,18 @@ | ||
open module uk.co.bithatch.djfeet { | ||
requires com.miglayout.javafx; | ||
requires javafx.controls; | ||
requires com.miglayout.core; | ||
requires org.freedesktop.dbus; | ||
requires org.jsoup; | ||
requires org.kordamp.ikonli.fontawesome; | ||
requires org.kordamp.ikonli.javafx; | ||
requires java.prefs; | ||
requires spring.expression; | ||
requires spring.core; | ||
requires org.freedesktop.dbus.utils; | ||
requires javafx.graphics; | ||
requires org.jfxtras.styles.jmetro; | ||
requires static org.scenicview.scenicview; | ||
requires jul.to.slf4j; | ||
|
||
} |
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,101 @@ | ||
package uk.co.bithatch.djfeet; | ||
|
||
import net.miginfocom.layout.AC; | ||
import net.miginfocom.layout.LC; | ||
import org.tbee.javafx.scene.layout.MigPane; | ||
|
||
import javafx.scene.control.ButtonBar.ButtonData; | ||
import javafx.scene.control.ButtonType; | ||
import javafx.scene.control.Dialog; | ||
import javafx.scene.control.Label; | ||
import javafx.stage.Stage; | ||
import javafx.stage.StageStyle; | ||
|
||
public abstract class AbstractPane extends MigPane { | ||
|
||
private final String applyText; | ||
private final String title; | ||
private final Stage stage; | ||
|
||
protected Dialog<Boolean> dialog; | ||
|
||
public AbstractPane(Stage stage, String title, String applyText) { | ||
super(); | ||
this.applyText = applyText; | ||
this.title = title; | ||
this.stage = stage; | ||
} | ||
|
||
public AbstractPane(Stage stage, String title, String applyText, LC layoutConstraints, AC colConstraints, AC rowConstraints) { | ||
super(layoutConstraints, colConstraints, rowConstraints); | ||
this.applyText = applyText; | ||
this.title = title; | ||
this.stage = stage; | ||
} | ||
|
||
public AbstractPane(Stage stage, String title, String applyText, LC layoutConstraints, AC colConstraints) { | ||
super(layoutConstraints, colConstraints); | ||
this.applyText = applyText; | ||
this.title = title; | ||
this.stage = stage; | ||
} | ||
|
||
public AbstractPane(Stage stage, String title, String applyText, LC layoutConstraints) { | ||
super(layoutConstraints); | ||
this.applyText = applyText; | ||
this.title = title; | ||
this.stage = stage; | ||
} | ||
|
||
public AbstractPane(Stage stage, String title, String applyText, String layoutConstraints, String colConstraints, String rowConstraints) { | ||
super(layoutConstraints, colConstraints, rowConstraints); | ||
this.applyText = applyText; | ||
this.title = title; | ||
this.stage = stage; | ||
} | ||
|
||
public AbstractPane(Stage stage, String title, String applyText, String layoutConstraints, String colConstraints) { | ||
super(layoutConstraints, colConstraints); | ||
this.applyText = applyText; | ||
this.title = title; | ||
this.stage = stage; | ||
} | ||
|
||
public AbstractPane(Stage stage, String title, String applyText, String layoutConstraints) { | ||
super(layoutConstraints); | ||
this.applyText = applyText; | ||
this.title = title; | ||
this.stage = stage; | ||
} | ||
|
||
public void show() { | ||
dialog = new Dialog<>(); | ||
dialog.initOwner(stage); | ||
dialog.initStyle(StageStyle.UTILITY); | ||
ButtonType loginButtonType = new ButtonType(applyText, ButtonData.APPLY); | ||
dialog.setResultConverter(b -> { | ||
if (b == loginButtonType) { | ||
return execute(); | ||
} else | ||
return Boolean.FALSE; | ||
}); | ||
dialog.setOnCloseRequest(e -> { | ||
if (dialog.getResult()) | ||
e.consume(); | ||
}); | ||
dialog.setTitle(title); | ||
|
||
var pane = dialog.getDialogPane(); | ||
pane.getButtonTypes().addAll(loginButtonType, ButtonType.CLOSE); | ||
DJFeetApp.decorateStylesheets(pane.getStylesheets()); | ||
pane.setContent(this); | ||
dialog.show(); | ||
} | ||
|
||
protected abstract boolean execute(); | ||
|
||
protected Label bold(Label label) { | ||
label.getStyleClass().add("strong"); | ||
return label; | ||
} | ||
} |
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
Oops, something went wrong.