資源簡介
用javafx瞎搞了一個界面,根據學院祖傳作業的特色,你們可能會用到吧233,下載了別另外上傳啊。

代碼片段和文件信息
package?app;
import?java.io.IOException;
import?java.util.ArrayList;
import?app.model.Place;
import?app.util.DataUtil;
import?app.view.AdminCheckController;
import?app.view.AdminMenuController;
import?app.view.GuestMenuController;
import?app.view.MainController;
import?app.view.PlaceDialogController;
import?javafx.application.Application;
import?javafx.collections.FXCollections;
import?javafx.collections.ObservableList;
import?javafx.fxml.FxmlLoader;
import?javafx.scene.Scene;
import?javafx.scene.image.Image;
import?javafx.scene.layout.AnchorPane;
import?javafx.stage.Modality;
import?javafx.stage.Stage;
public?class?MainApp?extends?Application?{
private?Stage?primaryStage;
private?Stage?mainStage;
private?Scene?scene;
private?ObservableList?placeData;//?table數據集合
private?ArrayList?placeArray;
public?MainApp()?{
//?初始化數據
placeArray?=?new?ArrayList();
for?(int?i?=?0;?i? placeArray.add(DataUtil.getData().getMap().get(DataUtil.getData().getArr().get(i)));
}
placeData?=?FXCollections.observableArrayList(placeArray);
}
@Override
public?void?start(Stage?primaryStage)?{
//?創建主窗口
this.primaryStage?=?primaryStage;
this.primaryStage.settitle(“景區信息查詢終端“);
this.primaryStage.setResizable(false);
this.primaryStage.getIcons().add(new?Image(“file:resources/img/icon.jpg“));
initMainPane();
}
/**
?*?初始化Main頁面
?*/
public?void?initMainPane()?{
try?{
//?加載Main頁面
FxmlLoader?loader?=?new?FxmlLoader();
loader.setLocation(MainApp.class.getResource(“view/Main.fxml“));
AnchorPane?mainPane?=?(AnchorPane)?loader.load();
MainController?controller?=?loader.getController();
controller.init(this);
//?在scene顯示
scene?=?new?Scene(mainPane);
primaryStage.setScene(scene);
primaryStage.show();
}?catch?(IOException?e)?{
e.printStackTrace();
}
}
/**
?*?進入游客模塊
?*/
public?void?entryGuest()?{
try?{
FxmlLoader?loader?=?new?FxmlLoader();
loader.setLocation(MainApp.class.getResource(“view/GuestMenu.fxml“));
AnchorPane?guestMenu?=?(AnchorPane)?loader.load();
scene?=?new?Scene(guestMenu);//?加載場景
mainStage?=?new?Stage();//?new新舞臺
mainStage.settitle(“景區信息“);
mainStage.setResizable(false);
mainStage.getIcons().add(new?Image(“file:resources/img/icon.jpg“));
mainStage.setScene(scene);
primaryStage.close();//?關閉原舞臺
mainStage.show();
GuestMenuController?controller?=?loader.getController();
controller.setMainApp(this);
}?catch?(IOException?e)?{
e.printStackTrace();
}
}
/**
?*?進入管理員模塊
?*/
public?void?entryAdmin()?{
try?{
FxmlLoader?loader?=?new?FxmlLoader();
loader.setLocation(MainApp.class.getResource(“view/AdminMenu.fxml“));
AnchorPane?adminMenu?=?(AnchorPane)?loader.load();
scene?=?new?Scene(adminMenu);
primaryStage.close();
mainStage?=?new?Stage();
mainStage.settitle(“
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????566??2019-01-21?17:47??數據結構與算法課程設計\ScenicSpotManagementSystem\.classpath
?????文件????????590??2019-01-16?22:53??數據結構與算法課程設計\ScenicSpotManagementSystem\.project
?????文件?????????61??2019-01-21?13:11??數據結構與算法課程設計\ScenicSpotManagementSystem\.settings\org.eclipse.core.resources.prefs
?????文件????????639??2019-01-16?22:53??數據結構與算法課程設計\ScenicSpotManagementSystem\.settings\org.eclipse.jdt.core.prefs
?????文件???????5983??2019-01-21?17:38??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\MainApp.class
?????文件???????1800??2019-01-21?17:38??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\model\AdjPlace.class
?????文件???????1430??2019-01-21?17:38??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\model\Car.class
?????文件????????984??2019-01-21?17:38??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\model\Graph$1.class
?????文件???????1010??2019-01-21?17:38??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\model\Graph$2.class
?????文件???????5194??2019-01-21?17:38??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\model\Graph.class
?????文件???????4083??2019-01-22?10:58??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\model\Parking.class
?????文件???????5178??2019-01-21?17:38??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\model\Place.class
?????文件????????904??2019-01-21?17:38??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\model\Tree$Node.class
?????文件???????2585??2019-01-21?17:38??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\model\Tree.class
?????文件???????8736??2019-01-22?10:42??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\util\DataUtil.class
?????文件???????3174??2019-01-21?12:39??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\view\AdminCheck.fxm
?????文件???????3884??2019-01-21?17:38??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\view\AdminCheckController.class
?????文件??????13140??2019-01-22?10:28??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\view\AdminMenu.fxm
?????文件???????1247??2019-01-22?10:28??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\view\AdminMenuController$1.class
?????文件???????1082??2019-01-22?10:28??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\view\AdminMenuController$2.class
?????文件???????1319??2019-01-22?10:28??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\view\AdminMenuController$3.class
?????文件??????17406??2019-01-22?10:28??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\view\AdminMenuController.class
?????文件??????13936??2019-01-22?10:19??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\view\GuestMenu.fxm
?????文件???????1207??2019-01-22?10:23??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\view\GuestMenuController$1.class
?????文件???????1042??2019-01-22?10:23??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\view\GuestMenuController$2.class
?????文件???????1279??2019-01-22?10:23??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\view\GuestMenuController$3.class
?????文件??????18769??2019-01-22?10:23??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\view\GuestMenuController.class
?????文件???????2055??2019-01-20?23:08??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\view\Main.fxm
?????文件???????2544??2019-01-21?17:38??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\view\MainController.class
?????文件???????2148??2019-01-19?22:21??數據結構與算法課程設計\ScenicSpotManagementSystem\bin\app\view\PlaceDialog.fxm
............此處省略57個文件信息
評論
共有 條評論