Open
Conversation
…DetachedTabController.java
used for scaling detached window
new file: src/main/resources/Views/DetachedTabView.fxml
new View with an empty anchorPane
modified: src/main/java/pl/edu/pwr/pwrinspace/poliwrocket/Controller/MainController.java
added methods responsible for detaching tab (detaching and detachTab) and calling detaching in initialize()
and methods responsible for changing mode to light or dark(applyStyleToNode, findAndStyleTiles, applyTileStyle, applyGaugeStyle) and using them in invalidated()
modified: src/main/java/pl/edu/pwr/pwrinspace/poliwrocket/Controller/SettingsController.java
added method onToggleLightMode that uses Configuration
modified: src/main/java/pl/edu/pwr/pwrinspace/poliwrocket/Main.java
not adding DetachedTabView to loaders
modified: src/main/java/pl/edu/pwr/pwrinspace/poliwrocket/Model/Configuration/Configuration.java
adding field lightMode and method setLightMode to use observable in MainController
modified: src/main/resources/Views/SettingsView.fxml
added toggle button to switch between modes(light dark)
modified: src/main/resources/Views/constants.css
new file: src/main/resources/Views/constantsLight.css
to switch between css when changing mode(light dark)
…DetachedTabController.java
used for scaling detached window
new file: src/main/resources/Views/DetachedTabView.fxml
new View with an empty anchorPane
modified: src/main/java/pl/edu/pwr/pwrinspace/poliwrocket/Controller/MainController.java
added methods responsible for detaching tab (detaching and detachTab) and calling detaching in initialize()
and methods responsible for changing mode to light or dark(applyStyleToNode, findAndStyleTiles, applyTileStyle, applyGaugeStyle) and using them in invalidated()
modified: src/main/java/pl/edu/pwr/pwrinspace/poliwrocket/Controller/SettingsController.java
added method onToggleLightMode that uses Configuration
modified: src/main/java/pl/edu/pwr/pwrinspace/poliwrocket/Main.java
not adding DetachedTabView to loaders
modified: src/main/java/pl/edu/pwr/pwrinspace/poliwrocket/Model/Configuration/Configuration.java
adding field lightMode and method setLightMode to use observable in MainController
modified: src/main/resources/Views/SettingsView.fxml
added toggle button to switch between modes(light dark)
modified: src/main/resources/Views/constants.css
new file: src/main/resources/Views/constantsLight.css
to switch between css when changing mode(light dark)
…wanie taba z glownego okna, usuniecie linijki z readme(z path javafx), ustawienie glownego okna na caly ekran
…/DetachedTabController.java
few changes, logic the same
modified: src/main/java/pl/edu/pwr/pwrinspace/poliwrocket/Controller/MainController.java
added methods for detaching tabs - setupDetachedWindowsProvider, configureTabContextMenu,detachTabToNewWindow , and changed the warning in findAndStyleTiles
created: src/main/java/pl/edu/pwr/pwrinspace/poliwrocket/Provider/DetachedWindowsProvider.java
added a class used for managing all active tab panes, has a method for transfering tabs
modified: src/main/resources/Views/DetachedTabView.fxml
added TabPane
modified: src/main/resources/Views/constants.css
changes for ContextMenu
modified: src/main/resources/Views/constantsLight.css
changes for ContextMenu
kasprzakewa
reviewed
Mar 16, 2026
Comment on lines
484
to
495
| for (Node n : root.getChildrenUnmodifiable()) { | ||
| if (n instanceof Tile) { | ||
| Tile tile = (Tile) n; | ||
| applyTileStyle(tile, bg, fg); | ||
| }else if (n instanceof Gauge){ | ||
| }else if (n instanceof Gauge) { | ||
| Gauge gauge = (Gauge) n; | ||
| applyGaugeStyle(gauge, fg); | ||
| }else{ | ||
| System.out.println("Node ignored for styling: " + n.getClass().getSimpleName()); | ||
| }if (n.getClass().getName().startsWith("pl.edu.pwr") && | ||
| !(n instanceof Tile || n instanceof Gauge || n instanceof Parent)) { | ||
| System.out.println("Unpredicted node ignored for styling:: " + n.getClass().getSimpleName()); | ||
| } | ||
| } |
kasprzakewa
reviewed
Mar 16, 2026
| targetIndex = (int) tab.getUserData(); | ||
| } | ||
|
|
||
| sourceTabPane.getTabs().remove(tab); |
There was a problem hiding this comment.
Dodajmy sprawdzenie czy sourceTabPane nie jest null
kasprzakewa
reviewed
Mar 16, 2026
| @@ -8,4 +8,8 @@ | |||
|
|
|||
| <AnchorPane fx:id="rootPane" maxHeight="-1.0" maxWidth="-1.0" prefHeight="1080.0" prefWidth="1920.0" style="-fx-background-image: url('background.jpg'); -fx-background-size: stretch; -fx-background-color: grey;" stylesheets="@constants.css" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1" fx:controller="pl.edu.pwr.pwrinspace.poliwrocket.Controller.DetachedTabController"> | |||
There was a problem hiding this comment.
Tutaj mamy troszkę inne wymiary sceny niż w controllerze
kasprzakewa
reviewed
Mar 16, 2026
Comment on lines
18
to
19
| private static final double initWidth = 1550.4; | ||
| private static final double initHeight = 838.4; |
There was a problem hiding this comment.
Mamy już 2 miejsca, w ktorych pojawiaja się te wartości. Można zrobić wspólne miejsce do jej przechowywania
kasprzakewa
reviewed
Mar 16, 2026
Comment on lines
64
to
75
| .jfx-button { | ||
| -jfx-button-type: FLAT; | ||
| -fx-background-color: -inspace-base-border-color; | ||
| -fx-text-fill: black; | ||
| } | ||
|
|
||
| /*Raised button example */ | ||
| .jfx-button { | ||
| -jfx-button-type: RAISED; | ||
| -fx-background-color: -inspace-base-border-color; | ||
| -fx-text-fill: black; | ||
| } |
There was a problem hiding this comment.
Jak to działa, że mamy 2 różne przyciski, które tak samo się nazywaja?
kasprzakewa
reviewed
Mar 16, 2026
| if (tabPane != null) { | ||
| DetachedWindowsProvider.addActiveTabPane(tabPane); | ||
| } | ||
| for(int i = 0; i < Objects.requireNonNull(tabPane).getTabs().size(); i++) { |
There was a problem hiding this comment.
Można to wciągnąc pod pierwszego ifa, który właśnie sprawdza czy tabPane nie jest nullem i na koniec dodać else jakiś z informacja o tym, ze tabPane jest nullem
kasprzakewa
reviewed
Mar 16, 2026
| }else{ | ||
| targetTabPane.getTabs().add(tab); | ||
| } | ||
| targetTabPane.setTabClosingPolicy(TabPane.TabClosingPolicy.UNAVAILABLE); |
kasprzakewa
reviewed
Mar 16, 2026
kasprzakewa
left a comment
There was a problem hiding this comment.
Kilka uwag i pytań + do rozwiązania konflikty
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Now tabs can be detached between windows
modified: src/main/java/pl/edu/pwr/pwrinspace/poliwrocket/Controller/DetachedTabController.java
few changes, logic the same
added methods for detaching tabs - setupDetachedWindowsProvider, configureTabContextMenu,detachTabToNewWindow , and changed the warning in findAndStyleTiles
added a class used for managing all active tab panes, has a method for transfering tabs
added TabPane
changes for ContextMenu
changes for ContextMenu