Repository navigation
Expand file tree
/
Copy pathSearchingView.fxml
More file actions
84 lines (76 loc) · 4.08 KB
/
Copy pathSearchingView.fxml
File metadata and controls
84 lines (76 loc) · 4.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import org.kordamp.ikonli.javafx.FontIcon?>
<BorderPane xmlns="http://javafx.com/javafx/24.0.2" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="com.simulator.SearchingController" styleClass="algorithm-page, main-layout">
<top>
<HBox alignment="CENTER_LEFT" spacing="15.0" styleClass="module-header">
<padding>
<Insets bottom="15.0" left="20.0" right="20.0" top="15.0" />
</padding>
<Button onAction="#goBack" styleClass="nav-button">
<graphic>
<FontIcon iconLiteral="fas-arrow-left" iconSize="16" />
</graphic>
</Button>
<FontIcon iconLiteral="fas-search" iconSize="24" styleClass="header-icon" />
<Label styleClass="module-title" text="Search Algorithms - Linear & Binary Search" />
</HBox>
</top>
<center>
<VBox spacing="20.0">
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
</padding>
<!-- Control Section -->
<HBox spacing="20.0" styleClass="control-panel">
<padding>
<Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
</padding>
<VBox spacing="10.0" prefWidth="200">
<Label text="Algorithm:" />
<ComboBox fx:id="algorithmComboBox" prefWidth="180" />
</VBox>
<VBox spacing="10.0" prefWidth="200">
<Label text="Search Value:" />
<TextField fx:id="searchValueField" prefWidth="180" />
</VBox>
<VBox spacing="10.0" prefWidth="300">
<Label text="Array Input:" />
<TextField fx:id="arrayInputField" prefWidth="280" />
</VBox>
<VBox spacing="10.0">
<Label text="Actions:" />
<HBox spacing="10.0">
<Button fx:id="generateArrayButton" onAction="#generateRandomArray" styleClass="generate-button" text="Generate" />
<Button fx:id="searchButton" onAction="#performSearch" styleClass="play-button" text="Search" />
<Button fx:id="resetButton" onAction="#resetSearch" styleClass="reset-button" text="Reset" />
</HBox>
</VBox>
</HBox>
<!-- Visualization Area - UPDATED WITH ARRAY-ELEMENT STYLING -->
<VBox spacing="15.0" styleClass="visualization-pane" VBox.vgrow="ALWAYS">
<Label styleClass="viz-title" text="🔍 Array Search Visualization" />
<!-- Array Display - STYLED TO MATCH ARRAY OPERATIONS -->
<ScrollPane fitToHeight="true" prefHeight="100">
<HBox fx:id="arrayVisualization" spacing="5" alignment="CENTER"
styleClass="array-display" />
</ScrollPane>
<!-- Progress and Results -->
<VBox spacing="10.0">
<ProgressBar fx:id="searchProgress" prefWidth="600" />
<Label fx:id="resultLabel" text="Enter a value and click Search to begin" styleClass="info-text" />
<HBox spacing="30.0" alignment="CENTER_LEFT">
<Label fx:id="comparisonsLabel" text="Comparisons: 0" styleClass="stat-label" />
<Label fx:id="timeLabel" text="Time: 0ms" styleClass="stat-label" />
<Label fx:id="statusLabel" text="Ready to search" styleClass="status-text" />
</HBox>
</VBox>
<!-- Algorithm Information -->
<TextArea fx:id="algorithmInfo" prefHeight="200" styleClass="info-area" VBox.vgrow="ALWAYS" />
</VBox>
</VBox>
</center>
</BorderPane>