some done
This commit is contained in:
parent
3235141828
commit
bcf9a1a058
@ -215,7 +215,7 @@ public class ControllerMapWithSetBoats {
|
||||
}
|
||||
}
|
||||
@FXML
|
||||
private void ButtonShowRemovedArmoredVehicle_Click() throws IOException {
|
||||
private void ButtonShowRemovedBoats_Click() throws IOException {
|
||||
if (_removedBoats.empty()) {
|
||||
Alert addMapAlert = new Alert(Alert.AlertType.ERROR, "Collection of removed objects is empty.", ButtonType.OK);
|
||||
addMapAlert.showAndWait();
|
||||
@ -235,7 +235,6 @@ public class ControllerMapWithSetBoats {
|
||||
controllerRemovedBoat.SetBoat(_removedBoats.pop());
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateGUI()
|
||||
{
|
||||
double rootWidth = root.getWidth();
|
||||
@ -265,7 +264,6 @@ public class ControllerMapWithSetBoats {
|
||||
buttonRight.setTranslateY(rootHeight - moveButtonsSize - rightPaneMargin);
|
||||
buttonRight.setTranslateX(rootWidth - moveButtonsSize - moveButtonsXMargin);
|
||||
}
|
||||
|
||||
private void FirstUpdateBoatGUI(Scene scene, Stage stageBoat, FXMLLoader fxmlLoader, boolean formRemovedBoat) {
|
||||
Pane root = (Pane) scene.lookup("#root");
|
||||
Canvas canvas = (Canvas) scene.lookup("#canvas");
|
||||
@ -310,7 +308,7 @@ public class ControllerMapWithSetBoats {
|
||||
|
||||
if (!formRemovedBoat) {
|
||||
Button buttonCreateModif = (Button) scene.lookup("#buttonCreateModif");
|
||||
Button buttonSelectBoat = (Button) scene.lookup("#buttonSelectArmoredVehicle");
|
||||
Button buttonSelectBoat = (Button) scene.lookup("#buttonSelectBoat");
|
||||
buttonCreateModif.setTranslateX(rootPadding + buttonCreateWidth + distanceBetweenButtons);
|
||||
buttonCreateModif.setTranslateY(rootHeight - flowPaneHeight - buttonCreateHeight - rootPadding);
|
||||
|
||||
@ -337,7 +335,6 @@ public class ControllerMapWithSetBoats {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void ReloadMaps()
|
||||
{
|
||||
int index = listViewMaps.getSelectionModel().getSelectedIndex();
|
||||
|
@ -51,12 +51,12 @@
|
||||
<Label style="-fx-text-fill: #b8becc; -fx-padding: 5 5 5 5;">
|
||||
Ornament:
|
||||
</Label>
|
||||
<ComboBox fx:id="comboBoxOrnamentType" value="None" onAction="#ComboBoxOrnamentType_Changed">
|
||||
<ComboBox fx:id="comboBoxOarsType" value="None" onAction="#ComboBoxType_Changed">
|
||||
<items>
|
||||
<FXCollections fx:factory="observableArrayList">
|
||||
<String fx:value="None"/>
|
||||
<String fx:value="Dots"/>
|
||||
<String fx:value="Circles"/>
|
||||
<String fx:value="Large"/>
|
||||
<String fx:value="Slim"/>
|
||||
</FXCollections>
|
||||
</items>
|
||||
</ComboBox>
|
||||
@ -95,7 +95,7 @@
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</Button>
|
||||
<Button fx:id="buttonSelectArmoredVehicle">
|
||||
<Button fx:id="buttonSelectBoat">
|
||||
Select
|
||||
</Button>
|
||||
</Pane>
|
@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.canvas.Canvas?>
|
||||
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.ComboBox?>
|
||||
<?import javafx.collections.FXCollections?>
|
||||
<?import java.lang.String?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.control.ListView?>
|
||||
<Pane xmlns:fx="http://javafx.com/fxml" fx:id="root" fx:controller="com.example.pibd22_kalyshev_y_v_motorboat_hard.ControllerMapWithSetBoats">
|
||||
<Canvas fx:id="canvas">
|
||||
</Canvas>
|
||||
<Pane fx:id="paneRight" style="-fx-background-color: #31374c;">
|
||||
<Label fx:id="labelTools" style="-fx-text-fill: #b8becc; -fx-padding: 5 5 5 5; -fx-font-weight: bold;">
|
||||
Tools
|
||||
</Label>
|
||||
<VBox fx:id="vBoxMaps" style="-fx-border-color: #b8becc; -fx-border-radius: 5; -fx-border-width: 2; -fx-padding: 5 5 5 5;" spacing="5">
|
||||
<Label style="-fx-text-fill: #b8becc; -fx-padding: 0 0 0 0; -fx-font-weight: bold;">
|
||||
Maps
|
||||
</Label>
|
||||
<TextField fx:id="textFieldNewMapName" />
|
||||
<ComboBox fx:id="comboBoxSelectorMap" value="Simple map">
|
||||
<items>
|
||||
<FXCollections fx:factory="observableArrayList">
|
||||
<String fx:value="Simple map"/>
|
||||
<String fx:value="My second map"/>
|
||||
</FXCollections>
|
||||
</items>
|
||||
</ComboBox>
|
||||
<Button fx:id="buttonAddMap" onAction="#ButtonAddMap_Click">
|
||||
Add map
|
||||
</Button>
|
||||
<ListView fx:id="listViewMaps">
|
||||
</ListView>
|
||||
<Button fx:id="buttonDeleteMap" onAction="#ButtonDeleteMap_Click">
|
||||
Delete map
|
||||
</Button>
|
||||
</VBox>
|
||||
<Button fx:id="buttonAddBoat" onAction="#ButtonAddBoat_Click">
|
||||
Add boat
|
||||
</Button>
|
||||
<TextField fx:id="textFieldPosition" />
|
||||
<Button fx:id="buttonRemoveBoat" onAction="#ButtonRemoveBoat_Click">
|
||||
Remove boat
|
||||
</Button>
|
||||
<Button fx:id="buttonShowRemovedBoat" onAction="#ButtonShowRemovedBoats_Click">
|
||||
Show removed
|
||||
</Button>
|
||||
<Button fx:id="buttonShowStorage" onAction="#ButtonShowStorage_Click">
|
||||
Show storage
|
||||
</Button>
|
||||
<Button fx:id="buttonShowOnMap" onAction="#ButtonShowOnMap_Click">
|
||||
Show on map
|
||||
</Button>
|
||||
</Pane>
|
||||
<Button fx:id="buttonLeft" minWidth="30" minHeight="30" onAction="#ButtonMove_Click">
|
||||
<graphic>
|
||||
<ImageView fitHeight="14.0" fitWidth="14.0" pickOnBounds="true" preserveRatio="true">
|
||||
<Image url="@/arrowLeft.png"/>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</Button>
|
||||
<Button fx:id="buttonRight" minWidth="30" minHeight="30" onAction="#ButtonMove_Click">
|
||||
<graphic>
|
||||
<ImageView fitHeight="14.0" fitWidth="14.0" pickOnBounds="true" preserveRatio="true">
|
||||
<Image url="@/arrowRight.png"/>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</Button>
|
||||
<Button fx:id="buttonUp" minWidth="30" minHeight="30" onAction="#ButtonMove_Click">
|
||||
<graphic>
|
||||
<ImageView fitHeight="14.0" fitWidth="14.0" pickOnBounds="true" preserveRatio="true">
|
||||
<Image url="@/arrowUp.png"/>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</Button>
|
||||
<Button fx:id="buttonDown" minWidth="30" minHeight="30" onAction="#ButtonMove_Click">
|
||||
<graphic>
|
||||
<ImageView fitHeight="14.0" fitWidth="14.0" pickOnBounds="true" preserveRatio="true">
|
||||
<Image url="@/arrowDown.png"/>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</Button>
|
||||
</Pane>
|
@ -1,14 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import java.lang.*?>
|
||||
<?import javafx.collections.*?>
|
||||
<?import javafx.scene.canvas.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
<?import javafx.scene.image.*?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
|
||||
<Pane fx:id="root" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.pibd22_kalyshev_y_v_motorboat_hard.ControllerMap">
|
||||
<Canvas fx:id="canvas" height="400.0" width="400.0">
|
||||
<?import javafx.scene.canvas.Canvas?>
|
||||
<?import javafx.scene.layout.FlowPane?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.ComboBox?>
|
||||
<?import javafx.collections.FXCollections?>
|
||||
<?import java.lang.String?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
|
||||
<Pane xmlns:fx="http://javafx.com/fxml" fx:id="root" fx:controller="com.example.pibd22_kalyshev_y_v_motorboat_hard.ControllerRemovedBoat">
|
||||
<Canvas fx:id="canvas">
|
||||
</Canvas>
|
||||
<FlowPane fx:id="flowPane" style="-fx-background-color: #31374c;">
|
||||
<Label style="-fx-text-fill: #b8becc; -fx-padding: 5 5 5 5;">
|
||||
@ -30,69 +35,46 @@
|
||||
-
|
||||
</Label>
|
||||
<Label style="-fx-text-fill: #b8becc; -fx-padding: 5 5 5 5;">
|
||||
Oars:
|
||||
Rollers:
|
||||
</Label>
|
||||
<ComboBox fx:id="comboBoxNumOars" value="1">
|
||||
<ComboBox fx:id="comboBoxNumOars" value="5" onAction="#ComboBoxNumOars_Changed">
|
||||
<items>
|
||||
<FXCollections fx:factory="observableArrayList">
|
||||
<String fx:value="1" />
|
||||
<String fx:value="2" />
|
||||
<String fx:value="3" />
|
||||
</FXCollections>
|
||||
</items>
|
||||
</ComboBox>
|
||||
<Label style="-fx-text-fill: #b8becc; -fx-padding: 5 5 5 5;">
|
||||
Type:
|
||||
</Label>
|
||||
<ComboBox fx:id="comboBoxOarsType" value="None">
|
||||
<items>
|
||||
<FXCollections fx:factory="observableArrayList">
|
||||
<String fx:value="None" />
|
||||
<String fx:value="Slim" />
|
||||
<String fx:value="Large" />
|
||||
<String fx:value="1"/>
|
||||
<String fx:value="2"/>
|
||||
<String fx:value="3"/>
|
||||
</FXCollections>
|
||||
</items>
|
||||
</ComboBox>
|
||||
</FlowPane>
|
||||
<ComboBox fx:id="comboBoxSelectorMap" onAction="#ComboBoxSelectorMap_Changed" value="Simple map">
|
||||
<items>
|
||||
<FXCollections fx:factory="observableArrayList">
|
||||
<String fx:value="Simple map" />
|
||||
<String fx:value="My second map" />
|
||||
</FXCollections>
|
||||
</items>
|
||||
</ComboBox>
|
||||
<Button fx:id="buttonCreate" onAction="#ButtonCreate_Click">
|
||||
Create
|
||||
</Button>
|
||||
<Button fx:id="buttonCreateModif" onAction="#ButtonCreateModif_Click">
|
||||
Modification
|
||||
</Button>
|
||||
<Button fx:id="buttonLeft" minHeight="30" minWidth="30" onAction="#ButtonMove_Click">
|
||||
<Button fx:id="buttonLeft" minWidth="30" minHeight="30" onAction="#ButtonMove_Click">
|
||||
<graphic>
|
||||
<ImageView fitHeight="14.0" fitWidth="14.0" pickOnBounds="true" preserveRatio="true">
|
||||
<Image url="@/arrowLeft.png" />
|
||||
<Image url="@/arrowLeft.png"/>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</Button>
|
||||
<Button fx:id="buttonRight" minHeight="30" minWidth="30" onAction="#ButtonMove_Click">
|
||||
<Button fx:id="buttonRight" minWidth="30" minHeight="30" onAction="#ButtonMove_Click">
|
||||
<graphic>
|
||||
<ImageView fitHeight="14.0" fitWidth="14.0" pickOnBounds="true" preserveRatio="true">
|
||||
<Image url="@/arrowRight.png" />
|
||||
<Image url="@/arrowRight.png"/>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</Button>
|
||||
<Button fx:id="buttonUp" minHeight="30" minWidth="30" onAction="#ButtonMove_Click">
|
||||
<Button fx:id="buttonUp" minWidth="30" minHeight="30" onAction="#ButtonMove_Click">
|
||||
<graphic>
|
||||
<ImageView fitHeight="14.0" fitWidth="14.0" pickOnBounds="true" preserveRatio="true">
|
||||
<Image url="@/arrowUp.png" />
|
||||
<Image url="@/arrowUp.png"/>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</Button>
|
||||
<Button fx:id="buttonDown" minHeight="30" minWidth="30" onAction="#ButtonMove_Click">
|
||||
<Button fx:id="buttonDown" minWidth="30" minHeight="30" onAction="#ButtonMove_Click">
|
||||
<graphic>
|
||||
<ImageView fitHeight="14.0" fitWidth="14.0" pickOnBounds="true" preserveRatio="true">
|
||||
<Image url="@/arrowDown.png" />
|
||||
<Image url="@/arrowDown.png"/>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</Button>
|
@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
|
||||
<?import javafx.scene.canvas.Canvas?>
|
||||
<?import javafx.scene.layout.FlowPane?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
|
||||
<Pane xmlns:fx="http://javafx.com/fxml" fx:id="root" fx:controller="com.example.pibd22_kalyshev_y_v_motorboat_hard.ControllerSetMixedBoats">
|
||||
<Canvas fx:id="canvas">
|
||||
</Canvas>
|
||||
<FlowPane fx:id="flowPane" style="-fx-background-color: #31374c;">
|
||||
<Label style="-fx-text-fill: #b8becc; -fx-padding: 5 5 5 5;">
|
||||
Speed:
|
||||
</Label>
|
||||
<Label fx:id="labelSpeedValue" style="-fx-text-fill: #ffffff; -fx-padding: 5 5 5 0; -fx-font-weight: bold;">
|
||||
-
|
||||
</Label>
|
||||
<Label style="-fx-text-fill: #b8becc; -fx-padding: 5 5 5 5;">
|
||||
Weight:
|
||||
</Label>
|
||||
<Label fx:id="labelWeightValue" style="-fx-text-fill: #ffffff; -fx-padding: 5 5 5 0; -fx-font-weight: bold;">
|
||||
-
|
||||
</Label>
|
||||
<Label style="-fx-text-fill: #b8becc; -fx-padding: 5 5 5 5;">
|
||||
Color:
|
||||
</Label>
|
||||
<Label fx:id="labelBodyColorValue" style="-fx-text-fill: #ffffff; -fx-padding: 5 5 5 0; -fx-font-weight: bold;">
|
||||
-
|
||||
</Label>
|
||||
</FlowPane>
|
||||
<Button fx:id="buttonCreate" onAction="#ButtonCreate_Click">
|
||||
Create
|
||||
</Button>
|
||||
<Button fx:id="buttonLeft" minWidth="30" minHeight="30" onAction="#ButtonMove_Click">
|
||||
<graphic>
|
||||
<ImageView fitHeight="14.0" fitWidth="14.0" pickOnBounds="true" preserveRatio="true">
|
||||
<Image url="@/arrowLeft.png"/>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</Button>
|
||||
<Button fx:id="buttonRight" minWidth="30" minHeight="30" onAction="#ButtonMove_Click">
|
||||
<graphic>
|
||||
<ImageView fitHeight="14.0" fitWidth="14.0" pickOnBounds="true" preserveRatio="true">
|
||||
<Image url="@/arrowRight.png"/>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</Button>
|
||||
<Button fx:id="buttonUp" minWidth="30" minHeight="30" onAction="#ButtonMove_Click">
|
||||
<graphic>
|
||||
<ImageView fitHeight="14.0" fitWidth="14.0" pickOnBounds="true" preserveRatio="true">
|
||||
<Image url="@/arrowUp.png"/>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</Button>
|
||||
<Button fx:id="buttonDown" minWidth="30" minHeight="30" onAction="#ButtonMove_Click">
|
||||
<graphic>
|
||||
<ImageView fitHeight="14.0" fitWidth="14.0" pickOnBounds="true" preserveRatio="true">
|
||||
<Image url="@/arrowDown.png"/>
|
||||
</ImageView>
|
||||
</graphic>
|
||||
</Button>
|
||||
</Pane>
|
Loading…
x
Reference in New Issue
Block a user