forked from PCGen/pcgen
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Some code refactoring/cleanup and styling of the ability score table
- Loading branch information
1 parent
4db9747
commit 9a8c028
Showing
11 changed files
with
156 additions
and
136 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
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 |
---|---|---|
@@ -1,8 +1,11 @@ | ||
package pcgen.gui3.utilty; | ||
|
||
import javafx.beans.property.Property; | ||
import javafx.beans.property.ReadOnlyBooleanProperty; | ||
|
||
public interface BoundController<T extends Property<?>> | ||
{ | ||
void bind(T property); | ||
|
||
ReadOnlyBooleanProperty isEditing(); | ||
} |
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,32 @@ | ||
package pcgen.gui3.utilty; | ||
|
||
import java.io.IOException; | ||
import java.net.URL; | ||
import lombok.NonNull; | ||
import pcgen.system.LanguageBundle; | ||
|
||
import javafx.fxml.FXMLLoader; | ||
|
||
public class JavaFXLoader | ||
{ | ||
|
||
public record Components<T, U>(T fxml, U controller) | ||
{ | ||
} | ||
|
||
public static <T, U> Components<T, U> load(@NonNull Class<U> controllerClass) | ||
{ | ||
URL resource = controllerClass.getResource(controllerClass.getSimpleName() + ".fxml"); | ||
|
||
FXMLLoader loader = new FXMLLoader(resource, LanguageBundle.getBundle()); | ||
|
||
try | ||
{ | ||
return new Components<>(loader.load(), loader.getController()); | ||
} | ||
catch (IOException e) | ||
{ | ||
throw new RuntimeException(e); | ||
} | ||
} | ||
} |
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 @@ | ||
.titled-pane { | ||
-fx-alignment: center; | ||
} | ||
|
||
.table-column { | ||
-fx-alignment: center; | ||
} |
Oops, something went wrong.