AHHHHHHHHHH COMMITED TO GITHUB INSTEAD OF FORGEJO FOR WEEKS
|
@ -1,5 +1,5 @@
|
|||
public class Testcode {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("I LOVE C POINTERS --Patrick");
|
||||
|
||||
}
|
||||
}
|
||||
|
|
7
Code/Steiner/dynamicCasting/.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"java.project.sourcePaths": ["src"],
|
||||
"java.project.outputPath": "bin",
|
||||
"java.project.referencedLibraries": [
|
||||
"lib/**/*.jar"
|
||||
]
|
||||
}
|
18
Code/Steiner/dynamicCasting/README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
## Getting Started
|
||||
|
||||
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
|
||||
|
||||
## Folder Structure
|
||||
|
||||
The workspace contains two folders by default, where:
|
||||
|
||||
- `src`: the folder to maintain sources
|
||||
- `lib`: the folder to maintain dependencies
|
||||
|
||||
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
|
||||
|
||||
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
|
||||
|
||||
## Dependency Management
|
||||
|
||||
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
|
BIN
Code/Steiner/dynamicCasting/bin/App.class
Normal file
BIN
Code/Steiner/dynamicCasting/bin/Article.class
Normal file
BIN
Code/Steiner/dynamicCasting/bin/Audio.class
Normal file
BIN
Code/Steiner/dynamicCasting/bin/Book.class
Normal file
BIN
Code/Steiner/dynamicCasting/bin/CD.class
Normal file
BIN
Code/Steiner/dynamicCasting/bin/Camera.class
Normal file
BIN
Code/Steiner/dynamicCasting/bin/MP3.class
Normal file
21
Code/Steiner/dynamicCasting/src/App.java
Normal file
|
@ -0,0 +1,21 @@
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class App {
|
||||
public static void main(String[] args) throws Exception {
|
||||
ArrayList<Article> list = new ArrayList<Article>();
|
||||
list.add(new Book("11241", 12, "Tolkien", "The Book to rule all books"));
|
||||
list.add(new Camera("0101012", 25000, "Fujifilm"));
|
||||
list.add(new CD("0345678", 56789, "hello",
|
||||
new ArrayList<String>(Arrays.asList("Hello", "World", "THIS IS THE END"))));
|
||||
list.add(new MP3("RASPUTIN", 456789, "Rasputin", "lengh"));
|
||||
|
||||
for (Article article : list) {
|
||||
article.print();
|
||||
if (article instanceof CD) {
|
||||
((CD) article).playTrack();
|
||||
}
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
}
|
16
Code/Steiner/dynamicCasting/src/Article.java
Normal file
|
@ -0,0 +1,16 @@
|
|||
public abstract class Article {
|
||||
String code;
|
||||
double price;
|
||||
|
||||
public Article(String code, double price) {
|
||||
this.code = code;
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
boolean available() {
|
||||
boolean maybe = true;
|
||||
return maybe;
|
||||
}
|
||||
|
||||
abstract void print();
|
||||
}
|
11
Code/Steiner/dynamicCasting/src/Audio.java
Normal file
|
@ -0,0 +1,11 @@
|
|||
public abstract class Audio extends Article {
|
||||
String title;
|
||||
|
||||
public Audio(String code, double price, String title) {
|
||||
super(code, price);
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
abstract void print();
|
||||
|
||||
}
|
16
Code/Steiner/dynamicCasting/src/Book.java
Normal file
|
@ -0,0 +1,16 @@
|
|||
public class Book extends Article {
|
||||
String author;
|
||||
String title;
|
||||
|
||||
public Book(String code, double price, String author, String title) {
|
||||
super(code, price);
|
||||
this.author = author;
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
@Override
|
||||
void print() {
|
||||
System.out.println(this.author + " - " + this.title);
|
||||
System.out.println("Code: " + super.code + "\nPrice: " + super.price);
|
||||
}
|
||||
}
|
27
Code/Steiner/dynamicCasting/src/CD.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
import java.util.ArrayList;
|
||||
|
||||
public class CD extends Audio {
|
||||
ArrayList<String> tracks = new ArrayList<>();
|
||||
|
||||
public CD(String code, double price, String title, ArrayList<String> tracks) {
|
||||
super(code, price, title);
|
||||
this.tracks = tracks;
|
||||
}
|
||||
|
||||
@Override
|
||||
void print() {
|
||||
System.out.println("Title: " + title);
|
||||
System.out.println("Code: " + super.code + "\nPrice: " + super.price);
|
||||
for (String string : tracks) {
|
||||
System.out.println(string);
|
||||
}
|
||||
}
|
||||
|
||||
void playTrack() {
|
||||
int i = 1;
|
||||
for (String string : tracks) {
|
||||
System.out.println("Play track " + i + " " + string + " der CD " + title);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
14
Code/Steiner/dynamicCasting/src/Camera.java
Normal file
|
@ -0,0 +1,14 @@
|
|||
public class Camera extends Article {
|
||||
String brand;
|
||||
|
||||
public Camera(String code, double price, String brand) {
|
||||
super(code, price);
|
||||
this.brand = brand;
|
||||
}
|
||||
|
||||
@Override
|
||||
void print() {
|
||||
System.out.println("Brand: " + this.brand);
|
||||
System.out.println("Code: " + super.code + "\nPrice: " + super.price);
|
||||
}
|
||||
}
|
15
Code/Steiner/dynamicCasting/src/MP3.java
Normal file
|
@ -0,0 +1,15 @@
|
|||
public class MP3 extends Audio {
|
||||
String lengh;
|
||||
|
||||
public MP3(String code, double price, String title, String lengh) {
|
||||
super(code, price, title);
|
||||
this.lengh = lengh;
|
||||
}
|
||||
|
||||
@Override
|
||||
void print() {
|
||||
System.out.println("Title: " + title);
|
||||
System.out.println("Code: " + super.code + "\nPrice: " + super.price);
|
||||
System.out.println("Lengh: " + lengh + " (this was not my typo i was forced to do this)");
|
||||
}
|
||||
}
|
7
Code/Steiner/gameWithCards/.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"java.project.sourcePaths": ["src"],
|
||||
"java.project.outputPath": "bin",
|
||||
"java.project.referencedLibraries": [
|
||||
"lib/**/*.jar"
|
||||
]
|
||||
}
|
18
Code/Steiner/gameWithCards/README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
## Getting Started
|
||||
|
||||
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
|
||||
|
||||
## Folder Structure
|
||||
|
||||
The workspace contains two folders by default, where:
|
||||
|
||||
- `src`: the folder to maintain sources
|
||||
- `lib`: the folder to maintain dependencies
|
||||
|
||||
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
|
||||
|
||||
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
|
||||
|
||||
## Dependency Management
|
||||
|
||||
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
|
BIN
Code/Steiner/gameWithCards/bin/App.class
Normal file
BIN
Code/Steiner/gameWithCards/bin/Board.class
Normal file
BIN
Code/Steiner/gameWithCards/bin/Card.class
Normal file
BIN
Code/Steiner/gameWithCards/bin/Field.class
Normal file
BIN
Code/Steiner/gameWithCards/bin/Game.class
Normal file
BIN
Code/Steiner/gameWithCards/bin/Magic.class
Normal file
BIN
Code/Steiner/gameWithCards/bin/Unit.class
Normal file
6
Code/Steiner/gameWithCards/src/App.java
Normal file
|
@ -0,0 +1,6 @@
|
|||
public class App {
|
||||
public static void main(String[] args) {
|
||||
Game game = new Game();
|
||||
game.start();
|
||||
}
|
||||
}
|
43
Code/Steiner/gameWithCards/src/Board.java
Normal file
|
@ -0,0 +1,43 @@
|
|||
public class Board {
|
||||
private int gridSize;
|
||||
private Field[][] grid;
|
||||
|
||||
public Board(int gridSize) {
|
||||
this.gridSize = gridSize;
|
||||
grid = new Field[gridSize][gridSize];
|
||||
for (int i = 0; i < gridSize; i++) {
|
||||
for (int j = 0; j < gridSize; j++) {
|
||||
grid[i][j] = new Field();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void placeUnit(int x, int y) {
|
||||
if (!grid[x][y].isFieldOccupied()) {
|
||||
grid[x][y].setFieldOccupied(true);
|
||||
System.out.println("Unit placed at (" + x + ", " + y + ")");
|
||||
} else {
|
||||
System.out.println("Field is already occupied.");
|
||||
}
|
||||
}
|
||||
|
||||
public void moveUnit(int fromX, int fromY, int toX, int toY) {
|
||||
if (grid[fromX][fromY].isFieldOccupied() && !grid[toX][toY].isFieldOccupied()) {
|
||||
grid[fromX][fromY].setFieldOccupied(false);
|
||||
grid[toX][toY].setFieldOccupied(true);
|
||||
System.out.println("Unit moved to (" + toX + ", " + toY + ")");
|
||||
} else {
|
||||
System.out.println("Invalid move.");
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isWon() {
|
||||
// Example condition: if any unit reaches the last row
|
||||
for (int j = 0; j < gridSize; j++) {
|
||||
if (grid[gridSize - 1][j].isFieldOccupied()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
19
Code/Steiner/gameWithCards/src/Card.java
Normal file
|
@ -0,0 +1,19 @@
|
|||
public abstract class Card {
|
||||
private String cardName;
|
||||
private String cardDescription;
|
||||
|
||||
public Card(String cardName, String cardDescription) {
|
||||
this.cardName = cardName;
|
||||
this.cardDescription = cardDescription;
|
||||
}
|
||||
|
||||
public String getCardName() {
|
||||
return cardName;
|
||||
}
|
||||
|
||||
public String getCardDescription() {
|
||||
return cardDescription;
|
||||
}
|
||||
|
||||
public abstract void activate();
|
||||
}
|
19
Code/Steiner/gameWithCards/src/Field.java
Normal file
|
@ -0,0 +1,19 @@
|
|||
public class Field {
|
||||
boolean isFieldOccupied;
|
||||
|
||||
public Field() {
|
||||
this.isFieldOccupied = false;
|
||||
}
|
||||
|
||||
public Field(boolean isFieldOccupied) {
|
||||
this.isFieldOccupied = isFieldOccupied;
|
||||
}
|
||||
|
||||
public boolean isFieldOccupied() {
|
||||
return isFieldOccupied;
|
||||
}
|
||||
|
||||
public void setFieldOccupied(boolean isFieldOccupied) {
|
||||
this.isFieldOccupied = isFieldOccupied;
|
||||
}
|
||||
}
|
16
Code/Steiner/gameWithCards/src/Game.java
Normal file
|
@ -0,0 +1,16 @@
|
|||
public class Game {
|
||||
private Board board;
|
||||
|
||||
public Game() {
|
||||
board = new Board(5); // Example grid size
|
||||
}
|
||||
|
||||
public void start() {
|
||||
// Example game loop
|
||||
if (board.isWon()) {
|
||||
System.out.println("You win!");
|
||||
} else {
|
||||
System.out.println("Game continues.");
|
||||
}
|
||||
}
|
||||
}
|
15
Code/Steiner/gameWithCards/src/Magic.java
Normal file
|
@ -0,0 +1,15 @@
|
|||
public abstract class Magic extends Card {
|
||||
private int cost;
|
||||
|
||||
public Magic(String cardName, String cardDescription, int cost) {
|
||||
super(cardName, cardDescription);
|
||||
this.cost = cost;
|
||||
}
|
||||
|
||||
public int getCost() {
|
||||
return cost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public abstract void activate();
|
||||
}
|
17
Code/Steiner/gameWithCards/src/Unit.java
Normal file
|
@ -0,0 +1,17 @@
|
|||
public abstract class Unit {
|
||||
protected int health;
|
||||
protected int defense;
|
||||
protected int attack;
|
||||
|
||||
public Unit(int health, int defense, int attack) {
|
||||
this.health = health;
|
||||
this.defense = defense;
|
||||
this.attack = attack;
|
||||
}
|
||||
|
||||
public abstract void defend();
|
||||
|
||||
public abstract void attack();
|
||||
|
||||
public abstract void move();
|
||||
}
|
7
Code/Steiner/interfacesTheorie/.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"java.project.sourcePaths": ["src"],
|
||||
"java.project.outputPath": "bin",
|
||||
"java.project.referencedLibraries": [
|
||||
"lib/**/*.jar"
|
||||
]
|
||||
}
|
18
Code/Steiner/interfacesTheorie/README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
## Getting Started
|
||||
|
||||
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
|
||||
|
||||
## Folder Structure
|
||||
|
||||
The workspace contains two folders by default, where:
|
||||
|
||||
- `src`: the folder to maintain sources
|
||||
- `lib`: the folder to maintain dependencies
|
||||
|
||||
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
|
||||
|
||||
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
|
||||
|
||||
## Dependency Management
|
||||
|
||||
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
|
BIN
Code/Steiner/interfacesTheorie/bin/App.class
Normal file
BIN
Code/Steiner/interfacesTheorie/bin/ITierBewegen.class
Normal file
BIN
Code/Steiner/interfacesTheorie/bin/ITierNahrungsaufnahme.class
Normal file
BIN
Code/Steiner/interfacesTheorie/bin/Kuckuck.class
Normal file
BIN
Code/Steiner/interfacesTheorie/bin/Vogel.class
Normal file
8
Code/Steiner/interfacesTheorie/src/App.java
Normal file
|
@ -0,0 +1,8 @@
|
|||
public class App {
|
||||
public static void main(String[] args) throws Exception {
|
||||
Kuckuck fips = new Kuckuck();
|
||||
fips.singen();
|
||||
fips.bewegen();
|
||||
fips.essen();
|
||||
}
|
||||
}
|
3
Code/Steiner/interfacesTheorie/src/ITierBewegen.java
Normal file
|
@ -0,0 +1,3 @@
|
|||
public interface ITierBewegen {
|
||||
public void bewegen();
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
public interface ITierNahrungsaufnahme {
|
||||
public void essen();
|
||||
|
||||
}
|
17
Code/Steiner/interfacesTheorie/src/Kuckuck.java
Normal file
|
@ -0,0 +1,17 @@
|
|||
public class Kuckuck extends Vogel {
|
||||
|
||||
@Override
|
||||
public void singen() {
|
||||
System.out.println("Kuckuck geräusche");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void essen() {
|
||||
System.out.println("Der Kuckuck fliegt");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bewegen() {
|
||||
System.out.println("Der Kuckuck frisst mücken - MAHLZEIT");
|
||||
}
|
||||
}
|
7
Code/Steiner/interfacesTheorie/src/Vogel.java
Normal file
|
@ -0,0 +1,7 @@
|
|||
public abstract class Vogel implements ITierNahrungsaufnahme, ITierBewegen {
|
||||
Vogel() {
|
||||
|
||||
}
|
||||
|
||||
public abstract void singen();
|
||||
}
|
7
Code/Steiner/pruefung04-12-24(2)/.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"java.project.sourcePaths": ["src"],
|
||||
"java.project.outputPath": "bin",
|
||||
"java.project.referencedLibraries": [
|
||||
"lib/**/*.jar"
|
||||
]
|
||||
}
|
18
Code/Steiner/pruefung04-12-24(2)/README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
## Getting Started
|
||||
|
||||
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
|
||||
|
||||
## Folder Structure
|
||||
|
||||
The workspace contains two folders by default, where:
|
||||
|
||||
- `src`: the folder to maintain sources
|
||||
- `lib`: the folder to maintain dependencies
|
||||
|
||||
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
|
||||
|
||||
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
|
||||
|
||||
## Dependency Management
|
||||
|
||||
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
|
BIN
Code/Steiner/pruefung04-12-24(2)/bin/App.class
Normal file
BIN
Code/Steiner/pruefung04-12-24(2)/bin/LabeledRectangle.class
Normal file
BIN
Code/Steiner/pruefung04-12-24(2)/src/App.class
Normal file
27
Code/Steiner/pruefung04-12-24(2)/src/App.java
Normal file
|
@ -0,0 +1,27 @@
|
|||
//Luca Fbian Burger
|
||||
// Aufgabe 5
|
||||
|
||||
public class App {
|
||||
public static void main(String[] args) throws Exception {
|
||||
// Erstelle ein beschriftetes Rechteck
|
||||
LabeledRectangle rect = new LabeledRectangle(10, 20, 100, 50, "Mein Rechteck");
|
||||
|
||||
// Informationen übder das Rechteck asugeben
|
||||
System.out.println("Rechteck-Informationen");
|
||||
System.out.println(rect.getInfo());
|
||||
|
||||
// Grenzen des Rechtecks verschieben und ändern
|
||||
System.out.println("\nÄndere die Grenzen des Rechtecks...");
|
||||
rect.setBounds(50, 60, 200, 100);
|
||||
|
||||
// Prüfen ob ein Punkt innerhalb des Rechtecks liegt
|
||||
int testX = 130;
|
||||
int testY = 140;
|
||||
System.out.println("\nPrüfe ob Punkt (" + testX + ", " + testY + ") im Rechteck liegt:");
|
||||
if (rect.contains(testX, testY)) {
|
||||
System.out.println("Der Punkt liegt im Rechteck.");
|
||||
} else {
|
||||
System.out.println("Der Punkt liegt ausserhalb des Rechtecks.");
|
||||
}
|
||||
}
|
||||
}
|
BIN
Code/Steiner/pruefung04-12-24(2)/src/LabeledRectangle.class
Normal file
18
Code/Steiner/pruefung04-12-24(2)/src/LabeledRectangle.java
Normal file
|
@ -0,0 +1,18 @@
|
|||
//Luca Fbian Burger
|
||||
// Aufgabe 5
|
||||
|
||||
import java.awt.Rectangle;
|
||||
|
||||
public class LabeledRectangle extends Rectangle {
|
||||
private String label;
|
||||
|
||||
LabeledRectangle(int x, int y, int width, int height, String label) {
|
||||
super(x, y, width, height);
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return "Label: " + this.label + "\nPosition: (" + this.x + ", " + this.y + ")" + "\nGrösse: " + this.width + "x"
|
||||
+ this.height;
|
||||
}
|
||||
}
|
7
Code/Steiner/pruefung04-12-24/.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"java.project.sourcePaths": ["src"],
|
||||
"java.project.outputPath": "bin",
|
||||
"java.project.referencedLibraries": [
|
||||
"lib/**/*.jar"
|
||||
]
|
||||
}
|
18
Code/Steiner/pruefung04-12-24/README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
## Getting Started
|
||||
|
||||
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
|
||||
|
||||
## Folder Structure
|
||||
|
||||
The workspace contains two folders by default, where:
|
||||
|
||||
- `src`: the folder to maintain sources
|
||||
- `lib`: the folder to maintain dependencies
|
||||
|
||||
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
|
||||
|
||||
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
|
||||
|
||||
## Dependency Management
|
||||
|
||||
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
|
BIN
Code/Steiner/pruefung04-12-24/bin/App.class
Normal file
BIN
Code/Steiner/pruefung04-12-24/bin/DatenanalysePlugin.class
Normal file
BIN
Code/Steiner/pruefung04-12-24/bin/Plugin.class
Normal file
BIN
Code/Steiner/pruefung04-12-24/bin/UIPlugin.class
Normal file
BIN
Code/Steiner/pruefung04-12-24/src/App.class
Normal file
17
Code/Steiner/pruefung04-12-24/src/App.java
Normal file
|
@ -0,0 +1,17 @@
|
|||
// Luca Fbaian Burger
|
||||
// Aufgabe 4
|
||||
|
||||
public class App {
|
||||
public static void main(String[] args) throws Exception {
|
||||
DatenanalysePlugin data = new DatenanalysePlugin("DataAnalyzer", "1.0", "Kundendaten");
|
||||
UIPlugin ui = new UIPlugin("FancyUI", "1.1", "Buttons and slider");
|
||||
|
||||
data.installieren();
|
||||
data.hinzufuegenDatenquelle("Einkausdaten");
|
||||
data.ausfuehren();
|
||||
ui.installieren();
|
||||
ui.ausfuehren();
|
||||
ui.anpassen("Graphen und Digramme");
|
||||
ui.ausfuehren();
|
||||
}
|
||||
}
|
BIN
Code/Steiner/pruefung04-12-24/src/DatenanalysePlugin.class
Normal file
24
Code/Steiner/pruefung04-12-24/src/DatenanalysePlugin.java
Normal file
|
@ -0,0 +1,24 @@
|
|||
// Luca Fbaian Burger
|
||||
// Aufgabe 5
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class DatenanalysePlugin extends Plugin {
|
||||
private ArrayList<String> datenquellen = new ArrayList<String>();
|
||||
|
||||
public DatenanalysePlugin(String name, String version, String datenquelle) {
|
||||
super(name, version);
|
||||
datenquellen.add(datenquelle);
|
||||
}
|
||||
|
||||
public void ausfuehren() {
|
||||
for (String string : datenquellen) {
|
||||
System.out.println("Datenanalyse für " + string + " wird durchgeführt.");
|
||||
}
|
||||
}
|
||||
|
||||
public void hinzufuegenDatenquelle(String neueDatenquelle) {
|
||||
datenquellen.add(neueDatenquelle);
|
||||
System.out.println("Datenquelle hinzugefügt: " + neueDatenquelle);
|
||||
}
|
||||
}
|
BIN
Code/Steiner/pruefung04-12-24/src/Plugin.class
Normal file
31
Code/Steiner/pruefung04-12-24/src/Plugin.java
Normal file
|
@ -0,0 +1,31 @@
|
|||
// Luca Fbaian Burger
|
||||
// Aufgabe 5
|
||||
|
||||
public abstract class Plugin {
|
||||
protected String name;
|
||||
protected String version;
|
||||
|
||||
public Plugin(String name, String version) {
|
||||
this.name = name;
|
||||
this.version = version;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return version;
|
||||
}
|
||||
|
||||
public void installieren() {
|
||||
System.out.println(this.name + " Version " + version + " wird installiert.");
|
||||
}
|
||||
|
||||
public void deinstallieren() {
|
||||
// Logik
|
||||
}
|
||||
|
||||
public abstract void ausfuehren();
|
||||
|
||||
}
|
BIN
Code/Steiner/pruefung04-12-24/src/UIPlugin.class
Normal file
20
Code/Steiner/pruefung04-12-24/src/UIPlugin.java
Normal file
|
@ -0,0 +1,20 @@
|
|||
// Luca Fbaian Burger
|
||||
// Aufgabe 5
|
||||
|
||||
public class UIPlugin extends Plugin {
|
||||
private String uiElement;
|
||||
|
||||
public UIPlugin(String name, String version, String uiElement) {
|
||||
super(name, version);
|
||||
this.uiElement = uiElement;
|
||||
}
|
||||
|
||||
public void ausfuehren() {
|
||||
System.out.println("UI Erweiterung wird ausgeführt: " + this.uiElement);
|
||||
}
|
||||
|
||||
public void anpassen(String uiElement) {
|
||||
this.uiElement = uiElement;
|
||||
System.out.println("UI angepasst zu: " + this.uiElement);
|
||||
}
|
||||
}
|
7
Code/Steiner/samsung(Interfaces-task)/.vscode/settings.json
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"java.project.sourcePaths": ["src"],
|
||||
"java.project.outputPath": "bin",
|
||||
"java.project.referencedLibraries": [
|
||||
"lib/**/*.jar"
|
||||
]
|
||||
}
|
18
Code/Steiner/samsung(Interfaces-task)/README.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
## Getting Started
|
||||
|
||||
Welcome to the VS Code Java world. Here is a guideline to help you get started to write Java code in Visual Studio Code.
|
||||
|
||||
## Folder Structure
|
||||
|
||||
The workspace contains two folders by default, where:
|
||||
|
||||
- `src`: the folder to maintain sources
|
||||
- `lib`: the folder to maintain dependencies
|
||||
|
||||
Meanwhile, the compiled output files will be generated in the `bin` folder by default.
|
||||
|
||||
> If you want to customize the folder structure, open `.vscode/settings.json` and update the related settings there.
|
||||
|
||||
## Dependency Management
|
||||
|
||||
The `JAVA PROJECTS` view allows you to manage your dependencies. More details can be found [here](https://github.com/microsoft/vscode-java-dependency#manage-dependencies).
|
BIN
Code/Steiner/samsung(Interfaces-task)/bin/App.class
Normal file
BIN
Code/Steiner/samsung(Interfaces-task)/bin/GalaxyJ3.class
Normal file
BIN
Code/Steiner/samsung(Interfaces-task)/bin/GalaxyS5.class
Normal file
BIN
Code/Steiner/samsung(Interfaces-task)/bin/ITelefon.class
Normal file
BIN
Code/Steiner/samsung(Interfaces-task)/bin/Samsung.class
Normal file
24
Code/Steiner/samsung(Interfaces-task)/src/App.java
Normal file
|
@ -0,0 +1,24 @@
|
|||
import java.util.ArrayList;
|
||||
|
||||
public class App {
|
||||
public static void main(String[] args) throws Exception {
|
||||
ArrayList<Samsung> devices = new ArrayList<Samsung>();
|
||||
devices.add(new GalaxyJ3(11.85, "Phone"));
|
||||
devices.add(new GalaxyS5(12.45, "phone", "sunset-black"));
|
||||
|
||||
for (Samsung samsung : devices) {
|
||||
System.out.println(samsung.preis);
|
||||
System.out.println(samsung.produktTyp);
|
||||
if (samsung instanceof GalaxyS5) {
|
||||
System.out.println(((GalaxyS5) samsung).farbe);
|
||||
}
|
||||
System.out.println("Funktionstest");
|
||||
if (samsung instanceof ITelefon) {
|
||||
((ITelefon) samsung).powerOn();
|
||||
((ITelefon) samsung).esKlingelt();
|
||||
((ITelefon) samsung).anrufen();
|
||||
}
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
}
|
22
Code/Steiner/samsung(Interfaces-task)/src/GalaxyJ3.java
Normal file
|
@ -0,0 +1,22 @@
|
|||
public class GalaxyJ3 extends Samsung implements ITelefon {
|
||||
|
||||
public GalaxyJ3(double preis, String produktTyp) {
|
||||
super(preis, produktTyp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void powerOn() {
|
||||
System.out.println("GalaxyJ3 is starting");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void esKlingelt() {
|
||||
System.out.println("DING DING DING");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void anrufen() {
|
||||
System.out.println("No one will pick up - since you have no signal in the basement");
|
||||
}
|
||||
|
||||
}
|
23
Code/Steiner/samsung(Interfaces-task)/src/GalaxyS5.java
Normal file
|
@ -0,0 +1,23 @@
|
|||
public class GalaxyS5 extends Samsung implements ITelefon {
|
||||
String farbe;
|
||||
|
||||
public GalaxyS5(double preis, String produktTyp, String farbe) {
|
||||
super(preis, produktTyp);
|
||||
this.farbe = farbe;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void powerOn() {
|
||||
System.out.println("GalaxyJ5 is starting");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void esKlingelt() {
|
||||
System.out.println("DING DING DING");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void anrufen() {
|
||||
System.out.println("No one will pick up - since you have no signal in the basement");
|
||||
}
|
||||
}
|
7
Code/Steiner/samsung(Interfaces-task)/src/ITelefon.java
Normal file
|
@ -0,0 +1,7 @@
|
|||
public interface ITelefon {
|
||||
public void powerOn();
|
||||
|
||||
public void esKlingelt();
|
||||
|
||||
public void anrufen();
|
||||
}
|
9
Code/Steiner/samsung(Interfaces-task)/src/Samsung.java
Normal file
|
@ -0,0 +1,9 @@
|
|||
public abstract class Samsung {
|
||||
double preis;
|
||||
String produktTyp;
|
||||
|
||||
public Samsung(double preis, String produktTyp) {
|
||||
this.preis = preis;
|
||||
this.produktTyp = produktTyp;
|
||||
}
|
||||
}
|
51
Code/ost/JAVA-FX-PROJECT/_javafx_website_task/pom.xml
Normal file
|
@ -0,0 +1,51 @@
|
|||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.example</groupId>
|
||||
<artifactId>_javafx_website_task</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.openjfx</groupId>
|
||||
<artifactId>javafx-controls</artifactId>
|
||||
<version>13</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.openjfx</groupId>
|
||||
<artifactId>javafx-fxml</artifactId>
|
||||
<version>13</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<configuration>
|
||||
<release>11</release>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.openjfx</groupId>
|
||||
<artifactId>javafx-maven-plugin</artifactId>
|
||||
<version>0.0.6</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<!-- Default configuration for running -->
|
||||
<!-- Usage: mvn clean javafx:run -->
|
||||
<id>default-cli</id>
|
||||
<configuration>
|
||||
<mainClass>com.example.App</mainClass>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
|
@ -0,0 +1,38 @@
|
|||
package com.example;
|
||||
|
||||
import javafx.application.Application;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Parent;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* JavaFX App
|
||||
*/
|
||||
public class App extends Application {
|
||||
|
||||
private static Scene scene;
|
||||
|
||||
@Override
|
||||
public void start(Stage stage) throws IOException {
|
||||
scene = new Scene(loadFXML("shop"), 640, 480);
|
||||
stage.setScene(scene);
|
||||
stage.show();
|
||||
}
|
||||
|
||||
static void setRoot(String fxml) throws IOException {
|
||||
scene.setRoot(loadFXML(fxml));
|
||||
}
|
||||
|
||||
private static Parent loadFXML(String fxml) throws IOException {
|
||||
FXMLLoader fxmlLoader = new FXMLLoader(App.class.getResource(fxml + ".fxml"));
|
||||
return fxmlLoader.load();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
launch();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
package com.example;
|
||||
|
||||
import javafx.collections.FXCollections;
|
||||
import javafx.collections.ObservableList;
|
||||
import javafx.fxml.FXML;
|
||||
import javafx.scene.control.ListCell;
|
||||
import javafx.scene.control.ListView;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.text.Text;
|
||||
|
||||
public class PrimaryController {
|
||||
|
||||
@FXML
|
||||
private ListView<Item> cartList;
|
||||
|
||||
@FXML
|
||||
public void initialize() {
|
||||
// Sample data
|
||||
ObservableList<Item> items = FXCollections.observableArrayList(
|
||||
new Item("Book 1", "Fantasy adventure novel", 3, 19.99),
|
||||
new Item("Book 2", "Science fiction thriller", 1, 25.50));
|
||||
|
||||
cartList.setItems(items);
|
||||
|
||||
// Custom cell factory to display items
|
||||
cartList.setCellFactory(param -> new ListCell<Item>() {
|
||||
@Override
|
||||
protected void updateItem(Item item, boolean empty) {
|
||||
super.updateItem(item, empty);
|
||||
if (empty || item == null) {
|
||||
setText(null);
|
||||
} else {
|
||||
// Create a custom layout for each item
|
||||
HBox hbox = new HBox();
|
||||
Text titleText = new Text(item.getTitle());
|
||||
Text descText = new Text(item.getDescription());
|
||||
Text quantityText = new Text("Quantity: " + item.getQuantity());
|
||||
Text priceText = new Text("Price: $" + item.getPrice());
|
||||
|
||||
hbox.getChildren().addAll(titleText, descText, quantityText, priceText);
|
||||
setGraphic(hbox);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Item class to hold data
|
||||
public static class Item {
|
||||
private String title;
|
||||
private String description;
|
||||
private int quantity;
|
||||
private double price;
|
||||
|
||||
public Item(String title, String description, int quantity, double price) {
|
||||
this.title = title;
|
||||
this.description = description;
|
||||
this.quantity = quantity;
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public int getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public double getPrice() {
|
||||
return price;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.example;
|
||||
|
||||
import java.io.IOException;
|
||||
import javafx.fxml.FXML;
|
||||
|
||||
public class SecondaryController {
|
||||
|
||||
@FXML
|
||||
private void switchToPrimary() throws IOException {
|
||||
App.setRoot("primary");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
module com.example {
|
||||
requires javafx.controls;
|
||||
requires javafx.fxml;
|
||||
|
||||
opens com.example to javafx.fxml;
|
||||
exports com.example;
|
||||
}
|
|
@ -0,0 +1,100 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.TableColumn?>
|
||||
<?import javafx.scene.control.TableView?>
|
||||
<?import javafx.scene.layout.BorderPane?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
|
||||
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.PrimaryController">
|
||||
<top>
|
||||
<HBox id="header" alignment="CENTER" prefHeight="60.0" prefWidth="631.0" spacing="20.0" styleClass="header" BorderPane.alignment="CENTER">
|
||||
<children>
|
||||
<!-- Main Title -->
|
||||
<Label id="mainTitle" styleClass="mainTitle" text="Bookshop - Fantasy Brigade" />
|
||||
|
||||
<!-- Spacer for alignment -->
|
||||
<Pane HBox.hgrow="ALWAYS" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<Button id="cartBtn" mnemonicParsing="false" styleClass="cartBtn" text="Cart" />
|
||||
<Button id="loginBtn" mnemonicParsing="false" styleClass="loginBtn" text="Login" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="20.0" right="20.0" top="10.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
</top>
|
||||
<center>
|
||||
<GridPane id="main" styleClass="main" BorderPane.alignment="CENTER">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="100.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="449.0" minHeight="17.0" prefHeight="18.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="449.0" minHeight="30.0" prefHeight="394.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="223.0" minHeight="9.0" prefHeight="9.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<BorderPane.margin>
|
||||
<Insets />
|
||||
</BorderPane.margin>
|
||||
<children>
|
||||
<Button id="btnCheckOut" mnemonicParsing="false" styleClass="btnCheckOut" text="Check out" GridPane.rowIndex="2" />
|
||||
<Label id="cartTitle" styleClass="cartTitle" text="Your cart" />
|
||||
<TableView prefHeight="0.0" prefWidth="364.0" GridPane.rowIndex="1">
|
||||
<columns>
|
||||
<TableColumn prefWidth="243.0" text="Name" />
|
||||
<TableColumn prefWidth="615.0" text="Description" />
|
||||
<TableColumn minWidth="0.0" prefWidth="154.0" text="Quantaty" />
|
||||
<TableColumn minWidth="0.0" prefWidth="147.0" text="Price" />
|
||||
</columns>
|
||||
</TableView>
|
||||
</children>
|
||||
</GridPane>
|
||||
</center>
|
||||
<bottom>
|
||||
<VBox id="footer" prefHeight="188.0" prefWidth="1200.0" styleClass="footer" BorderPane.alignment="CENTER">
|
||||
<children>
|
||||
<HBox id="footerLinks" alignment="TOP_CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||
<children>
|
||||
<VBox id="quickLinks" alignment="TOP_LEFT" prefHeight="145.0" prefWidth="470.0" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerText" prefHeight="25.0" prefWidth="226.0" styleClass="footerHeading" text="Quick Links" />
|
||||
<Label id="footerHome" styleClass="footerText" text="Home" />
|
||||
<Label id="footerAbout" styleClass="footerText" text="About Us" />
|
||||
<Label id="footerContact" styleClass="footerText" text="Contact" />
|
||||
</children>
|
||||
</VBox>
|
||||
<VBox id="contactUs" prefHeight="145.0" prefWidth="583.0" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerHeading2" prefWidth="534.0" styleClass="footerHeading" text="Contact Us" />
|
||||
<Label id="footerEmail" styleClass="footerText" text="Email: info@example.com" />
|
||||
<Label id="footerPhone" styleClass="footerText" text="Phone: +1 123 456 7890" />
|
||||
</children>
|
||||
</VBox>
|
||||
<VBox id="followUs" alignment="TOP_RIGHT" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerHeading3" styleClass="footerHeading" text="Follow Us" />
|
||||
<Label id="footerFacebook" styleClass="footerLink" text="Facebook" />
|
||||
<Label id="footerTwitter" styleClass="footerLink" text="Twitter" />
|
||||
<Label id="footerInstagram" styleClass="footerLink" text="Instagram" />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</HBox>
|
||||
<VBox id="footerCopy" alignment="BOTTOM_CENTER" prefHeight="68.0" prefWidth="1170.0" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerCopyText" alignment="CENTER" contentDisplay="CENTER" styleClass="footerCopy" text="© 2024 My Website. All rights reserved." />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</VBox>
|
||||
</bottom>
|
||||
</BorderPane>
|
|
@ -0,0 +1,172 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.ComboBox?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.PasswordField?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import javafx.scene.layout.BorderPane?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
|
||||
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.PrimaryController">
|
||||
<top>
|
||||
<HBox id="header" alignment="CENTER" prefHeight="60.0" prefWidth="631.0" spacing="20.0" styleClass="header" BorderPane.alignment="CENTER">
|
||||
<children>
|
||||
<!-- Main Title -->
|
||||
<Label id="mainTitle" styleClass="mainTitle" text="Bookshop - Fantasy Brigade" />
|
||||
|
||||
<!-- Spacer for alignment -->
|
||||
<Pane HBox.hgrow="ALWAYS" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<Button id="cartBtn" mnemonicParsing="false" styleClass="cartBtn" text="Cart" />
|
||||
<Button id="loginBtn" mnemonicParsing="false" styleClass="loginBtn" text="Login" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="20.0" right="20.0" top="10.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
</top>
|
||||
<bottom>
|
||||
<VBox id="footer" prefHeight="188.0" prefWidth="1200.0" styleClass="footer" BorderPane.alignment="CENTER">
|
||||
<children>
|
||||
<HBox id="footerLinks" alignment="TOP_CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||
<children>
|
||||
<VBox id="quickLinks" alignment="TOP_LEFT" prefHeight="145.0" prefWidth="470.0" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerText" prefHeight="25.0" prefWidth="226.0" styleClass="footerHeading" text="Quick Links" />
|
||||
<Label id="footerHome" styleClass="footerText" text="Home" />
|
||||
<Label id="footerAbout" styleClass="footerText" text="About Us" />
|
||||
<Label id="footerContact" styleClass="footerText" text="Contact" />
|
||||
</children>
|
||||
</VBox>
|
||||
<VBox id="contactUs" prefHeight="145.0" prefWidth="583.0" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerHeading2" prefWidth="534.0" styleClass="footerHeading" text="Contact Us" />
|
||||
<Label id="footerEmail" styleClass="footerText" text="Email: info@example.com" />
|
||||
<Label id="footerPhone" styleClass="footerText" text="Phone: +1 123 456 7890" />
|
||||
</children>
|
||||
</VBox>
|
||||
<VBox id="followUs" alignment="TOP_RIGHT" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerHeading3" styleClass="footerHeading" text="Follow Us" />
|
||||
<Label id="footerFacebook" styleClass="footerLink" text="Facebook" />
|
||||
<Label id="footerTwitter" styleClass="footerLink" text="Twitter" />
|
||||
<Label id="footerInstagram" styleClass="footerLink" text="Instagram" />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</HBox>
|
||||
<VBox id="footerCopy" alignment="BOTTOM_CENTER" prefHeight="68.0" prefWidth="1170.0" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerCopyText" alignment="CENTER" contentDisplay="CENTER" styleClass="footerCopy" text="© 2024 My Website. All rights reserved." />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</VBox>
|
||||
</bottom>
|
||||
<center>
|
||||
<GridPane id="main" styleClass="main" BorderPane.alignment="CENTER">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<GridPane fx:id="billingForm" alignment="TOP_CENTER" hgap="10" prefHeight="600.0" prefWidth="800.0" style="-fx-background-color: rgba(238, 130, 238, 0.8);" vgap="20">
|
||||
<children>
|
||||
<!-- Check Out Header -->
|
||||
<Label id="checkoutHeader" style="-fx-font-size: 24px; -fx-font-weight: bold;" text="Check out" textFill="WHITE" GridPane.columnSpan="2" GridPane.rowIndex="0" />
|
||||
|
||||
<!-- Payment Title -->
|
||||
<Label id="paymentTitle" style="-fx-font-size: 30px; -fx-font-weight: bold;" text="Payment" textFill="WHITE" GridPane.columnSpan="2" GridPane.rowIndex="1" />
|
||||
<Label id="paymentSubtitle" style="-fx-font-size: 14px;" text="Choose payment method below" textFill="WHITE" GridPane.columnSpan="2" GridPane.rowIndex="2" />
|
||||
|
||||
<!-- Payment Icons -->
|
||||
<HBox id="paymentMethods" alignment="CENTER" spacing="20" GridPane.columnSpan="2" GridPane.rowIndex="3">
|
||||
<Button id="creditCard" mnemonicParsing="false" styleClass="creditCard" />
|
||||
<Button id="bill" mnemonicParsing="false" styleClass="bill" />
|
||||
<Button id="paypal" mnemonicParsing="false" styleClass="paypal" />
|
||||
</HBox>
|
||||
|
||||
<!-- Billing Info Section -->
|
||||
<Label id="billingInfoTitle" style="-fx-font-size: 18px; -fx-font-weight: bold;" text="Billing Info" textFill="WHITE" GridPane.columnIndex="0" GridPane.rowIndex="4" />
|
||||
<HBox id="billingName" spacing="10" GridPane.columnIndex="0" GridPane.rowIndex="5">
|
||||
<Label id="fullNameLabel" text="Full Name:" textFill="WHITE" />
|
||||
<TextField fx:id="addressField1" prefWidth="200" promptText="Jon Doe" />
|
||||
</HBox>
|
||||
|
||||
<HBox id="billingAddress" spacing="10" GridPane.columnIndex="0" GridPane.rowIndex="6">
|
||||
<Label id="addressLabel" text="Address:" textFill="WHITE" />
|
||||
<TextField fx:id="addressField" prefWidth="200" promptText="497 Evergreen Rd." />
|
||||
</HBox>
|
||||
|
||||
<HBox id="billingCityZip" spacing="10" GridPane.columnIndex="0" GridPane.rowIndex="7">
|
||||
<Label id="cityLabel" text="City:" textFill="WHITE" />
|
||||
<TextField fx:id="cityField" prefWidth="100" promptText="Roseville" />
|
||||
<Label id="zipLabel" text="ZIP Code:" textFill="WHITE" />
|
||||
<TextField fx:id="zipField" prefWidth="80" promptText="95673" />
|
||||
</HBox>
|
||||
|
||||
<HBox id="billingCountry" spacing="10" GridPane.columnIndex="0" GridPane.rowIndex="8">
|
||||
<Label id="countryLabel" text="Country:" textFill="WHITE" />
|
||||
<ComboBox fx:id="countryComboBox" prefWidth="150.0" />
|
||||
</HBox>
|
||||
|
||||
<!-- Credit Card Info Section -->
|
||||
<Label id="creditCardInfoTitle" style="-fx-font-size: 18px; -fx-font-weight: bold;" text="Credit Card Info" textFill="WHITE" GridPane.columnIndex="1" GridPane.rowIndex="4" />
|
||||
<HBox id="creditCardNumber" spacing="10" GridPane.columnIndex="1" GridPane.rowIndex="5">
|
||||
<Label id="cardNumberLabel" text="Card Number:" textFill="WHITE" />
|
||||
<TextField fx:id="cardNumberField" prefWidth="200" promptText="1234 5678 3456 2456" />
|
||||
</HBox>
|
||||
<HBox id="creditCardHolder" spacing="10" GridPane.columnIndex="1" GridPane.rowIndex="6">
|
||||
<Label id="cardHolderNameLabel" text="Cardholder Name:" textFill="WHITE" />
|
||||
<TextField fx:id="cardHolderNameField" prefWidth="200" promptText="John Doe" />
|
||||
</HBox>
|
||||
<HBox id="creditCardExpiry" spacing="10" GridPane.columnIndex="1" GridPane.rowIndex="7">
|
||||
<Label id="expiryDateLabel" text="Expire Date:" textFill="WHITE" />
|
||||
<TextField fx:id="expiryDateField" prefWidth="80" promptText="MM / YY" />
|
||||
<Label id="cvvLabel" text="CVV:" textFill="WHITE" />
|
||||
<PasswordField fx:id="cvvField" />
|
||||
</HBox>
|
||||
|
||||
<!-- Submit Button -->
|
||||
<Button id="submitBtn" fx:id="submitButton" alignment="CENTER" contentDisplay="CENTER" prefWidth="150" style="-fx-alignment: #4CAF50; -fx-text-fill: white; -fx-font-size: 16px; -fx-font-weight: bold;" styleClass="cartBtn" text="Submit" GridPane.columnSpan="2" GridPane.rowIndex="9" />
|
||||
</children>
|
||||
<columnConstraints>
|
||||
<ColumnConstraints />
|
||||
<ColumnConstraints />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
<RowConstraints />
|
||||
</rowConstraints>
|
||||
<opaqueInsets>
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
<GridPane.margin>
|
||||
<Insets />
|
||||
</GridPane.margin>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
|
||||
</padding>
|
||||
</GridPane>
|
||||
</children>
|
||||
</GridPane>
|
||||
</center>
|
||||
</BorderPane>
|
After Width: | Height: | Size: 94 KiB |
After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 72 KiB |
After Width: | Height: | Size: 33 KiB |
After Width: | Height: | Size: 21 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 493 KiB |
|
@ -0,0 +1,104 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.PasswordField?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import javafx.scene.layout.BorderPane?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
|
||||
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.PrimaryController">
|
||||
<top>
|
||||
<HBox id="header" alignment="CENTER" prefHeight="60.0" prefWidth="631.0" spacing="20.0" styleClass="header" BorderPane.alignment="CENTER">
|
||||
<children>
|
||||
<!-- Main Title -->
|
||||
<Label id="mainTitle" styleClass="mainTitle" text="Bookshop - Fantasy Brigade" />
|
||||
|
||||
<!-- Spacer for alignment -->
|
||||
<Pane HBox.hgrow="ALWAYS" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<Button id="cartBtn" mnemonicParsing="false" styleClass="cartBtn" text="Cart" />
|
||||
<Button id="loginBtn" mnemonicParsing="false" styleClass="loginBtn" text="Login" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="20.0" right="20.0" top="10.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
</top>
|
||||
<bottom>
|
||||
<VBox id="footer" prefHeight="188.0" prefWidth="1200.0" styleClass="footer" BorderPane.alignment="CENTER">
|
||||
<children>
|
||||
<HBox id="footerLinks" alignment="TOP_CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||
<children>
|
||||
<VBox id="quickLinks" alignment="TOP_LEFT" prefHeight="145.0" prefWidth="470.0" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerText" prefHeight="25.0" prefWidth="226.0" styleClass="footerHeading" text="Quick Links" />
|
||||
<Label id="footerHome" styleClass="footerText" text="Home" />
|
||||
<Label id="footerAbout" styleClass="footerText" text="About Us" />
|
||||
<Label id="footerContact" styleClass="footerText" text="Contact" />
|
||||
</children>
|
||||
</VBox>
|
||||
<VBox id="contactUs" prefHeight="145.0" prefWidth="583.0" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerHeading2" prefWidth="534.0" styleClass="footerHeading" text="Contact Us" />
|
||||
<Label id="footerEmail" styleClass="footerText" text="Email: info@example.com" />
|
||||
<Label id="footerPhone" styleClass="footerText" text="Phone: +1 123 456 7890" />
|
||||
</children>
|
||||
</VBox>
|
||||
<VBox id="followUs" alignment="TOP_RIGHT" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerHeading3" styleClass="footerHeading" text="Follow Us" />
|
||||
<Label id="footerFacebook" styleClass="footerLink" text="Facebook" />
|
||||
<Label id="footerTwitter" styleClass="footerLink" text="Twitter" />
|
||||
<Label id="footerInstagram" styleClass="footerLink" text="Instagram" />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</HBox>
|
||||
<VBox id="footerCopy" alignment="BOTTOM_CENTER" prefHeight="68.0" prefWidth="1170.0" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerCopyText" alignment="CENTER" contentDisplay="CENTER" styleClass="footerCopy" text="© 2024 My Website. All rights reserved." />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</VBox>
|
||||
</bottom>
|
||||
<center>
|
||||
<GridPane id="main" styleClass="main" BorderPane.alignment="CENTER">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<children>
|
||||
<VBox id="loginForm" alignment="CENTER" prefHeight="400.0" prefWidth="300.0" spacing="20.0">
|
||||
<children>
|
||||
<Label id="formTitle" styleClass="formTitle" text="Login" />
|
||||
<VBox id="formFields" spacing="15.0">
|
||||
<!-- Username -->
|
||||
<VBox spacing="5.0">
|
||||
<Label id="usernameLabel" styleClass="formLabel" text="Username" />
|
||||
<TextField id="usernameInput" styleClass="formInput" />
|
||||
</VBox>
|
||||
|
||||
<!-- Password -->
|
||||
<VBox spacing="5.0">
|
||||
<Label id="passwordLabel" styleClass="formLabel" text="Password" />
|
||||
<PasswordField id="passwordInput" styleClass="formInput" />
|
||||
</VBox>
|
||||
</VBox>
|
||||
<Button id="loginButton" mnemonicParsing="false" styleClass="btnLogin" text="Login" />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</GridPane>
|
||||
</center>
|
||||
</BorderPane>
|
|
@ -0,0 +1,116 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.control.TextField?>
|
||||
<?import javafx.scene.layout.BorderPane?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
|
||||
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.PrimaryController">
|
||||
<top>
|
||||
<HBox id="header" alignment="CENTER" prefHeight="60.0" prefWidth="631.0" spacing="20.0" styleClass="header" BorderPane.alignment="CENTER">
|
||||
<children>
|
||||
<!-- Main Title -->
|
||||
<Label id="mainTitle" styleClass="mainTitle" text="Bookshop - Fantasy Brigade" />
|
||||
|
||||
<!-- Spacer for alignment -->
|
||||
<Pane HBox.hgrow="ALWAYS" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<Button id="cartBtn" mnemonicParsing="false" styleClass="cartBtn" text="Cart" />
|
||||
<Button id="loginBtn" mnemonicParsing="false" styleClass="loginBtn" text="Login" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="20.0" right="20.0" top="10.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
</top>
|
||||
<center>
|
||||
<GridPane id="main" styleClass="main" BorderPane.alignment="CENTER">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="100.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints maxHeight="149.0" minHeight="0.0" prefHeight="31.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints maxHeight="310.0" minHeight="30.0" prefHeight="279.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="30.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="30.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<BorderPane.margin>
|
||||
<Insets />
|
||||
</BorderPane.margin>
|
||||
<children>
|
||||
<Label id="formTitle" styleClass="formTitle" text="LOGIN" />
|
||||
<VBox id="formFields" prefHeight="200.0" prefWidth="100.0" GridPane.rowIndex="1">
|
||||
<children>
|
||||
<Label id="nameLabel" styleClass="formLabel" text="Name" />
|
||||
<TextField id="nameInput" styleClass="formInput" />
|
||||
|
||||
<Label id="surnameLabel" styleClass="formLabel" text="Surname" />
|
||||
<TextField id="surnameInput" styleClass="formInput" />
|
||||
|
||||
<Label id="emailLabel" styleClass="formLabel" text="Email address" />
|
||||
<TextField id="emailInput" styleClass="formInput" />
|
||||
|
||||
<Label id="phoneLabel" styleClass="formLabel" text="Phone number" />
|
||||
<TextField id="phoneInput" styleClass="formInput" />
|
||||
|
||||
<Label id="streetLabel" styleClass="formLabel" text="Street & Nr." />
|
||||
<TextField id="streetInput" styleClass="formInput" />
|
||||
|
||||
<Label id="cityLabel" styleClass="formLabel" text="City" />
|
||||
<TextField id="cityInput" styleClass="formInput" />
|
||||
|
||||
<Label id="cityCodeLabel" styleClass="formLabel" text="City code" />
|
||||
<TextField id="cityCodeInput" styleClass="formInput" />
|
||||
</children>
|
||||
</VBox>
|
||||
<Button id="createAccountButton" mnemonicParsing="false" styleClass="btnCreateAccount" text="Create account" GridPane.rowIndex="3" />
|
||||
</children>
|
||||
</GridPane>
|
||||
</center>
|
||||
<bottom>
|
||||
<VBox id="footer" prefHeight="188.0" prefWidth="1200.0" styleClass="footer" BorderPane.alignment="CENTER">
|
||||
<children>
|
||||
<HBox id="footerLinks" alignment="TOP_CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||
<children>
|
||||
<VBox id="quickLinks" alignment="TOP_LEFT" prefHeight="145.0" prefWidth="470.0" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerText" prefHeight="25.0" prefWidth="226.0" styleClass="footerHeading" text="Quick Links" />
|
||||
<Label id="footerHome" styleClass="footerText" text="Home" />
|
||||
<Label id="footerAbout" styleClass="footerText" text="About Us" />
|
||||
<Label id="footerContact" styleClass="footerText" text="Contact" />
|
||||
</children>
|
||||
</VBox>
|
||||
<VBox id="contactUs" prefHeight="145.0" prefWidth="583.0" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerHeading2" prefWidth="534.0" styleClass="footerHeading" text="Contact Us" />
|
||||
<Label id="footerEmail" styleClass="footerText" text="Email: info@example.com" />
|
||||
<Label id="footerPhone" styleClass="footerText" text="Phone: +1 123 456 7890" />
|
||||
</children>
|
||||
</VBox>
|
||||
<VBox id="followUs" alignment="TOP_RIGHT" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerHeading3" styleClass="footerHeading" text="Follow Us" />
|
||||
<Label id="footerFacebook" styleClass="footerLink" text="Facebook" />
|
||||
<Label id="footerTwitter" styleClass="footerLink" text="Twitter" />
|
||||
<Label id="footerInstagram" styleClass="footerLink" text="Instagram" />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</HBox>
|
||||
<VBox id="footerCopy" alignment="BOTTOM_CENTER" prefHeight="68.0" prefWidth="1170.0" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerCopyText" alignment="CENTER" contentDisplay="CENTER" styleClass="footerCopy" text="© 2024 My Website. All rights reserved." />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</VBox>
|
||||
</bottom>
|
||||
</BorderPane>
|
|
@ -0,0 +1,153 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.control.Button?>
|
||||
<?import javafx.scene.control.Label?>
|
||||
<?import javafx.scene.layout.BorderPane?>
|
||||
<?import javafx.scene.layout.ColumnConstraints?>
|
||||
<?import javafx.scene.layout.GridPane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.layout.RowConstraints?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
|
||||
<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="800.0" prefWidth="1200.0" xmlns="http://javafx.com/javafx/23.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="com.example.PrimaryController">
|
||||
<top>
|
||||
<HBox id="header" alignment="CENTER" prefHeight="60.0" prefWidth="631.0" spacing="20.0" styleClass="header" BorderPane.alignment="CENTER">
|
||||
<children>
|
||||
<!-- Main Title -->
|
||||
<Label id="mainTitle" styleClass="mainTitle" text="Bookshop - Fantasy Brigade" />
|
||||
|
||||
<!-- Spacer for alignment -->
|
||||
<Pane HBox.hgrow="ALWAYS" />
|
||||
|
||||
<!-- Buttons -->
|
||||
<Button id="cartBtn" mnemonicParsing="false" styleClass="cartBtn" text="Cart" />
|
||||
<Button id="loginBtn" mnemonicParsing="false" styleClass="loginBtn" text="Login" />
|
||||
</children>
|
||||
<padding>
|
||||
<Insets bottom="10.0" left="20.0" right="20.0" top="10.0" />
|
||||
</padding>
|
||||
</HBox>
|
||||
</top>
|
||||
<center>
|
||||
<GridPane id="main" styleClass="main" BorderPane.alignment="CENTER">
|
||||
<columnConstraints>
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="100.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="100.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="100.0" prefWidth="100.0" />
|
||||
<ColumnConstraints hgrow="SOMETIMES" minWidth="100.0" prefWidth="100.0" />
|
||||
</columnConstraints>
|
||||
<rowConstraints>
|
||||
<RowConstraints minHeight="30.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
<RowConstraints minHeight="30.0" prefHeight="30.0" vgrow="SOMETIMES" />
|
||||
</rowConstraints>
|
||||
<BorderPane.margin>
|
||||
<Insets />
|
||||
</BorderPane.margin>
|
||||
<children>
|
||||
<!-- Card 1 -->
|
||||
<VBox id="cardDiv" prefHeight="200.0" prefWidth="100.0" styleClass="cardDiv">
|
||||
<children>
|
||||
<Label id="cardTitel" styleClass="cardTitel" text="Booktitel" />
|
||||
<Button id="cardBtn" mnemonicParsing="false" styleClass="cardBtn" text="add to cart" />
|
||||
<Label id="cardText" styleClass="cardText" text="Description: ...." />
|
||||
</children>
|
||||
</VBox>
|
||||
<!-- Card 3 -->
|
||||
<VBox id="cardDiv" prefHeight="200.0" prefWidth="100.0" styleClass="cardDiv" GridPane.columnIndex="2">
|
||||
<children>
|
||||
<Label id="cardTitel" styleClass="cardTitel" text="Booktitel" />
|
||||
<Button id="cardBtn" mnemonicParsing="false" styleClass="cardBtn" text="add to cart" />
|
||||
<Label id="cardText" styleClass="cardText" text="Description: ...." />
|
||||
</children>
|
||||
</VBox>
|
||||
<!-- Card 4 -->
|
||||
<VBox id="cardDiv" prefHeight="200.0" prefWidth="100.0" styleClass="cardDiv" GridPane.columnIndex="3">
|
||||
<children>
|
||||
<Label id="cardTitel" styleClass="cardTitel" text="Booktitel" />
|
||||
<Button id="cardBtn" mnemonicParsing="false" styleClass="cardBtn" text="add to cart" />
|
||||
<Label id="cardText" styleClass="cardText" text="Description: ...." />
|
||||
</children>
|
||||
</VBox>
|
||||
<!-- Card 5 -->
|
||||
<VBox id="cardDiv" prefHeight="200.0" prefWidth="100.0" styleClass="cardDiv" GridPane.rowIndex="1">
|
||||
<children>
|
||||
<Label id="cardTitel" styleClass="cardTitel" text="Booktitel" />
|
||||
<Button id="cardBtn" mnemonicParsing="false" styleClass="cardBtn" text="add to cart" />
|
||||
<Label id="cardText" styleClass="cardText" text="Description: ...." />
|
||||
</children>
|
||||
</VBox>
|
||||
<!-- Card 6 -->
|
||||
<VBox id="cardDiv" prefHeight="200.0" prefWidth="100.0" styleClass="cardDiv" GridPane.columnIndex="1" GridPane.rowIndex="1">
|
||||
<children>
|
||||
<Label id="cardTitel" styleClass="cardTitel" text="Booktitel" />
|
||||
<Button id="cardBtn" mnemonicParsing="false" styleClass="cardBtn" text="add to cart" />
|
||||
<Label id="cardText" styleClass="cardText" text="Description: ...." />
|
||||
</children>
|
||||
</VBox>
|
||||
<!-- Card 7 -->
|
||||
<VBox id="cardDiv" prefHeight="200.0" prefWidth="100.0" styleClass="cardDiv" GridPane.columnIndex="2" GridPane.rowIndex="1">
|
||||
<children>
|
||||
<Label id="cardTitel" styleClass="cardTitel" text="Booktitel" />
|
||||
<Button id="cardBtn" mnemonicParsing="false" styleClass="cardBtn" text="add to cart" />
|
||||
<Label id="cardText" styleClass="cardText" text="Description: ...." />
|
||||
</children>
|
||||
</VBox>
|
||||
<!-- Card 8 -->
|
||||
<VBox id="cardDiv" prefHeight="200.0" prefWidth="100.0" styleClass="cardDiv" GridPane.columnIndex="3" GridPane.rowIndex="1">
|
||||
<children>
|
||||
<Label id="cardTitel" styleClass="cardTitel" text="Booktitel" />
|
||||
<Button id="cardBtn" mnemonicParsing="false" styleClass="cardBtn" text="add to cart" />
|
||||
<Label id="cardText" styleClass="cardText" text="Description: ...." />
|
||||
</children>
|
||||
</VBox>
|
||||
<VBox id="cardDiv" prefHeight="200.0" prefWidth="100.0" styleClass="cardDiv" GridPane.columnIndex="1">
|
||||
<children>
|
||||
<Label id="cardTitel" styleClass="cardTitel" text="Booktitel" />
|
||||
<Button id="cardBtn" mnemonicParsing="false" styleClass="cardBtn" text="add to cart" />
|
||||
<Label id="cardText" styleClass="cardText" text="Description: ...." />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</GridPane>
|
||||
</center>
|
||||
<bottom>
|
||||
<VBox id="footer" prefHeight="188.0" prefWidth="1200.0" styleClass="footer" BorderPane.alignment="CENTER">
|
||||
<children>
|
||||
<HBox id="footerLinks" alignment="TOP_CENTER" prefHeight="100.0" prefWidth="200.0">
|
||||
<children>
|
||||
<VBox id="quickLinks" alignment="TOP_LEFT" prefHeight="145.0" prefWidth="470.0" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerText" prefHeight="25.0" prefWidth="226.0" styleClass="footerHeading" text="Quick Links" />
|
||||
<Label id="footerHome" styleClass="footerText" text="Home" />
|
||||
<Label id="footerAbout" styleClass="footerText" text="About Us" />
|
||||
<Label id="footerContact" styleClass="footerText" text="Contact" />
|
||||
</children>
|
||||
</VBox>
|
||||
<VBox id="contactUs" prefHeight="145.0" prefWidth="583.0" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerHeading2" prefWidth="534.0" styleClass="footerHeading" text="Contact Us" />
|
||||
<Label id="footerEmail" styleClass="footerText" text="Email: info@example.com" />
|
||||
<Label id="footerPhone" styleClass="footerText" text="Phone: +1 123 456 7890" />
|
||||
</children>
|
||||
</VBox>
|
||||
<VBox id="followUs" alignment="TOP_RIGHT" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerHeading3" styleClass="footerHeading" text="Follow Us" />
|
||||
<Label id="footerFacebook" styleClass="footerLink" text="Facebook" />
|
||||
<Label id="footerTwitter" styleClass="footerLink" text="Twitter" />
|
||||
<Label id="footerInstagram" styleClass="footerLink" text="Instagram" />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</HBox>
|
||||
<VBox id="footerCopy" alignment="BOTTOM_CENTER" prefHeight="68.0" prefWidth="1170.0" spacing="10.0">
|
||||
<children>
|
||||
<Label id="footerCopyText" alignment="CENTER" contentDisplay="CENTER" styleClass="footerCopy" text="© 2024 My Website. All rights reserved." />
|
||||
</children>
|
||||
</VBox>
|
||||
</children>
|
||||
</VBox>
|
||||
</bottom>
|
||||
</BorderPane>
|
|
@ -0,0 +1,423 @@
|
|||
/* General Layout and Styling */
|
||||
|
||||
/* Main GridPane */
|
||||
#main {
|
||||
-fx-padding: 20;
|
||||
-fx-hgap: 20;
|
||||
-fx-vgap: 20;
|
||||
-fx-background-image: url('images/background');
|
||||
-fx-background-size: cover;
|
||||
-fx-background-position: center center;
|
||||
-fx-background-blend-mode: overlay;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.header {
|
||||
-fx-background-color: #6a1b9a;
|
||||
-fx-padding: 20px 30px;
|
||||
-fx-border-color: #8e44ad;
|
||||
-fx-border-width: 0 0 2px 0;
|
||||
-fx-alignment: center;
|
||||
-fx-box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.mainTitle {
|
||||
-fx-font-size: 26px;
|
||||
-fx-font-weight: 700;
|
||||
-fx-text-fill: #ffffff;
|
||||
-fx-padding: 0 20;
|
||||
-fx-alignment: center;
|
||||
-fx-letter-spacing: 1px;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
.footer {
|
||||
-fx-background-color: #6a1b9a;
|
||||
-fx-padding: 25px;
|
||||
-fx-alignment: center;
|
||||
-fx-box-shadow: 0px -5px 15px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.footerHeading {
|
||||
-fx-font-weight: bold;
|
||||
-fx-font-size: 18px;
|
||||
-fx-padding-bottom: 5px;
|
||||
-fx-text-fill: #ffffff;
|
||||
}
|
||||
|
||||
.footerText, .footerLink, .footerCopy {
|
||||
-fx-text-fill: #ffffff;
|
||||
}
|
||||
|
||||
.footerLink {
|
||||
-fx-font-size: 14px;
|
||||
-fx-padding: 5px 0;
|
||||
}
|
||||
|
||||
.footerLink:hover {
|
||||
-fx-text-fill: #8e44ad;
|
||||
}
|
||||
|
||||
.footerCopy {
|
||||
-fx-font-size: 12px;
|
||||
-fx-padding: 5px;
|
||||
-fx-alignment: center;
|
||||
}
|
||||
|
||||
/* Individual Cards */
|
||||
.cardDiv {
|
||||
-fx-background-color: rgba(156, 89, 182, 0.7);
|
||||
-fx-border-color: transparent;
|
||||
-fx-border-width: 0px;
|
||||
-fx-border-radius: 12px;
|
||||
-fx-background-radius: 12px;
|
||||
-fx-padding: 15;
|
||||
-fx-effect: dropshadow(gaussian, rgba(0, 0, 0, 0.1), 10, 0.5, 0, 5);
|
||||
-fx-alignment: top-center;
|
||||
-fx-background-size: cover;
|
||||
-fx-background-position: center center;
|
||||
-fx-pref-width: 250;
|
||||
-fx-pref-height: 230;
|
||||
-fx-min-width: 250;
|
||||
-fx-min-height: 230;
|
||||
}
|
||||
|
||||
.cardTitel {
|
||||
-fx-font-size: 18px;
|
||||
-fx-font-weight: 600;
|
||||
-fx-text-fill: #ffffff;
|
||||
-fx-padding: 5 0 15 0;
|
||||
-fx-alignment: center;
|
||||
}
|
||||
|
||||
.cardText {
|
||||
-fx-text-fill: #ffffff;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
|
||||
/* Card Button */
|
||||
.cardBtn {
|
||||
-fx-font-size: 14px;
|
||||
-fx-background-color: #8e44ad;
|
||||
-fx-text-fill: #ffffff;
|
||||
-fx-background-radius: 20px;
|
||||
-fx-padding: 8px 16px;
|
||||
-fx-border-color: transparent;
|
||||
-fx-border-width: 0px;
|
||||
-fx-cursor: hand;
|
||||
-fx-transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.cardBtn:hover {
|
||||
-fx-background-color: #732d91;
|
||||
}
|
||||
|
||||
/* Header Buttons */
|
||||
.cartBtn, .loginBtn {
|
||||
-fx-font-size: 14px;
|
||||
-fx-background-color: #8e44ad;
|
||||
-fx-text-fill: #ffffff;
|
||||
-fx-background-radius: 20px;
|
||||
-fx-padding: 8px 16px;
|
||||
-fx-border-color: transparent;
|
||||
-fx-border-width: 0px;
|
||||
-fx-transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.cartBtn:hover, .loginBtn:hover {
|
||||
-fx-background-color: #732d91;
|
||||
}
|
||||
|
||||
/* Form Buttons */
|
||||
.btnCreateAccount, .btnLogin, .btnCheckOut {
|
||||
-fx-font-size: 14px;
|
||||
-fx-background-color: #8e44ad;
|
||||
-fx-text-fill: #ffffff;
|
||||
-fx-background-radius: 20px;
|
||||
-fx-padding: 8px 20px;
|
||||
-fx-border-color: transparent;
|
||||
-fx-border-width: 0px;
|
||||
-fx-cursor: hand;
|
||||
-fx-transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
.btnCreateAccount:hover, .btnLogin:hover, .btnCheckOut:hover {
|
||||
-fx-background-color: #732d91;
|
||||
}
|
||||
|
||||
/* Specific Button - Checkout */
|
||||
#btnCheckOut {
|
||||
-fx-font-size: 16px;
|
||||
-fx-background-color: #8e44ad;
|
||||
-fx-text-fill: #ffffff;
|
||||
-fx-background-radius: 20px;
|
||||
-fx-padding: 10px 20px;
|
||||
-fx-border-color: transparent;
|
||||
-fx-border-width: 0px;
|
||||
-fx-cursor: hand;
|
||||
-fx-transition: background-color 0.3s ease;
|
||||
}
|
||||
|
||||
#btnCheckOut:hover {
|
||||
-fx-background-color: #732d91;
|
||||
}
|
||||
|
||||
/* Forms */
|
||||
.formTitle, .cartTitle {
|
||||
-fx-font-size: 26px;
|
||||
-fx-font-weight: 700;
|
||||
-fx-text-fill: #6a1b9a;
|
||||
-fx-alignment: center;
|
||||
-fx-padding: 10 0 20 0;
|
||||
}
|
||||
|
||||
.cartTitle{
|
||||
-fx-text-fill: #ffffff;
|
||||
}
|
||||
|
||||
.formFields {
|
||||
-fx-margin: 5 0 0 0;
|
||||
-fx-padding: 5 0 0 0;
|
||||
}
|
||||
|
||||
.formLabel {
|
||||
-fx-font-size: 14px;
|
||||
-fx-text-fill: #ffffff;
|
||||
-fx-padding: 3 0 5 0;
|
||||
}
|
||||
|
||||
.formInput {
|
||||
-fx-padding: 1px;
|
||||
-fx-font-size: 14px;
|
||||
-fx-background-color: #f4f4f4;
|
||||
-fx-border-color: #cccccc;
|
||||
-fx-border-radius: 8px;
|
||||
-fx-pref-width: 220px;
|
||||
-fx-transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.formInput:focus {
|
||||
-fx-border-color: #8e44ad;
|
||||
}
|
||||
|
||||
/* List Views */
|
||||
.cartList {
|
||||
-fx-background-color: rgba(156, 89, 182, 0.7);
|
||||
}
|
||||
.paypal {
|
||||
-fx-background-image: url('icons/paypal.png');
|
||||
-fx-background-size: contain; /* Ensures the whole image is shown */
|
||||
-fx-background-repeat: no-repeat; /* Prevents the image from repeating */
|
||||
-fx-background-position: center; /* Centers the image */
|
||||
-fx-min-width: 100px;
|
||||
-fx-min-height: 100px; /* Ensures consistent height for the element */
|
||||
}
|
||||
|
||||
.bill {
|
||||
-fx-background-image: url('icons/bill.png');
|
||||
-fx-background-size: contain;
|
||||
-fx-background-repeat: no-repeat;
|
||||
-fx-background-position: center;
|
||||
-fx-min-width: 100px;
|
||||
-fx-min-height: 100px;
|
||||
}
|
||||
|
||||
.creditCard {
|
||||
-fx-background-image: url('icons/credit.png');
|
||||
-fx-background-size: contain;
|
||||
-fx-background-repeat: no-repeat;
|
||||
-fx-background-position: center;
|
||||
-fx-min-width: 100px;
|
||||
-fx-min-height: 100px;
|
||||
}
|
||||
|
||||
/* Table Styling */
|
||||
.table-view {
|
||||
-fx-background-color: rgba(156, 89, 182, 0.7); /* Background color with transparency */
|
||||
-fx-border-color: #8e44ad; /* Border color */
|
||||
-fx-border-width: 2px; /* Border thickness */
|
||||
-fx-padding: 10px;
|
||||
-fx-alignment: center;
|
||||
-fx-font-size: 14px; /* Font size for text */
|
||||
-fx-font-weight: normal; /* Normal font weight */
|
||||
-fx-text-fill: #ffffff; /* White text */
|
||||
}
|
||||
|
||||
/* Table Header */
|
||||
.table-view .column-header-background {
|
||||
-fx-background-color: #8e44ad; /* Header background */
|
||||
-fx-text-fill: white; /* Header text color */
|
||||
}
|
||||
|
||||
/* Table Column Styling */
|
||||
.table-view .table-column {
|
||||
-fx-alignment: center-left; /* Align text to the left */
|
||||
-fx-padding: 8px 16px; /* Padding for columns */
|
||||
-fx-font-size: 14px; /* Font size for column headers */
|
||||
-fx-text-fill: #ffffff; /* White text */
|
||||
}
|
||||
|
||||
/* Table Cell Styling */
|
||||
.table-view .table-cell {
|
||||
-fx-background-color: transparent; /* Transparent background for cells */
|
||||
-fx-border-color: transparent; /* No border for cells */
|
||||
-fx-padding: 5px 10px; /* Padding for each cell */
|
||||
}
|
||||
|
||||
/* Row Styling */
|
||||
.table-view .table-row-cell {
|
||||
-fx-background-color: rgba(156, 89, 182, 0.3); /* Semi-transparent row background */
|
||||
-fx-border-color: transparent; /* No border for rows */
|
||||
}
|
||||
|
||||
.table-view .table-row-cell:hover {
|
||||
-fx-background-color: rgba(156, 89, 182, 0.6); /* Darker row color on hover */
|
||||
}
|
||||
|
||||
/* Table Scroll Bar */
|
||||
.table-view .scroll-bar {
|
||||
-fx-background-color: #8e44ad; /* Scroll bar background color */
|
||||
}
|
||||
|
||||
/* Media Queries - Responsive Design */
|
||||
|
||||
/* For screens up to 1200px (large tablets and smaller desktops) */
|
||||
@media screen and (max-width: 1200px) {
|
||||
#main {
|
||||
-fx-hgap: 15;
|
||||
-fx-vgap: 15;
|
||||
}
|
||||
|
||||
.cardDiv {
|
||||
-fx-pref-width: 45%;
|
||||
-fx-min-width: 45%;
|
||||
-fx-pref-height: 220;
|
||||
-fx-min-height: 220;
|
||||
}
|
||||
|
||||
.mainTitle {
|
||||
-fx-font-size: 24px;
|
||||
}
|
||||
|
||||
.footerCopy {
|
||||
-fx-font-size: 12px;
|
||||
}
|
||||
|
||||
.cartBtn, .loginBtn {
|
||||
-fx-font-size: 13px;
|
||||
-fx-padding: 7px 14px;
|
||||
}
|
||||
}
|
||||
|
||||
/* For screens up to 1024px (tablets and medium-sized devices) */
|
||||
@media screen and (max-width: 1024px) {
|
||||
#main {
|
||||
-fx-hgap: 15;
|
||||
-fx-vgap: 15;
|
||||
}
|
||||
|
||||
.cardDiv {
|
||||
-fx-pref-width: 48%;
|
||||
-fx-min-width: 48%;
|
||||
-fx-pref-height: 210;
|
||||
-fx-min-height: 210;
|
||||
}
|
||||
|
||||
.mainTitle {
|
||||
-fx-font-size: 24px;
|
||||
}
|
||||
|
||||
.footerCopy {
|
||||
-fx-font-size: 12px;
|
||||
}
|
||||
|
||||
.cartBtn, .loginBtn {
|
||||
-fx-font-size: 14px;
|
||||
-fx-padding: 8px 15px;
|
||||
}
|
||||
}
|
||||
|
||||
/* For screens up to 768px (mobile devices and small tablets) */
|
||||
@media screen and (max-width: 768px) {
|
||||
#main {
|
||||
-fx-hgap: 10;
|
||||
-fx-vgap: 10;
|
||||
}
|
||||
|
||||
.cardDiv {
|
||||
-fx-pref-width: 100%;
|
||||
-fx-min-width: 100%;
|
||||
-fx-pref-height: 180;
|
||||
-fx-min-height: 180;
|
||||
}
|
||||
|
||||
.cardTitel {
|
||||
-fx-font-size: 16px;
|
||||
}
|
||||
|
||||
.cardText {
|
||||
-fx-font-size: 12px;
|
||||
}
|
||||
|
||||
.mainTitle {
|
||||
-fx-font-size: 22px;
|
||||
}
|
||||
|
||||
.footerCopy {
|
||||
-fx-font-size: 10px;
|
||||
}
|
||||
|
||||
.cartBtn, .loginBtn {
|
||||
-fx-font-size: 12px;
|
||||
-fx-padding: 6px 12px;
|
||||
}
|
||||
}
|
||||
|
||||
/* For screens up to 480px (very small screens like smartphones in portrait mode) */
|
||||
@media screen and (max-width: 480px) {
|
||||
#main {
|
||||
-fx-hgap: 5;
|
||||
-fx-vgap: 5;
|
||||
}
|
||||
|
||||
.cardDiv {
|
||||
-fx-pref-width: 100%;
|
||||
-fx-min-width: 100%;
|
||||
-fx-pref-height: 150;
|
||||
-fx-min-height: 150;
|
||||
}
|
||||
|
||||
.cardTitel {
|
||||
-fx-font-size: 14px;
|
||||
}
|
||||
|
||||
.cardText {
|
||||
-fx-font-size: 10px;
|
||||
}
|
||||
|
||||
.mainTitle {
|
||||
-fx-font-size: 18px;
|
||||
}
|
||||
|
||||
.footerCopy {
|
||||
-fx-font-size: 8px;
|
||||
}
|
||||
|
||||
.cartBtn, .loginBtn {
|
||||
-fx-font-size: 12px;
|
||||
-fx-padding: 5px 10px;
|
||||
}
|
||||
|
||||
.formTitle, .cartTitle {
|
||||
-fx-font-size: 20px;
|
||||
}
|
||||
|
||||
.formInput {
|
||||
-fx-pref-width: 200px;
|
||||
}
|
||||
|
||||
.footerHeading {
|
||||
-fx-font-size: 16px;
|
||||
}
|
||||
}
|