use of javafx.beans.value.ObservableValue in project selenium_java by sergueik.
the class ConfigFormEx method start.
@SuppressWarnings("restriction")
@Override
public void start(Stage primaryStage) {
Map<String, String> browserOptions = new HashMap<>();
for (String browser : new ArrayList<String>(Arrays.asList(new String[] { "Chrome", "Firefox", "Internet Explorer", "Edge", "Safari" }))) {
browserOptions.put(browser, "unused");
}
configOptions.put("Browser", browserOptions);
// offer templates embedded in the application jar and
// make rest up to customer
configData.put("Template", "Core Selenium Java (embedded)");
configOptions.put("Template", new HashMap<String, String>());
templates = configOptions.get("Template");
primaryStage.setTitle("Session Configuration");
BorderPane root = new BorderPane();
Scene scene = new Scene(root, 480, 250, Color.WHITE);
GridPane gridpane1 = new GridPane();
GridPane gridpane = new GridPane();
GridPane.setRowIndex(gridpane, 0);
GridPane.setColumnIndex(gridpane, 0);
HBox buttonbarHbox = new HBox(10);
buttonbarHbox.setPadding(new Insets(10));
// gridpane.setVgap(5);
GridPane.setRowIndex(buttonbarHbox, 1);
GridPane.setColumnIndex(buttonbarHbox, 0);
// Save button
Button saveButton = new Button("Save");
saveButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
System.out.println("Saved");
Stage stage = (Stage) ((Button) (event.getSource())).getScene().getWindow();
stage.close();
}
});
saveButton.setDefaultButton(true);
// Cancel button
Button cancelButton = new Button("Cancel");
cancelButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
System.out.println("Cancel");
Stage stage = (Stage) ((Button) (event.getSource())).getScene().getWindow();
stage.close();
}
});
buttonbarHbox.getChildren().addAll(saveButton, cancelButton);
gridpane1.getChildren().addAll(gridpane, buttonbarHbox);
// origin:
gridpane.setPadding(new Insets(5));
gridpane.setHgap(5);
gridpane.setVgap(5);
// https://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html
gridpane.setStyle("-fx-padding: 10; -fx-border-style: solid inside; -fx-border-width: 2; -fx-border-insets: 5; -fx-border-radius: 0; -fx-border-color: darkgray;");
// origin:
// http://www.java2s.com/Tutorials/Java/JavaFX/0340__JavaFX_GridPane.htm
// https://docs.oracle.com/javase/8/javafx/api/javafx/scene/layout/GridPane.html
ColumnConstraints column1 = new ColumnConstraints(150);
ColumnConstraints column2 = new ColumnConstraints(50, 300, 450);
column2.setHgrow(Priority.ALWAYS);
gridpane.getColumnConstraints().addAll(column1, column2);
// First name label
Label baseURLLbl = new Label("Base URL");
GridPane.setHalignment(baseURLLbl, HPos.RIGHT);
// Set one constraint at a time...
// Places the label at the first row and first column
GridPane.setRowIndex(baseURLLbl, 0);
GridPane.setColumnIndex(baseURLLbl, 0);
// Last name label
Label templateDirLabel = new Label("Template directory");
GridPane.setHalignment(templateDirLabel, HPos.RIGHT);
// Set column and row constraint at once...
// Places the label at the third row and first column
gridpane.add(templateDirLabel, 0, 2);
gridpane.getChildren().addAll(baseURLLbl);
// base URL field
TextField baseURLFld = new TextField();
GridPane.setHalignment(baseURLFld, HPos.LEFT);
gridpane.add(baseURLFld, 1, 0);
// tempalteDir field
TextField tempalteDirFld = new TextField();
GridPane.setHalignment(tempalteDirFld, HPos.LEFT);
tempalteDirFld.setMaxWidth(Double.MAX_VALUE);
Button browseButton = new Button("Browse");
GridPane.setHalignment(browseButton, HPos.RIGHT);
browseButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
System.out.println("Browse");
}
});
HBox browseButtonbarHbox = new HBox(10);
browseButtonbarHbox.setPadding(new Insets(10));
browseButtonbarHbox.getChildren().addAll(tempalteDirFld, browseButton);
gridpane.add(browseButtonbarHbox, 1, 2);
browseButtonbarHbox.setMaxWidth(Double.MAX_VALUE);
final String[] browsers = new String[] { "Chrome", "Firefox", "Edge", "Internet Explorer" };
ChoiceBox browserChoice = new ChoiceBox();
browserChoice.setItems(FXCollections.observableArrayList(Arrays.asList(browsers)));
browserChoice.getSelectionModel().selectedIndexProperty().addListener(new ChangeListener<Number>() {
public void changed(ObservableValue ov, Number index, Number new_index) {
System.err.println("Browser: " + browsers[new_index.intValue()]);
}
});
browserChoice.getSelectionModel().select(0);
browserChoice.setMaxWidth(Double.MAX_VALUE);
gridpane.add(browserChoice, 1, 1);
Label browserLabel = new Label("Browser");
GridPane.setHalignment(browserLabel, HPos.RIGHT);
gridpane.add(browserLabel, 0, 1);
final String[] templates = new String[] { "mockup 1", "mockup 2", "mockup 3" };
ComboBox templateChoice = new ComboBox();
templateChoice.getItems().addAll(Arrays.asList(templates));
templateChoice.setPromptText("template");
templateChoice.setEditable(true);
templateChoice.setOnAction(e -> {
String dummy = templateChoice.getSelectionModel().getSelectedItem().toString();
});
GridPane.setHalignment(templateChoice, HPos.RIGHT);
templateChoice.setValue("mockup 1");
templateChoice.setEditable(true);
templateChoice.getEditor().setEditable(false);
templateChoice.setStyle("-fx-background-color: gray");
templateChoice.setMaxWidth(Double.MAX_VALUE);
// setHgrow(Priority.ALWAYS);
gridpane.add(templateChoice, 1, 3);
Label templateLabel = new Label("Template");
GridPane.setHalignment(templateLabel, HPos.RIGHT);
gridpane.add(templateLabel, 0, 3);
root.setCenter(gridpane1);
primaryStage.setScene(scene);
primaryStage.show();
for (String configKey : Arrays.asList("Browser", "Base URL", "Template Directory", "Template")) {
if (configOptions.containsKey(configKey)) {
} else {
}
}
}
use of javafx.beans.value.ObservableValue in project uPMT by coco35700.
the class MomentExpVBox method editNameMode.
private void editNameMode() {
TextField t = new TextField();
t.setMaxWidth(180);
t.setText(moment.getName());
t.requestFocus();
ChangeListener<Boolean> listener = new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> arg0, Boolean oldPropertyValue, Boolean newPropertyValue) {
if (!newPropertyValue) {
RenameMomentCommand cmd = new RenameMomentCommand(nameController, moment.getName(), t.getText(), main);
cmd.execute();
UndoCollector.INSTANCE.add(cmd);
borderPaneLabel.setCenter(label);
// borderPaneLabel.setCenter(label);
t.focusedProperty().removeListener(this);
}
}
};
t.setOnKeyPressed(new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent event) {
if (event.getCode() == KeyCode.ENTER) {
t.setText(t.getText());
borderPaneLabel.setCenter(label);
// borderPaneLabel.setCenter(label);
}
if (event.getCode() == KeyCode.ESCAPE) {
borderPaneLabel.setCenter(label);
// borderPaneLabel.setCenter(label);
}
}
});
t.focusedProperty().addListener(listener);
Platform.runLater(() -> t.requestFocus());
Platform.runLater(() -> t.selectAll());
borderPaneLabel.setCenter(t);
// borderPaneLabel.setCenter(t);
}
use of javafx.beans.value.ObservableValue in project uPMT by coco35700.
the class TypeTreeViewControllerProperty method rename.
@Override
public void rename() {
super.rename();
ChangeListener<Boolean> listener = new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> arg0, Boolean oldPropertyValue, Boolean newPropertyValue) {
if (!newPropertyValue) {
if (type.getType().isProperty()) {
String oldName = new String(type.getType().getName());
if (!oldName.equals(textField.getText())) {
boolean hasName = false;
for (Type propriete : type.getParent().getTypes()) {
if (propriete.getName().equals(textField.getText())) {
hasName = true;
break;
}
}
if (!hasName) {
RenamePropertySchemeCommand cmd = new RenamePropertySchemeCommand(type.getRenamePropertyController(), oldName, textField.getText(), main);
cmd.execute();
UndoCollector.INSTANCE.add(cmd);
} else {
Alert alert = new Alert(AlertType.INFORMATION);
alert.setTitle(main._langBundle.getString("invalid_name"));
alert.setHeaderText(null);
alert.setContentText(main._langBundle.getString("properties_name_invalid"));
alert.show();
}
}
}
typePane.setLeft(nomType);
rename.setDisable(false);
textField.focusedProperty().removeListener(this);
}
}
};
textField.setOnKeyPressed(new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent event) {
if (event.getCode() == KeyCode.ENTER) {
if (type.getType().isProperty()) {
textField.setText(textField.getText());
}
typePane.setLeft(nomType);
rename.setDisable(false);
}
if (event.getCode() == KeyCode.ESCAPE) {
typePane.setLeft(nomType);
rename.setDisable(true);
}
}
});
textField.focusedProperty().addListener(listener);
typePane.setLeft(textField);
Platform.runLater(() -> textField.requestFocus());
Platform.runLater(() -> textField.selectAll());
}
use of javafx.beans.value.ObservableValue in project uPMT by coco35700.
the class TypeTreeViewControllerFolder method rename.
@Override
public void rename() {
super.rename();
ChangeListener<Boolean> listener = new ChangeListener<Boolean>() {
@Override
public void changed(ObservableValue<? extends Boolean> arg0, Boolean oldPropertyValue, Boolean newPropertyValue) {
if (!newPropertyValue) {
if (type.getType().isFolder()) {
String oldName = new String(type.getType().getName());
if (!oldName.equals(textField.getText())) {
boolean hasName = false;
for (Type folder : type.getParent().getTypes()) {
if (folder.getName().equals(textField.getText())) {
hasName = true;
break;
}
}
if (!hasName) {
RenameFolderSchemeCommand cmd = new RenameFolderSchemeCommand(ref, type.getType().getName(), textField.getText(), main);
cmd.execute();
UndoCollector.INSTANCE.add(cmd);
} else {
Alert alert = new Alert(AlertType.INFORMATION);
alert.setTitle(main._langBundle.getString("invalid_name"));
alert.setHeaderText(null);
alert.setContentText(main._langBundle.getString("folder_name_invalid"));
alert.show();
}
}
}
typePane.setLeft(nomType);
rename.setDisable(false);
textField.focusedProperty().removeListener(this);
}
}
};
textField.setOnKeyPressed(new EventHandler<KeyEvent>() {
@Override
public void handle(KeyEvent event) {
if (event.getCode() == KeyCode.ENTER) {
if (type.getType().isProperty()) {
textField.setText(textField.getText());
}
typePane.setLeft(nomType);
rename.setDisable(false);
}
if (event.getCode() == KeyCode.ESCAPE) {
typePane.setLeft(nomType);
rename.setDisable(true);
}
}
});
textField.focusedProperty().addListener(listener);
typePane.setLeft(textField);
Platform.runLater(() -> textField.requestFocus());
Platform.runLater(() -> textField.selectAll());
}
use of javafx.beans.value.ObservableValue in project financial by greatkendy123.
the class MyController method initialize.
/**
* 节点加载完后需要进行的一些初始化操作
* Initializes the controller class. This method is automatically called
* after the fxml file has been loaded.
*/
@SuppressWarnings("unchecked")
@Override
public void initialize(URL location, ResourceBundle resources) {
table_Profit = this.tableProfit;
// 第一次打开主窗口时设置当前俱乐部ID值
String clubIdValue = PropertiesUtil.readProperty("clubId");
currentClubId = lable_currentClubId;
if (clubIdValue != null)
lable_currentClubId.setText(clubIdValue);
// 第一次打开主窗口时显示所有股东
// //股东
String gudongs = PropertiesUtil.readProperty("gudong");
DataConstans.gudongList = new ArrayList<>();
if (!StringUtil.isBlank(gudongs)) {
for (String gudong : gudongs.split(",")) {
DataConstans.gudongList.add(gudong);
}
}
for (String gd : DataConstans.gudongList) gudongListView.getItems().add(gd);
// 模拟初始化第一个tableView
// kendy:绑定数据域
// 支付按钮
pay.setCellFactory(cellFactory);
// 绑定玩家信息表
bindCellValue(tuan, wanjiaId, wanjia, jifen, shishou, baoxian, chuHuishui, baohui, shuihouxian, heLirun, shouHuishui);
jifen.setCellFactory(getColorCellFactory(new TotalInfo()));
shishou.setCellFactory(getColorCellFactory(new TotalInfo()));
baoxian.setCellFactory(getColorCellFactory(new TotalInfo()));
shuihouxian.setCellFactory(getColorCellFactory(new TotalInfo()));
chuHuishui.setCellFactory(getColorCellFactory(new TotalInfo()));
// 绑定牌局表
bindCellValue(paiju, wanjiaName, zhangji, yicunJifen, heji);
// 支付按钮:单独出来
pay.setCellFactory(cellFactory);
pay.setStyle("-fx-alignment: CENTER;");
// 复制按钮:单独出来
copy.setCellFactory(cellFactoryCopy);
copy.setStyle("-fx-alignment: CENTER;");
zhangji.setCellFactory(getColorCellFactory(new WanjiaInfo()));
yicunJifen.setCellFactory(getColorCellFactory(new WanjiaInfo()));
heji.setCellFactory(getColorCellFactory(new WanjiaInfo()));
// 绑定实时金额表
tableCurrentMoneyInfo.setEditable(true);
bindCellValue(cmSuperIdSum, mingzi, shishiJine, cmiEdu);
cmSuperIdSum.setStyle("-fx-alignment: CENTER;-fx-font-weight: bold;");
shishiJine.setCellFactory(TextFieldTableCell.forTableColumn());
// shishiJine.setCellFactory(redAndEditCellFactory);
shishiJine.setOnEditCommit(new EventHandler<CellEditEvent<CurrentMoneyInfo, String>>() {
@Override
public void handle(CellEditEvent<CurrentMoneyInfo, String> t) {
String oldValue = t.getOldValue();
// 修改原值
CurrentMoneyInfo cmInfo = (CurrentMoneyInfo) t.getTableView().getItems().get(t.getTablePosition().getRow());
if (cmInfo != null && !StringUtil.isBlank(cmInfo.getMingzi())) {
// 更新到已存积分
boolean isChangedOK = MoneyService.changeYicunJifen(tablePaiju, cmInfo.getMingzi(), t.getNewValue());
if (isChangedOK) {
cmInfo.setShishiJine(t.getNewValue());
} else {
cmInfo.setShishiJine(t.getOldValue());
String ss = t.getTableView().getItems().get(t.getTablePosition().getRow()).getShishiJine();
tableCurrentMoneyInfo.refresh();
}
// 最后刷新实时金额表
MoneyService.flush_SSJE_table();
} else if (cmInfo != null) {
cmInfo.setShishiJine(null);
ShowUtil.show("空行不能输入", 1);
tableCurrentMoneyInfo.refresh();
}
}
});
// 绑定资金表
tableZijin.setEditable(true);
bindCellValue(zijinType, zijinAccount);
// zijinAccount.setCellFactory(TextFieldTableCell.forTableColumn());
zijinType.setCellFactory(zijinCellFactory);
zijinAccount.setCellFactory(getColorCellFactory(new ZijinInfo()));
// 绑定利润表
bindCellValue(profitType, profitAccount);
profitAccount.setCellFactory(getColorCellFactory(new ProfitInfo()));
// 绑定实时开销表
bindCellValue(kaixiaoType, kaixiaoMoney);
kaixiaoMoney.setCellFactory(getColorCellFactory(new KaixiaoInfo()));
// 绑定实时当局表
bindCellValue(type, money);
money.setCellFactory(getColorCellFactory(new DangjuInfo()));
// 绑定交收表
bindCellValue(jiaoshouType, jiaoshouMoney);
jiaoshouMoney.setCellFactory(getColorCellFactory(new JiaoshouInfo()));
// 绑定平帐表
bindCellValue(pingzhangType, pingzhangMoney);
pingzhangMoney.setCellFactory(getColorCellFactory(new PingzhangInfo()));
// 绑定团队表
bindCellValue(teamID, teamZJ, teamHS, teamBS, teamSum);
teamJiesuan.setCellFactory(cellFactoryJiesuan);
teamJiesuan.setStyle("-fx-alignment: CENTER;");
teamZJ.setCellFactory(getColorCellFactory(new TeamInfo()));
teamBS.setCellFactory(getColorCellFactory(new TeamInfo()));
teamHS.setCellFactory(getColorCellFactory(new TeamInfo()));
teamSum.setCellFactory(getColorCellFactory(new TeamInfo()));
// 绑定代理查询表(团队当天查询)
bindCellValue(proxyPlayerId, proxyPlayerName, proxyYSZJ, proxyZJ, proxyBaoxian, proxyHuishui, proxyHuiBao, proxyTableId);
proxyYSZJ.setCellFactory(getColorCellFactory(new ProxyTeamInfo()));
proxyZJ.setCellFactory(getColorCellFactory(new ProxyTeamInfo()));
proxyBaoxian.setCellFactory(getColorCellFactory(new ProxyTeamInfo()));
// 绑定代理查询中的合计表
bindCellValue(proxySumType, proxySum);
proxySum.setCellFactory(getColorCellFactory(new ProxySumInfo()));
// 绑定汇总信息表(当天每一局的团队汇总查询)
bindCellValue(zonghuiTabelId, zonghuiFuwufei, zonghuiBaoxian, zonghuiHuishui, zonghuiHuiBao);
zonghuiBaoxian.setCellFactory(getColorCellFactory(new ZonghuiInfo()));
zonghuiHuishui.setCellFactory(getColorCellFactory(new ZonghuiInfo()));
zonghuiHuiBao.setCellFactory(getColorCellFactory(new ZonghuiInfo()));
// 绑定汇总查询中的当天汇总表
bindCellValue(huizongType, huizongMoney);
huizongMoney.setCellFactory(getColorCellFactory(new DangtianHuizongInfo()));
// 绑定汇总查询中的开销表表
bindCellValue(zonghuiKaixiaoType, zonghuiKaixiaoMoney);
zonghuiKaixiaoMoney.setCellFactory(getColorCellFactory(new ZonghuiKaixiaoInfo()));
// 绑定会员查询中的会员当天战绩表
bindCellValue(memberJu, memberZJ);
memberZJ.setCellFactory(getColorCellFactory(new MemberZJInfo()));
// 绑定实时上码表
// ,shangmaShishou,shangmaJu
bindCellValue(shangmaLianheEdu, shangmaName, shangmaEdu, shangmaAvailableEdu, shangmaYCJF, shangmaYiSM, shangmaSumOfZJ, shangmaPlayerId);
tableShangma.setRowFactory(new Callback<TableView<ShangmaInfo>, TableRow<ShangmaInfo>>() {
@Override
public TableRow<ShangmaInfo> call(TableView<ShangmaInfo> param) {
return new TableRowControl(tableShangma);
}
});
// shangmaPlayerId.setCellFactory(shangmaLeftNameCellFactory);
// shangmaName.setCellFactory(shangmaLeftNameCellFactory);
// shangmaEdu.setCellFactory(shangmaLeftNameCellFactory);
// shangmaSumOfZJ.setCellFactory(shangmaLeftNameCellFactory);
// shangmaYiSM.setCellFactory(shangmaLeftNameCellFactory);
// shangmaYCJF.setCellFactory(shangmaLeftNameCellFactory);
shangmaLianheEdu.setCellFactory(getColorCellFactory(new ShangmaInfo()));
// red_NotEdit_CellFactory
shangmaAvailableEdu.setCellFactory(getColorCellFactory(new ShangmaInfo()));
shangmaYCJF.setCellFactory(getColorCellFactory(new ShangmaInfo()));
// 绑定外债信息表
bindCellValue(waizhaiType, waizhaiMoney);
waizhaiMoney.setCellFactory(getColorCellFactory(new WaizhaiInfo()));
// 绑定上码个人信息表
tableShangmaDetail.setEditable(true);
bindCellValue(shangmaDetailName, shangmaJu, shangmaSM, shangmaShishou);
shangmaDetailName.setCellFactory(ShangmaNameCellFactory);
shangmaJu.setCellFactory(ShangmaNameCellFactory);
shangmaSM.setCellFactory(ShangmaNameCellFactory);
shangmaShishou.setCellFactory(ShangmaNameCellFactory);
tableShangma.getSelectionModel().selectedItemProperty().addListener(new ChangeListener() {
@Override
public void changed(ObservableValue observable, Object oldValue, Object newValue) {
ShangmaInfo smInfo = (ShangmaInfo) newValue;
// 加载右边的个人详情
if (smInfo != null) {
String playerId = smInfo.getShangmaPlayerId();
if (!StringUtil.isBlank(playerId)) {
ShangmaService.loadSMDetailTable(playerId);
ShangmaService.loadSMNextDayTable(playerId);
}
} else
tableShangmaDetail.setItems(null);
}
});
// 绑定次日信息表
shangmaNextDayName.setCellValueFactory(new PropertyValueFactory<ShangmaDetailInfo, String>("shangmaDetailName"));
shangmaNextDayName.setCellFactory(ShangmaNameNextdayCellFactory);
shangmaNextDayName.setStyle("-fx-alignment: CENTER;");
shangmaNextDayJu.setCellValueFactory(new PropertyValueFactory<ShangmaDetailInfo, String>("shangmaJu"));
shangmaNextDayJu.setCellFactory(ShangmaNameNextdayCellFactory);
shangmaNextDayJu.setStyle("-fx-alignment: CENTER;");
shangmaNextDaySM.setCellValueFactory(new PropertyValueFactory<ShangmaDetailInfo, String>("shangmaSM"));
shangmaNextDaySM.setCellFactory(ShangmaNameNextdayCellFactory);
shangmaNextDaySM.setStyle("-fx-alignment: CENTER;");
// 绑定积查询表
bindCellValue(jfRank, jfPlayerName, jfValue);
// ////初始化实时金额表
MoneyService.iniitMoneyInfo(tableCurrentMoneyInfo);
// tableTotalInfo.setItems(tableTotalInfoList);
// tableKaixiao.setItems(FXCollections.observableArrayList(
// new KaixiaoInfo("测试列","12")
// ));
// //////////////////总汇表中的初始化
juTypeListView.getItems().add("合局");
LMLabel.setTextFill(Color.web("#CD3700"));
// 设置Label 的文本颜色。
indexLabel.setTextFill(Color.web("#0076a3"));
indexLabel.setFont(new Font("Arial", 30));
// //////////////////代理查询中的团队回水选择
TeamProxyService.initTeamProxy(tableProxyTeam, proxySumHBox, teamIDCombox, isZjManage, proxyDateLabel, tableProxySum, proxyHSRate, proxyHBRate, proxyFWF, hasTeamBaoxian);
// //////////////////代理查询中的团队回水选择
TeamProxyService.initTeamSelectAction(teamIDCombox, isZjManage, tableProxyTeam, proxySumHBox);
// //////////////////会员服务类
MemberService.initMemberQuery(memberListView, tableMemberZJ, memberDateStr, memberPlayerId, memberPlayerName, memberSumOfZJ, memberTotalZJ);
tabsAction();
// //////////////////实时上马系统
initShanagma();
// /////////////合并ID
CombineIDController.initCombineIdController(tableCurrentMoneyInfo);
// //////////积分查询
JifenService.initJifenService(jfTeamIDCombox);
// 是否启动测试模式
initAutoTestMode();
// 选择导入白名单的版本
initWhiteVersion();
try {
FXMLLoader loader = new FXMLLoader();
Parent root = loader.load(getClass().getResource("/com/kendy/dialog/LM_Tab_Fram.fxml").openStream());
// loader.setController(lmController);
lmController = loader.getController();
Tab tab1 = new Tab();
tab1.setText("联盟对账");
tab1.setClosable(false);
tab1.setContent(root);
tabs.getTabs().add(tab1);
} catch (IOException e) {
ErrorUtil.err("联盟tab加载失败", e);
}
try {
FXMLLoader loader = new FXMLLoader();
Parent root = loader.load(getClass().getResource("/com/kendy/dialog/Quota_Tab_Fram.fxml").openStream());
loader.setController(new QuotaController());
Tab quotaTab = new Tab();
quotaTab.setText("联盟配账");
quotaTab.setClosable(false);
quotaTab.setContent(root);
tabs.getTabs().add(quotaTab);
} catch (IOException e) {
ErrorUtil.err("联盟配账tab加载失败", e);
}
try {
FXMLLoader loader = new FXMLLoader();
Parent root = loader.load(getClass().getResource("/com/kendy/dialog/gudong_contribution.fxml").openStream());
loader.setController(new GDController());
Tab gdTab = new Tab();
gdTab.setText("股东贡献值");
gdTab.setClosable(false);
gdTab.setContent(root);
tabs.getTabs().add(gdTab);
} catch (IOException e) {
ErrorUtil.err("股东贡献值tab加载失败", e);
}
try {
FXMLLoader loader = new FXMLLoader();
Parent root = loader.load(getClass().getResource("/com/kendy/dialog/TG_toolaa.fxml").openStream());
Tab gdTab = new Tab();
gdTab.setText("托管工具");
gdTab.setClosable(false);
gdTab.setContent(root);
tabs.getTabs().add(gdTab);
tgController = (TGController) loader.getController();
} catch (IOException e) {
ErrorUtil.err("托管小工具tab加载失败", e);
}
try {
FXMLLoader loader = new FXMLLoader();
Parent root = loader.load(getClass().getResource("/com/kendy/dialog/SM_Auto.fxml").openStream());
Tab gdTab = new Tab();
gdTab.setText("自动上码配置");
gdTab.setClosable(false);
gdTab.setContent(root);
tabs.getTabs().add(gdTab);
smAutoController = (SMAutoController) loader.getController();
} catch (IOException e) {
ErrorUtil.err("托管小工具tab加载失败", e);
}
}
Aggregations