@ -0,0 +1,20 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="jar" name="MathQuizApp:jar">
|
||||
<output-path>$PROJECT_DIR$/out/artifacts/MathQuizApp_jar</output-path>
|
||||
<root id="archive" name="MathQuizApp.jar">
|
||||
<element id="directory" name="META-INF">
|
||||
<element id="file-copy" path="$PROJECT_DIR$/META-INF/MANIFEST.MF" />
|
||||
</element>
|
||||
<element id="module-output" name="MathQuizApp" />
|
||||
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/com/google/code/gson/gson/2.10.1/gson-2.10.1.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/openjfx/javafx-base/21.0.2/javafx-base-21.0.2-win.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/21.0.2/javafx-fxml-21.0.2-win.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/21.0.2/javafx-graphics-21.0.2.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/21.0.2/javafx-controls-21.0.2-win.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/openjfx/javafx-base/21.0.2/javafx-base-21.0.2.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/openjfx/javafx-controls/21.0.2/javafx-controls-21.0.2.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/openjfx/javafx-fxml/21.0.2/javafx-fxml-21.0.2.jar" path-in-jar="/" />
|
||||
<element id="extracted-dir" path="$MAVEN_REPOSITORY$/org/openjfx/javafx-graphics/21.0.2/javafx-graphics-21.0.2-win.jar" path-in-jar="/" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Palette2">
|
||||
<group name="Swing">
|
||||
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
|
||||
</item>
|
||||
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
|
||||
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
|
||||
<initial-values>
|
||||
<property name="text" value="Button" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="RadioButton" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="CheckBox" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
|
||||
<initial-values>
|
||||
<property name="text" value="Label" />
|
||||
</initial-values>
|
||||
</item>
|
||||
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
|
||||
<preferred-size width="150" height="-1" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
|
||||
<preferred-size width="150" height="50" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
|
||||
<preferred-size width="200" height="200" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
|
||||
</item>
|
||||
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
|
||||
<preferred-size width="-1" height="20" />
|
||||
</default-constraints>
|
||||
</item>
|
||||
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
|
||||
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
|
||||
</item>
|
||||
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
|
||||
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
|
||||
</item>
|
||||
</group>
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,195 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ArtifactsWorkspaceSettings">
|
||||
<artifacts-to-build>
|
||||
<artifact name="MathQuizApp:jar" />
|
||||
</artifacts-to-build>
|
||||
</component>
|
||||
<component name="AutoImportSettings">
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="ad9e49ad-e421-455c-8a89-0f35a7a15146" name="Changes" comment="partial ui implication">
|
||||
<change afterPath="$PROJECT_DIR$/.idea/artifacts/MathQuizApp_jar.xml" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/META-INF/MANIFEST.MF" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/data/users.json" beforeDir="false" afterPath="$PROJECT_DIR$/data/users.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/pom.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/Test.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/Test.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/model/Grade.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/model/Grade.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/model/QuizResult.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/model/QuizResult.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/service/UserService.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/service/UserService.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/ui/MainWindow.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/ui/MainWindow.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/ui/QuizPage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/ui/QuizPage.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/ui/ResultPage.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/ui/ResultPage.java" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/src/test/java/TestMain.java" beforeDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="FileTemplateManagerImpl">
|
||||
<option name="RECENT_TEMPLATES">
|
||||
<list>
|
||||
<option value="Kotlin Class" />
|
||||
<option value="Class" />
|
||||
<option value="JavaFXApplication" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="KubernetesApiPersistence">{}</component>
|
||||
<component name="KubernetesApiProvider">{
|
||||
"isMigrated": true
|
||||
}</component>
|
||||
<component name="MavenImportPreferences">
|
||||
<option name="generalSettings">
|
||||
<MavenGeneralSettings>
|
||||
<option name="localRepository" value="C:\Users\28032\.m2\repository" />
|
||||
<option name="userSettingsFile" value="C:\Users\28032\.m2\settings.xml" />
|
||||
</MavenGeneralSettings>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProblemsViewState">
|
||||
<option name="selectedTabId" value="CurrentFile" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo">{
|
||||
"customColor": "",
|
||||
"associatedIndex": 1
|
||||
}</component>
|
||||
<component name="ProjectId" id="33aD4Tx1DVbp880Km6dEp5mEUbo" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"Application.Test.executor": "Run",
|
||||
"Application.TestMain.executor": "Run",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||
"git-widget-placeholder": "LiangJunYaoBranch",
|
||||
"kotlin-language-version-configured": "true",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
"node.js.selected.package.eslint": "(autodetect)",
|
||||
"node.js.selected.package.tslint": "(autodetect)",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"project.structure.last.edited": "Artifacts",
|
||||
"project.structure.proportion": "0.0",
|
||||
"project.structure.side.proportion": "0.0",
|
||||
"settings.editor.selected.configurable": "MavenSettings",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="C:\Users\28032\OneDrive\Desktop\PAIR\.idea" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RunManager" selected="Application.Test">
|
||||
<configuration name="Test" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="com.Test" />
|
||||
<module name="MathQuizApp" />
|
||||
<extension name="coverage">
|
||||
<pattern>
|
||||
<option name="PATTERN" value="com.*" />
|
||||
<option name="ENABLED" value="true" />
|
||||
</pattern>
|
||||
</extension>
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<configuration name="TestMain" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
|
||||
<option name="MAIN_CLASS_NAME" value="TestMain" />
|
||||
<module name="MathQuizApp" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
<recent_temporary>
|
||||
<list>
|
||||
<item itemvalue="Application.Test" />
|
||||
<item itemvalue="Application.TestMain" />
|
||||
</list>
|
||||
</recent_temporary>
|
||||
</component>
|
||||
<component name="SharedIndexes">
|
||||
<attachedChunks>
|
||||
<set>
|
||||
<option value="bundled-jdk-9823dce3aa75-fdfe4dae3a2d-intellij.indexing.shared.core-IU-243.21565.193" />
|
||||
<option value="bundled-js-predefined-d6986cc7102b-e768b9ed790e-JavaScript-IU-243.21565.193" />
|
||||
</set>
|
||||
</attachedChunks>
|
||||
</component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="ad9e49ad-e421-455c-8a89-0f35a7a15146" name="Changes" comment="" />
|
||||
<created>1759546098925</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1759546098925</updated>
|
||||
<workItem from="1759546100740" duration="23850000" />
|
||||
<workItem from="1759587998528" duration="511000" />
|
||||
<workItem from="1759588522412" duration="122000" />
|
||||
<workItem from="1759644297457" duration="32827000" />
|
||||
<workItem from="1759720493898" duration="12215000" />
|
||||
<workItem from="1759745765663" duration="2792000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="ui design v1">
|
||||
<option name="closed" value="true" />
|
||||
<created>1759588559366</created>
|
||||
<option name="number" value="00001" />
|
||||
<option name="presentableId" value="LOCAL-00001" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1759588559366</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00002" summary="partial ui implication">
|
||||
<option name="closed" value="true" />
|
||||
<created>1759684484435</created>
|
||||
<option name="number" value="00002" />
|
||||
<option name="presentableId" value="LOCAL-00002" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1759684484435</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="3" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
<component name="Vcs.Log.Tabs.Properties">
|
||||
<option name="TAB_STATES">
|
||||
<map>
|
||||
<entry key="MAIN">
|
||||
<value>
|
||||
<State>
|
||||
<option name="FILTERS">
|
||||
<map>
|
||||
<entry key="branch">
|
||||
<value>
|
||||
<list>
|
||||
<option value="LiangJunYaoBranch" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</State>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<MESSAGE value="ui design v1" />
|
||||
<MESSAGE value="partial ui implication" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="partial ui implication" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
Main-Class: com.Test
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
# 注册码记录文件
|
||||
# 格式: 邮箱|注册码|过期时间戳|过期时间
|
||||
|
||||
test002@example.com|4R8uZYiQ|1759552847711|2025-10-04 12:40:47
|
||||
@ -0,0 +1,24 @@
|
||||
// src/main/java/com/Main.java
|
||||
package com;
|
||||
|
||||
import com.ui.MainWindow;
|
||||
import javafx.application.Application;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.stage.Stage;
|
||||
|
||||
public class Test extends Application {
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) {
|
||||
MainWindow mainWindow = new MainWindow(primaryStage);
|
||||
Scene scene = new Scene(mainWindow, 1366, 786);
|
||||
primaryStage.setTitle("中小学数学答题系统");
|
||||
primaryStage.setScene(scene);
|
||||
primaryStage.setResizable(true);
|
||||
primaryStage.show();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
launch(args);
|
||||
}
|
||||
}
|
||||
@ -1,9 +1,29 @@
|
||||
package com.model;
|
||||
|
||||
|
||||
//学段
|
||||
public enum Grade {
|
||||
ELEMENTARY, // 小学
|
||||
MIDDLE, // 初中
|
||||
HIGH // 高中
|
||||
}
|
||||
// 枚举常量,初始化时传入对应的中文描述
|
||||
ELEMENTARY("小学"),
|
||||
MIDDLE("初中"),
|
||||
HIGH("高中");
|
||||
|
||||
private final String chineseName;
|
||||
|
||||
Grade(String chineseName) {
|
||||
this.chineseName = chineseName;
|
||||
}
|
||||
|
||||
public String getChineseName() {
|
||||
return chineseName;
|
||||
}
|
||||
|
||||
public static Grade valueOfChinese(String chineseName) {
|
||||
// 遍历所有枚举常量,匹配中文描述
|
||||
for (Grade grade : Grade.values()) {
|
||||
if (grade.chineseName.equals(chineseName)) {
|
||||
return grade;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException("不存在对应的年级:" + chineseName);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,44 +0,0 @@
|
||||
package com.mathquiz.ui;
|
||||
|
||||
import com.mathquiz.model.User;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.layout.VBox;
|
||||
|
||||
public class LoginPanel extends VBox {
|
||||
|
||||
private final TextField emailField = new TextField();
|
||||
private final PasswordField pwdField = new PasswordField();
|
||||
|
||||
public LoginPanel(MainWindow mainWindow) {
|
||||
setPadding(new Insets(20));
|
||||
setSpacing(10);
|
||||
|
||||
getChildren().addAll(
|
||||
new Label("登录"),
|
||||
new Label("邮箱:"),
|
||||
emailField,
|
||||
new Label("密码:"),
|
||||
pwdField,
|
||||
new Button("登录") {{
|
||||
setOnAction(e -> loginAction(mainWindow));
|
||||
}},
|
||||
new Hyperlink("没有账号?去注册") {{
|
||||
setOnAction(e -> mainWindow.showRegisterPanel());
|
||||
}}
|
||||
);
|
||||
}
|
||||
|
||||
private void loginAction(MainWindow mainWindow) {
|
||||
String email = emailField.getText().trim();
|
||||
String password = pwdField.getText();
|
||||
|
||||
User user = mainWindow.getUserService().login(email, password);
|
||||
if (user != null) {
|
||||
mainWindow.setCurrentUser(user);
|
||||
mainWindow.showGradeSelectPanel();
|
||||
} else {
|
||||
new Alert(Alert.AlertType.ERROR, "邮箱或密码错误").showAndWait();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
// com/ui/NavigablePanel.java
|
||||
package com.ui;
|
||||
|
||||
import javafx.application.Platform;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.control.Alert;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.BorderPane;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.text.Font;
|
||||
|
||||
public abstract class NavigablePanel extends BorderPane {
|
||||
|
||||
|
||||
public NavigablePanel(Runnable onBack) {
|
||||
Button backButton = new Button("←");
|
||||
backButton.setOnAction(e -> onBack.run());
|
||||
backButton.setPrefSize(UIConstants.BACK_BUTTON_WIDTH, UIConstants.BACK_BUTTON_HEIGHT);
|
||||
backButton.setFont(Font.font(UIConstants.FONT_FAMILY, UIConstants.BUTTON_FONT_SIZE));
|
||||
backButton.setStyle(
|
||||
"-fx-background-radius: 50; " +
|
||||
"-fx-background-color: " + UIConstants.COLOR_ACCENT + "; " +
|
||||
"-fx-text-fill: white; " +
|
||||
"-fx-font-weight: bold;"
|
||||
);
|
||||
|
||||
HBox topBar = new HBox(10);
|
||||
topBar.setPadding(UIConstants.TOP_BAR_PADDING);
|
||||
topBar.setAlignment(Pos.CENTER_LEFT);
|
||||
topBar.getChildren().add(backButton);
|
||||
|
||||
this.setTop(topBar);
|
||||
}
|
||||
|
||||
protected static void showErrorAlert(String title, String message) {
|
||||
Platform.runLater(() -> {
|
||||
Alert alert = new Alert(Alert.AlertType.ERROR);
|
||||
alert.setTitle(title);
|
||||
alert.setHeaderText(null);
|
||||
alert.setContentText(message);
|
||||
alert.showAndWait();
|
||||
});
|
||||
}
|
||||
|
||||
// 子类构造函数中调用
|
||||
protected final void initializeContent() {
|
||||
buildContent();
|
||||
}
|
||||
protected abstract void buildContent();
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package com.ui;
|
||||
|
||||
public enum Panel {
|
||||
START, // 开始页面
|
||||
LOGIN, // 登录页面
|
||||
REGISTER, // 注册页面
|
||||
INF_GEN, // 个人信息+生成题目页面
|
||||
PASSWORDMODIFY, // 修改密码页面
|
||||
QUIZ, // 答题页面
|
||||
RESULT // 得分页面
|
||||
}
|
||||
@ -1,67 +0,0 @@
|
||||
package com.mathquiz.ui;
|
||||
|
||||
import com.mathquiz.model.ChoiceQuestion;
|
||||
import com.mathquiz.service.QuizService;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.control.*;
|
||||
import javafx.scene.layout.VBox;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class QuizPanel extends VBox {
|
||||
|
||||
private final List<ChoiceQuestion> questions;
|
||||
private final List<String> userAnswers = new ArrayList<>();
|
||||
private final QuizService quizService;
|
||||
private final MainWindow mainWindow;
|
||||
private int currentIndex = 0;
|
||||
|
||||
public QuizPanel(MainWindow mainWindow, List<ChoiceQuestion> questions, QuizService quizService) {
|
||||
this.mainWindow = mainWindow;
|
||||
this.questions = questions;
|
||||
this.quizService = quizService;
|
||||
setPadding(new Insets(20));
|
||||
showQuestion(currentIndex);
|
||||
}
|
||||
|
||||
private void showQuestion(int index) {
|
||||
getChildren().clear();
|
||||
ChoiceQuestion q = questions.get(index);
|
||||
|
||||
getChildren().add(new Label("第 " + (index + 1) + " 题 / " + questions.size()));
|
||||
getChildren().add(new Label(q.getQuestionContent()));
|
||||
|
||||
ToggleGroup group = new ToggleGroup();
|
||||
for (int i = 0; i < 4; i++) {
|
||||
RadioButton rb = new RadioButton(
|
||||
(char)('A' + i) + ". " + q.getOptions().get(i)
|
||||
);
|
||||
rb.setToggleGroup(group);
|
||||
getChildren().add(rb);
|
||||
}
|
||||
|
||||
Button submitBtn = new Button("提交");
|
||||
submitBtn.setOnAction(e -> {
|
||||
RadioButton selected = (RadioButton) group.getSelectedToggle();
|
||||
if (selected != null) {
|
||||
String answer = selected.getText().substring(0, 1); // "A"
|
||||
userAnswers.add(answer);
|
||||
|
||||
if (index + 1 < questions.size()) {
|
||||
showQuestion(index + 1);
|
||||
} else {
|
||||
int score = quizService.calculateScore(questions, userAnswers);
|
||||
Runnable onContinue = () -> {
|
||||
quizService.savePaper(mainWindow.getCurrentUser().getEmail(), questions);
|
||||
};
|
||||
mainWindow.showResultPanel(score, onContinue);
|
||||
}
|
||||
} else {
|
||||
new Alert(Alert.AlertType.WARNING, "请选择一个选项").showAndWait();
|
||||
}
|
||||
});
|
||||
|
||||
getChildren().add(submitBtn);
|
||||
}
|
||||
}
|
||||
@ -1,32 +0,0 @@
|
||||
package com.mathquiz.ui;
|
||||
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.control.Alert;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.VBox;
|
||||
|
||||
public class ResultPanel extends VBox {
|
||||
|
||||
public ResultPanel(MainWindow mainWindow, int score, Runnable onContinue) {
|
||||
setPadding(new Insets(20));
|
||||
setSpacing(20);
|
||||
|
||||
getChildren().addAll(
|
||||
new Label("答题结束!"),
|
||||
new Label("您的得分: " + score + " 分"),
|
||||
new Button("继续做题") {{
|
||||
setOnAction(e -> {
|
||||
onContinue.run(); // 保存试卷
|
||||
mainWindow.showGradeSelectPanel();
|
||||
});
|
||||
}},
|
||||
new Button("退出") {{
|
||||
setOnAction(e -> {
|
||||
mainWindow.setCurrentUser(null);
|
||||
mainWindow.showLoginPanel();
|
||||
});
|
||||
}}
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,37 @@
|
||||
// com/ui/StartPage.java
|
||||
package com.ui;
|
||||
|
||||
import javafx.geometry.Pos;
|
||||
import javafx.scene.control.Button;
|
||||
import javafx.scene.control.Label;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javafx.scene.text.Font;
|
||||
import javafx.scene.text.FontWeight;
|
||||
|
||||
public class StartPage extends VBox {
|
||||
|
||||
private final Button startButton;
|
||||
|
||||
public StartPage(Runnable onStart) {
|
||||
this.setAlignment(Pos.CENTER);
|
||||
this.setSpacing(UIConstants.DEFAULT_SPACING);
|
||||
this.setPadding(UIConstants.DEFAULT_PADDING);
|
||||
|
||||
Label titleLabel = new Label("中小学数学答题系统");
|
||||
titleLabel.setFont(Font.font(UIConstants.FONT_FAMILY, FontWeight.BOLD, UIConstants.TITLE_FONT_SIZE));
|
||||
|
||||
Label subtitleLabel = new Label("HNU@梁峻耀 吴佰轩");
|
||||
subtitleLabel.setFont(Font.font(UIConstants.FONT_FAMILY, UIConstants.SUBTITLE_FONT_SIZE));
|
||||
subtitleLabel.setStyle("-fx-text-fill: gray;");
|
||||
|
||||
startButton = new Button("开始");
|
||||
startButton.setPrefSize(UIConstants.BUTTON_WIDTH, UIConstants.BUTTON_HEIGHT);
|
||||
startButton.setFont(Font.font(UIConstants.FONT_FAMILY, UIConstants.BUTTON_FONT_SIZE));
|
||||
startButton.setOnAction(e -> onStart.run());
|
||||
startButton.setStyle(UIConstants.BUTTON_STYLE);
|
||||
startButton.setOnMouseEntered(e -> startButton.setStyle(UIConstants.BUTTON_STYLE + UIConstants.BUTTON_HOVER_STYLE));
|
||||
startButton.setOnMouseExited(e -> startButton.setStyle(UIConstants.BUTTON_STYLE));
|
||||
|
||||
this.getChildren().addAll(titleLabel, subtitleLabel, startButton);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,70 @@
|
||||
// UIConstants.java
|
||||
package com.ui;
|
||||
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.paint.Color;
|
||||
|
||||
public final class UIConstants {
|
||||
private UIConstants() {}
|
||||
|
||||
public static final double LABEL_ITEM_TITLE_SIZE = 16.0;
|
||||
|
||||
// 间距与边距
|
||||
public static final double DEFAULT_SPACING = 15.0;
|
||||
public static final Insets DEFAULT_PADDING = new Insets(40);
|
||||
public static final Insets SMALL_PADDING = new Insets(20);
|
||||
public static final Insets TOP_BAR_PADDING = new Insets(10);
|
||||
|
||||
// 字体
|
||||
public static final String FONT_FAMILY = "Microsoft YaHei";
|
||||
public static final double TITLE_FONT_SIZE = 26.0;
|
||||
public static final double SUBTITLE_FONT_SIZE = 16.0;
|
||||
public static final double BUTTON_FONT_SIZE = 15.0;
|
||||
public static final double LABEL_FONT_SIZE = 14.0;
|
||||
public static final double INPUT_FONT_SIZE = 14.0;
|
||||
public static final double HINT_FONT_SIZE = 12.0;
|
||||
public static final double ERROR_FONT_SIZE = 12.0;
|
||||
public static final double QUIZ_TITLE_FONT_SIZE = 20.0;
|
||||
public static final double SCORE_FONT_SIZE = 32.0;
|
||||
|
||||
// 按钮尺寸
|
||||
public static final double BUTTON_WIDTH = 140.0;
|
||||
public static final double BUTTON_HEIGHT = 40.0;
|
||||
public static final double BACK_BUTTON_WIDTH = 80.0;
|
||||
public static final double BACK_BUTTON_HEIGHT = 30.0;
|
||||
|
||||
// 颜色
|
||||
public static final String COLOR_PRIMARY = "#2c3e50";
|
||||
public static final String COLOR_ACCENT = "#3498db";
|
||||
public static final String COLOR_ERROR = "#e74c3c";
|
||||
public static final String COLOR_HINT = "#7f8c8d";
|
||||
public static final String COLOR_BACKGROUND = "#ecf0f1";
|
||||
|
||||
// 按钮样式
|
||||
public static final String BUTTON_STYLE =
|
||||
"-fx-background-color: " + COLOR_ACCENT + "; " +
|
||||
"-fx-text-fill: white; " +
|
||||
"-fx-background-radius: 8; " +
|
||||
"-fx-font-size: " + BUTTON_FONT_SIZE + "px; " +
|
||||
"-fx-font-family: '" + FONT_FAMILY + "'; " +
|
||||
"-fx-cursor: hand;";
|
||||
|
||||
public static final String BUTTON_HOVER_STYLE =
|
||||
"-fx-background-color: #2980b9;";
|
||||
|
||||
// 输入框样式
|
||||
public static final String INPUT_STYLE =
|
||||
"-fx-background-radius: 8; " +
|
||||
"-fx-border-radius: 8; " +
|
||||
"-fx-border-color: #bdc3c7; " +
|
||||
"-fx-padding: 8; " +
|
||||
"-fx-font-size: " + INPUT_FONT_SIZE + "px; " +
|
||||
"-fx-font-family: '" + FONT_FAMILY + "';";
|
||||
|
||||
// 表单容器样式
|
||||
public static final String FORM_STYLE =
|
||||
"-fx-background-color: white; " +
|
||||
"-fx-background-radius: 12; " +
|
||||
"-fx-border-radius: 12; " +
|
||||
"-fx-effect: dropshadow(gaussian, rgba(0,0,0,0.1), 10, 0, 0, 5);";
|
||||
}
|
||||
Loading…
Reference in new issue