changed look a bit
This commit is contained in:
parent
be2d918620
commit
1df97b4d3f
@ -44,17 +44,17 @@ public class VoterController {
|
|||||||
private StackPane centerPane;
|
private StackPane centerPane;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Text titleText;
|
private Label titleText;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Button refreshButton;
|
private Button refreshButton;
|
||||||
@FXML
|
@FXML
|
||||||
private Text descriptionText;
|
private Label descriptionText;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Text startDateText;
|
private Label startDateText;
|
||||||
@FXML
|
@FXML
|
||||||
private Text endDateText;
|
private Label endDateText;
|
||||||
|
|
||||||
@FXML
|
@FXML
|
||||||
private Button confirmButton;
|
private Button confirmButton;
|
||||||
|
|||||||
@ -14,110 +14,117 @@
|
|||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
<?import javafx.scene.text.Text?>
|
<?import javafx.scene.text.Text?>
|
||||||
|
|
||||||
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="dev.ksan.ui.OrganizerController">
|
<BorderPane prefHeight="500.0" prefWidth="800.0"
|
||||||
|
xmlns="http://javafx.com/javafx/17"
|
||||||
|
xmlns:fx="http://javafx.com/fxml/1"
|
||||||
|
fx:controller="dev.ksan.ui.OrganizerController"
|
||||||
|
style="-fx-background-color: #f4f6f8;">
|
||||||
|
|
||||||
|
<!-- TOP BAR -->
|
||||||
|
<top>
|
||||||
|
<HBox alignment="CENTER_LEFT" spacing="10"
|
||||||
|
style="-fx-background-color: #2c3e50; -fx-padding: 10;">
|
||||||
|
<children>
|
||||||
|
<Label fx:id="usernameLabel"
|
||||||
|
text="Username"
|
||||||
|
style="-fx-text-fill: white; -fx-font-size: 16px; -fx-font-weight: bold;"/>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
</top>
|
||||||
|
|
||||||
|
<!-- SIDEBAR -->
|
||||||
<left>
|
<left>
|
||||||
<VBox prefHeight="200.0" prefWidth="250.0" BorderPane.alignment="CENTER">
|
<VBox prefWidth="250" spacing="10"
|
||||||
<children>
|
style="-fx-background-color: white; -fx-padding: 10;">
|
||||||
<Button fx:id="newButton" mnemonicParsing="false" text="new" textAlignment="CENTER">
|
|
||||||
<VBox.margin>
|
<Button fx:id="newButton"
|
||||||
<Insets bottom="5.0" left="30.0" top="5.0" />
|
text="+ New Poll"
|
||||||
</VBox.margin>
|
style="-fx-background-color: #3498db; -fx-text-fill: white;"/>
|
||||||
</Button>
|
|
||||||
<ScrollPane prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
|
<TitledPane fx:id="activeList" text="Active Polls" expanded="true">
|
||||||
<content>
|
<content>
|
||||||
<VBox fx:id="panesBox">
|
<ListView fx:id="activePollsListView"/>
|
||||||
<children>
|
|
||||||
<TitledPane fx:id="activeList" animated="false" text="untitled" VBox.vgrow="ALWAYS">
|
|
||||||
<content>
|
|
||||||
<ListView fx:id="activePollsListView" prefHeight="200.0" prefWidth="200.0" />
|
|
||||||
</content>
|
</content>
|
||||||
<VBox.margin>
|
|
||||||
<Insets bottom="5.0" />
|
|
||||||
</VBox.margin>
|
|
||||||
</TitledPane>
|
</TitledPane>
|
||||||
<TitledPane fx:id="inactiveList" animated="false" text="untitled" VBox.vgrow="ALWAYS">
|
|
||||||
|
<TitledPane fx:id="inactiveList" text="Inactive Polls">
|
||||||
<content>
|
<content>
|
||||||
<ListView fx:id="inactivePollsListView"/>
|
<ListView fx:id="inactivePollsListView"/>
|
||||||
</content>
|
</content>
|
||||||
</TitledPane>
|
</TitledPane>
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</content>
|
|
||||||
</ScrollPane>
|
|
||||||
</children>
|
|
||||||
<BorderPane.margin>
|
|
||||||
<Insets />
|
|
||||||
</BorderPane.margin>
|
|
||||||
</VBox>
|
</VBox>
|
||||||
</left>
|
</left>
|
||||||
<top>
|
|
||||||
<HBox prefHeight="27.0" prefWidth="600.0" BorderPane.alignment="CENTER">
|
<!-- MAIN CONTENT -->
|
||||||
<children>
|
|
||||||
<Label fx:id="usernameLabel" text="teemp" textAlignment="CENTER">
|
|
||||||
<HBox.margin>
|
|
||||||
<Insets left="20.0" top="5.0" />
|
|
||||||
</HBox.margin>
|
|
||||||
</Label>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
</top>
|
|
||||||
<center>
|
<center>
|
||||||
<StackPane fx:id="centerPane" prefHeight="150.0" prefWidth="200.0" BorderPane.alignment="CENTER">
|
<StackPane style="-fx-padding: 20;">
|
||||||
<children>
|
<children>
|
||||||
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0">
|
|
||||||
<children>
|
<VBox spacing="15" maxWidth="500"
|
||||||
<HBox prefHeight="100.0" prefWidth="200.0">
|
style="-fx-background-color: white; -fx-padding: 20; -fx-background-radius: 10; -fx-border-color: #ddd; -fx-border-radius: 10;">
|
||||||
<children>
|
|
||||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Title:" />
|
<Label text="Create Poll"
|
||||||
<TextField fx:id="titleField" />
|
style="-fx-font-size: 18px; -fx-font-weight: bold;"/>
|
||||||
</children>
|
|
||||||
</HBox>
|
<!-- TITLE -->
|
||||||
<HBox prefHeight="100.0" prefWidth="200.0">
|
<VBox spacing="5">
|
||||||
<children>
|
<Label text="Title"/>
|
||||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Description:" />
|
<TextField fx:id="titleField" promptText="Enter title"/>
|
||||||
<TextField fx:id="descriptionField" />
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
<VBox prefHeight="200.0" prefWidth="100.0">
|
|
||||||
<children>
|
|
||||||
<HBox prefHeight="100.0" prefWidth="200.0">
|
|
||||||
<children>
|
|
||||||
<DatePicker fx:id="startDatePicker" />
|
|
||||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="<--->">
|
|
||||||
<HBox.margin>
|
|
||||||
<Insets top="3.0" />
|
|
||||||
</HBox.margin>
|
|
||||||
</Text>
|
|
||||||
<DatePicker fx:id="endDatePicker" />
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
<HBox prefHeight="100.0" prefWidth="200.0">
|
|
||||||
<children>
|
|
||||||
<TextField fx:id="startTimeField" />
|
|
||||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="<--->" />
|
|
||||||
<TextField fx:id="endTimeField" />
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
</children>
|
|
||||||
</VBox>
|
</VBox>
|
||||||
<ScrollPane VBox.vgrow="ALWAYS">
|
|
||||||
<content>
|
<!-- DESCRIPTION -->
|
||||||
<HBox>
|
<VBox spacing="5">
|
||||||
<children>
|
<Label text="Description"/>
|
||||||
<Button fx:id="newOptionButton" mnemonicParsing="false" text="new" />
|
<TextField fx:id="descriptionField" promptText="Enter description"/>
|
||||||
<VBox fx:id="optionsContainer" alignment="CENTER" />
|
</VBox>
|
||||||
</children>
|
|
||||||
|
<!-- DATE -->
|
||||||
|
<VBox spacing="5">
|
||||||
|
<Label text="Date Range"/>
|
||||||
|
<HBox spacing="10">
|
||||||
|
<DatePicker fx:id="startDatePicker"/>
|
||||||
|
<Label text="→"/>
|
||||||
|
<DatePicker fx:id="endDatePicker"/>
|
||||||
</HBox>
|
</HBox>
|
||||||
|
</VBox>
|
||||||
|
|
||||||
|
<!-- TIME -->
|
||||||
|
<VBox spacing="5">
|
||||||
|
<Label text="Time Range"/>
|
||||||
|
<HBox spacing="10">
|
||||||
|
<TextField fx:id="startTimeField" promptText="HH:mm"/>
|
||||||
|
<Label text="→"/>
|
||||||
|
<TextField fx:id="endTimeField" promptText="HH:mm"/>
|
||||||
|
</HBox>
|
||||||
|
</VBox>
|
||||||
|
|
||||||
|
<!-- OPTIONS -->
|
||||||
|
<VBox spacing="10">
|
||||||
|
<HBox spacing="10" alignment="CENTER_LEFT">
|
||||||
|
<Label text="Options"/>
|
||||||
|
<Button fx:id="newOptionButton" text="+ Add"/>
|
||||||
|
</HBox>
|
||||||
|
|
||||||
|
<ScrollPane fitToWidth="true" VBox.vgrow="ALWAYS">
|
||||||
|
<content>
|
||||||
|
<VBox fx:id="optionsContainer" spacing="8"/>
|
||||||
</content>
|
</content>
|
||||||
</ScrollPane>
|
</ScrollPane>
|
||||||
<Button fx:id="confirmButton" alignment="BOTTOM_RIGHT" mnemonicParsing="false" text="create">
|
</VBox>
|
||||||
<graphic>
|
|
||||||
<Label fx:id="errorLabel" text="Label" />
|
<!-- ERROR -->
|
||||||
</graphic>
|
<Label fx:id="errorLabel"
|
||||||
</Button>
|
style="-fx-text-fill: red;"/>
|
||||||
</children>
|
|
||||||
|
<!-- ACTION -->
|
||||||
|
<Button fx:id="confirmButton"
|
||||||
|
text="Create Poll"
|
||||||
|
style="-fx-background-color: #2ecc71; -fx-text-fill: white; -fx-font-weight: bold;"/>
|
||||||
|
|
||||||
</VBox>
|
</VBox>
|
||||||
</children>
|
</children>
|
||||||
</StackPane>
|
</StackPane>
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
</BorderPane>
|
</BorderPane>
|
||||||
@ -12,96 +12,105 @@
|
|||||||
<?import javafx.scene.layout.VBox?>
|
<?import javafx.scene.layout.VBox?>
|
||||||
<?import javafx.scene.text.Text?>
|
<?import javafx.scene.text.Text?>
|
||||||
|
|
||||||
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="dev.ksan.ui.VoterController">
|
<BorderPane prefHeight="500.0" prefWidth="800.0"
|
||||||
|
xmlns="http://javafx.com/javafx/23.0.1"
|
||||||
|
xmlns:fx="http://javafx.com/fxml/1"
|
||||||
|
fx:controller="dev.ksan.ui.VoterController"
|
||||||
|
style="-fx-background-color: #f4f6f8;">
|
||||||
|
|
||||||
|
<!-- TOP BAR -->
|
||||||
|
<top>
|
||||||
|
<HBox alignment="CENTER_LEFT" spacing="10"
|
||||||
|
style="-fx-background-color: #2c3e50; -fx-padding: 10;">
|
||||||
|
<children>
|
||||||
|
<Label fx:id="usernameLabel"
|
||||||
|
text="Username"
|
||||||
|
style="-fx-text-fill: white; -fx-font-size: 16px; -fx-font-weight: bold;"/>
|
||||||
|
</children>
|
||||||
|
</HBox>
|
||||||
|
</top>
|
||||||
|
|
||||||
|
<!-- SIDEBAR -->
|
||||||
<left>
|
<left>
|
||||||
<VBox prefHeight="200.0" prefWidth="250.0" BorderPane.alignment="CENTER">
|
<VBox prefWidth="260" spacing="10"
|
||||||
<children>
|
style="-fx-background-color: white; -fx-padding: 10;">
|
||||||
<ScrollPane prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS">
|
|
||||||
|
<Button fx:id="refreshButton"
|
||||||
|
text="🔄 Refresh"
|
||||||
|
style="-fx-background-color: #3498db; -fx-text-fill: white;"/>
|
||||||
|
|
||||||
|
<TitledPane fx:id="activeList" text="Active Polls" expanded="true">
|
||||||
<content>
|
<content>
|
||||||
<VBox fx:id="panesBox">
|
<ListView fx:id="activePollsListView"/>
|
||||||
<children>
|
|
||||||
<Button fx:id="refreshButton" mnemonicParsing="false" text="Button" />
|
|
||||||
<TitledPane fx:id="activeList" animated="false" text="untitled" VBox.vgrow="ALWAYS">
|
|
||||||
<content>
|
|
||||||
<ListView fx:id="activePollsListView" prefHeight="200.0" prefWidth="200.0" />
|
|
||||||
</content>
|
</content>
|
||||||
<VBox.margin>
|
|
||||||
<Insets bottom="5.0" />
|
|
||||||
</VBox.margin>
|
|
||||||
</TitledPane>
|
</TitledPane>
|
||||||
<TitledPane fx:id="inactiveList" animated="false" text="untitled" VBox.vgrow="ALWAYS">
|
|
||||||
|
<TitledPane fx:id="inactiveList" text="Inactive Polls">
|
||||||
<content>
|
<content>
|
||||||
<ListView fx:id="inactivePollsListView"/>
|
<ListView fx:id="inactivePollsListView"/>
|
||||||
</content>
|
</content>
|
||||||
</TitledPane>
|
</TitledPane>
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</content>
|
|
||||||
</ScrollPane>
|
|
||||||
</children>
|
|
||||||
<BorderPane.margin>
|
|
||||||
<Insets />
|
|
||||||
</BorderPane.margin>
|
|
||||||
</VBox>
|
</VBox>
|
||||||
</left>
|
</left>
|
||||||
<top>
|
|
||||||
<HBox prefHeight="27.0" prefWidth="600.0" BorderPane.alignment="CENTER">
|
<!-- MAIN CONTENT -->
|
||||||
<children>
|
|
||||||
<Label fx:id="usernameLabel" text="teemp" textAlignment="CENTER">
|
|
||||||
<HBox.margin>
|
|
||||||
<Insets left="20.0" top="5.0" />
|
|
||||||
</HBox.margin>
|
|
||||||
</Label>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
</top>
|
|
||||||
<center>
|
<center>
|
||||||
<StackPane fx:id="centerPane" prefHeight="150.0" prefWidth="200.0" BorderPane.alignment="CENTER">
|
<StackPane fx:id="centerPane" style="-fx-padding: 20;">
|
||||||
<children>
|
<children>
|
||||||
<VBox alignment="CENTER" prefHeight="200.0" prefWidth="100.0">
|
|
||||||
<children>
|
<VBox spacing="15" maxWidth="500"
|
||||||
<HBox prefHeight="100.0" prefWidth="200.0">
|
style="-fx-background-color: white; -fx-padding: 20; -fx-background-radius: 10; -fx-border-radius: 10; -fx-border-color: #ddd;">
|
||||||
<children>
|
|
||||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Title:" />
|
<!-- TITLE -->
|
||||||
<Text fx:id="titleText" strokeType="OUTSIDE" strokeWidth="0.0" text="Text" />
|
<Label text="Poll Details"
|
||||||
</children>
|
style="-fx-font-size: 18px; -fx-font-weight: bold;"/>
|
||||||
|
|
||||||
|
<!-- TITLE FIELD -->
|
||||||
|
<HBox spacing="10">
|
||||||
|
<Label text="Title:" style="-fx-font-weight: bold;"/>
|
||||||
|
<Label fx:id="titleText"/>
|
||||||
</HBox>
|
</HBox>
|
||||||
<HBox prefHeight="100.0" prefWidth="200.0">
|
|
||||||
<children>
|
<!-- DESCRIPTION -->
|
||||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Description:" />
|
<HBox spacing="10">
|
||||||
<Text fx:id="descriptionText" strokeType="OUTSIDE" strokeWidth="0.0" text="Text" />
|
<Label text="Description:" style="-fx-font-weight: bold;"/>
|
||||||
</children>
|
<Label fx:id="descriptionText" wrapText="true"/>
|
||||||
</HBox>
|
</HBox>
|
||||||
<VBox prefHeight="200.0" prefWidth="100.0">
|
|
||||||
<children>
|
<!-- DATES -->
|
||||||
<HBox prefHeight="100.0" prefWidth="200.0">
|
<HBox spacing="10">
|
||||||
<children>
|
<Label text="Duration:" style="-fx-font-weight: bold;"/>
|
||||||
<Text fx:id="startDateText" strokeType="OUTSIDE" strokeWidth="0.0" text="Text" />
|
<Label fx:id="startDateText"/>
|
||||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="<--->">
|
<Label text="→"/>
|
||||||
<HBox.margin>
|
<Label fx:id="endDateText"/>
|
||||||
<Insets top="3.0" />
|
|
||||||
</HBox.margin>
|
|
||||||
</Text>
|
|
||||||
<Text fx:id="endDateText" strokeType="OUTSIDE" strokeWidth="0.0" text="Text" />
|
|
||||||
</children>
|
|
||||||
</HBox>
|
</HBox>
|
||||||
</children>
|
|
||||||
</VBox>
|
<!-- OPTIONS -->
|
||||||
<ScrollPane VBox.vgrow="ALWAYS">
|
<VBox spacing="10">
|
||||||
|
<Label text="Options:" style="-fx-font-weight: bold;"/>
|
||||||
|
<ScrollPane fitToWidth="true" VBox.vgrow="ALWAYS">
|
||||||
<content>
|
<content>
|
||||||
<HBox>
|
<VBox fx:id="optionsContainer" spacing="8"/>
|
||||||
<children>
|
|
||||||
<VBox fx:id="optionsContainer" alignment="CENTER" />
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
</content>
|
</content>
|
||||||
</ScrollPane>
|
</ScrollPane>
|
||||||
<Label fx:id="alreadyVotedLabel" text="Label" />
|
</VBox>
|
||||||
<Label fx:id="errorLabel" text="Label" />
|
|
||||||
<Button fx:id="confirmButton" alignment="BOTTOM_RIGHT" mnemonicParsing="false" text="create" />
|
<!-- STATUS -->
|
||||||
</children>
|
<Label fx:id="alreadyVotedLabel"
|
||||||
|
style="-fx-text-fill: green;"/>
|
||||||
|
|
||||||
|
<Label fx:id="errorLabel"
|
||||||
|
style="-fx-text-fill: red;"/>
|
||||||
|
|
||||||
|
<!-- ACTION -->
|
||||||
|
<Button fx:id="confirmButton"
|
||||||
|
text="Submit Vote"
|
||||||
|
style="-fx-background-color: #2ecc71; -fx-text-fill: white; -fx-font-weight: bold;"/>
|
||||||
|
|
||||||
</VBox>
|
</VBox>
|
||||||
</children>
|
</children>
|
||||||
</StackPane>
|
</StackPane>
|
||||||
</center>
|
</center>
|
||||||
|
|
||||||
</BorderPane>
|
</BorderPane>
|
||||||
Loading…
x
Reference in New Issue
Block a user