Compare commits

..

No commits in common. "23be5a1b911d8d538d87bf42624f8b5dbaed0b06" and "8f3042c5f979755ceec45b33827324ff81026958" have entirely different histories.

7 changed files with 49 additions and 53 deletions

View File

@ -29,13 +29,13 @@ val jar by tasks.getting(Jar::class) {
}) })
} }
tasks.register("rebuild and move", Copy::class) { tasks.register("blabla", Copy::class) {
group = "custom" group = "dasdas"
dependsOn("clean") dependsOn("clean")
dependsOn("jar") dependsOn("jar")
from("$buildDir/libs/app.jar") from("$buildDir/libs/app.jar")
mkdir("$buildDir/out/") mkdir("$buildDir/newShit/")
into("$buildDir/out/") into("$buildDir/newShit/")
} }

View File

@ -1,6 +0,0 @@
.main-btn{
-fx-background-color: #424242;
-fx-text-fill: white;
-fx-border-radius: 50em;
}

View File

@ -4,16 +4,15 @@ import javafx.application.Application;
import javafx.fxml.FXMLLoader; import javafx.fxml.FXMLLoader;
import javafx.scene.Scene; import javafx.scene.Scene;
import javafx.stage.Stage; import javafx.stage.Stage;
import res.RestController;
import java.io.IOException; import java.io.IOException;
import java.util.Objects;
public class MainApplication extends Application { public class MainApplication extends Application {
@Override @Override
public void start(Stage stage) throws IOException { public void start(Stage stage) throws IOException {
FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("main-view.fxml")); FXMLLoader fxmlLoader = new FXMLLoader(MainApplication.class.getResource("main-view.fxml"));
Scene scene = new Scene(fxmlLoader.load(), 1200, 700); Scene scene = new Scene(fxmlLoader.load(), 1200, 800);
scene.getStylesheets().add(Objects.requireNonNull(MainApplication.class.getResource("style.css")).toExternalForm());
stage.setTitle("Hello!"); stage.setTitle("Hello!");
stage.setScene(scene); stage.setScene(scene);
stage.show(); stage.show();

View File

@ -6,7 +6,7 @@ import javafx.scene.layout.GridPane;
import javafx.scene.layout.VBox; import javafx.scene.layout.VBox;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
import res.Event; import res.Event;
import res.DataController; import res.RestController;
public class MainController { public class MainController {
@FXML @FXML
@ -30,8 +30,8 @@ public class MainController {
@FXML @FXML
protected void onAddBtnClick(){ protected void onAddBtnClick(){
DataController dataController = new DataController(); RestController restController = new RestController();
Event[] eventList = dataController.getAllEvents(); Event[] eventList = restController.getAllEvents();
for(Event event : eventList){ for(Event event : eventList){
Label label = new Label(); Label label = new Label();

View File

@ -6,26 +6,35 @@
<?import javafx.scene.image.*?> <?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?> <?import javafx.scene.layout.*?>
<GridPane gridLinesVisible="true" style="-fx-background-color: #424242;" xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1" fx:controller="client.MainController"> <GridPane gridLinesVisible="true" style="-fx-background-color: #424242;"
xmlns="http://javafx.com/javafx/11.0.2" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="client.MainController">
<columnConstraints> <columnConstraints>
<ColumnConstraints hgrow="NEVER" maxWidth="60.0" minWidth="60.0"/> <ColumnConstraints hgrow="NEVER" maxWidth="60.0" minWidth="60.0"/>
<ColumnConstraints hgrow="ALWAYS" /> <ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
</columnConstraints> </columnConstraints>
<rowConstraints> <rowConstraints>
<RowConstraints vgrow="SOMETIMES" /> <RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
</rowConstraints> </rowConstraints>
<VBox alignment="TOP_CENTER" prefHeight="200.0" prefWidth="100.0" spacing="5.0" style="-fx-background-color: #333333;"> <VBox alignment="TOP_CENTER" prefHeight="200.0" prefWidth="100.0" spacing="5.0"
style="-fx-background-color: #333333;">
<ImageView fitHeight="50.0" fitWidth="50.0" pickOnBounds="true" preserveRatio="true"> <ImageView fitHeight="50.0" fitWidth="50.0" pickOnBounds="true" preserveRatio="true">
</ImageView> </ImageView>
<Button mnemonicParsing="false" onAction="#onAddBtnClick" prefHeight="50" prefWidth="50" styleClass="main-btn" text="ADD"> <Button mnemonicParsing="false" onAction="#onAddBtnClick" prefHeight="50" prefWidth="50"
style="-fx-background-color: #424242;" text="ADD" textAlignment="CENTER" textFill="WHITE">
<cursor>
<Cursor fx:constant="HAND"/>
</cursor>
</Button> </Button>
<Button mnemonicParsing="false" prefHeight="50" prefWidth="50" style="-fx-background-color: #424242;" textAlignment="CENTER" textFill="WHITE"> <Button mnemonicParsing="false" prefHeight="50" prefWidth="50" style="-fx-background-color: #424242;"
textAlignment="CENTER" textFill="WHITE">
ADD ADD
<cursor> <cursor>
<Cursor fx:constant="HAND"/> <Cursor fx:constant="HAND"/>
</cursor> </cursor>
</Button> </Button>
<Button mnemonicParsing="false" prefHeight="50" prefWidth="50" style="-fx-background-color: #424242;" textAlignment="CENTER" textFill="WHITE"> <Button mnemonicParsing="false" prefHeight="50" prefWidth="50" style="-fx-background-color: #424242;"
textAlignment="CENTER" textFill="WHITE">
ADD ADD
<cursor> <cursor>
<Cursor fx:constant="HAND"/> <Cursor fx:constant="HAND"/>

View File

@ -1,6 +0,0 @@
.main-btn{
-fx-background-color: #424242;
-fx-text-fill: white;
-fx-border-radius: 50em;
}

View File

@ -9,7 +9,7 @@ import java.net.HttpURLConnection;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
public class DataController { public class RestController {
private static final String ALL_EVENTS_ENDPOINT = "http://localhost:8080/vpr/all-events"; private static final String ALL_EVENTS_ENDPOINT = "http://localhost:8080/vpr/all-events";
private static final String ALL_USERS_ENDPOINT = "http://localhost:8080/vpr/all-users"; private static final String ALL_USERS_ENDPOINT = "http://localhost:8080/vpr/all-users";