java开发ria是指什么_Java RIA Demo

JavaFX 编程语言开发互联网应用程序(RIA)

ada139a6f0e98f0f67bc52c0be7992d7.png

执行入口:

import javafx.application.Application;

import javafx.fxml.FXMLLoader;

import javafx.scene.Parent;

import javafx.scene.Scene;

import javafx.stage.Stage;

public class Main extends Application {

@Override

public void start(Stage primaryStage) throws Exception{

// 加载xml文件进行

Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));

primaryStage.setTitle("配置中心");

primaryStage.setScene(new Scene(root, 860, 605));

primaryStage.show();

}

public static void main(String[] args) {

launch(args);

}

}

View层 FXML文件:

//绑定Controller,完整的包路径

fx:controller="sample.SampleController">

// fx:绑定Controller的属性

// 按钮绑定对应Controller对应的事件,

控制层:

import java.net.URL;

import java.time.LocalDate;

import java.util.Map;

import java.util.ResourceBundle;

public class SampleController implements Initializable {

private String securityUrl="/third/app/security/syn";

// 空间的元素ID

@FXML

private ComboBox prototypeId;

@FXML

private TextField hostName;

@FXML

private TextField hostPort;

@FXML

private TextArea privateKeyId;

@FXML

private TextArea publicKeyId;

@FXML

private TextField securityKey;

@FXML

private DatePicker startTime;

@FXML

private DatePicker endTime;

//事件方法

@FXML

private void genRsaEvent(ActionEvent event){

Map securityMap = StorgeUtils.getKeyInfo();

String privateKeyContent = securityMap.get("private");

String publicKeyContent = securityMap.get("public");

privateKeyId.setText(privateKeyContent);

publicKeyId.setText(publicKeyContent);

}

@FXML

private void handleButtonAction(javafx.event.ActionEvent event) {

StringBuilder httpReqUrl = new StringBuilder();

httpReqUrl.append(prototypeId.getValue()).append("://").append(hostName.getText()).append(":").append(hostPort.getText());

httpReqUrl.append(securityUrl);

System.out.println(httpReqUrl.toString());

System.out.println(securityKey.getText());

System.out.println(privateKeyId.getText());

System.out.println(publicKeyId.getText());

System.out.println(startTime.getValue());

System.out.println(endTime.getValue());

new AlertBox().display("信息提醒", "保存成功!");

}

@Override

public void initialize(URL location, ResourceBundle resources) {

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值