binjr 项目使用教程

binjr 项目使用教程

binjr A Time Series Data Browser项目地址:https://gitcode.com/gh_mirrors/bi/binjr

1. 项目的目录结构及介绍

binjr 项目的目录结构如下:

binjr/
├── binjr-core/
├── binjr-adapters/
├── binjr-demo-adapter/
├── binjr-desktop/
├── binjr-site/
├── binjr-docs/
├── binjr-tests/
├── build.gradle
├── settings.gradle
└── README.md

目录介绍

  • binjr-core: 核心模块,包含项目的基本功能和核心类。
  • binjr-adapters: 适配器模块,用于连接不同的数据源。
  • binjr-demo-adapter: 演示适配器,提供示例数据源。
  • binjr-desktop: 桌面应用模块,包含用户界面和交互逻辑。
  • binjr-site: 网站模块,用于生成项目文档和网站内容。
  • binjr-docs: 文档模块,包含项目的详细文档。
  • binjr-tests: 测试模块,包含项目的单元测试和集成测试。
  • build.gradle: Gradle 构建文件,用于配置项目的构建过程。
  • settings.gradle: Gradle 设置文件,用于配置项目的模块和依赖。
  • README.md: 项目说明文件,包含项目的基本介绍和使用说明。

2. 项目的启动文件介绍

binjr 项目的启动文件位于 binjr-desktop 模块中,主要文件为 MainApp.java

MainApp.java

package eu.binjr.desktop;

import eu.binjr.core.preferences.UserPreferences;
import eu.binjr.core.controllers.MainViewController;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class MainApp extends Application {

    @Override
    public void start(Stage primaryStage) throws Exception {
        FXMLLoader loader = new FXMLLoader(getClass().getResource("/fxml/MainView.fxml"));
        Parent root = loader.load();
        MainViewController controller = loader.getController();
        controller.setStage(primaryStage);
        Scene scene = new Scene(root);
        primaryStage.setScene(scene);
        primaryStage.setTitle("binjr");
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}

启动文件介绍

  • MainApp.java: 这是 binjr 项目的入口类,继承自 javafx.application.Application。在 start 方法中,加载主界面 FXML 文件并初始化主控制器,然后创建并显示主窗口。

3. 项目的配置文件介绍

binjr 项目的配置文件主要位于 binjr-core 模块中,主要文件为 UserPreferences.java

UserPreferences.java

package eu.binjr.core.preferences;

import eu.binjr.core.logging.Logger;
import eu.binjr.core.data.exceptions.DataAdapterException;
import eu.binjr.core.data.adapters.DataAdapter;
import eu.binjr.core.data.adapters.DemoDataAdapter;
import eu.binjr.core.data.adapters.FileDataAdapter;
import eu.binjr.core.data.adapters.HttpDataAdapter;
import eu.binjr.core.data.adapters.JrdsDataAdapter;
import eu.binjr.core.data.adapters.NetDataAdapter;
import eu.binjr.core.data.adapters.Rrd4jDataAdapter;
import eu.binjr.core.data.adapters.RrdToolDataAdapter;
import eu.binjr.core.data.adapters.TcpDataAdapter;
import eu.binjr.core.data.adapters.UdpDataAdapter;
import eu.binjr.core.data.adapters.WebSocketDataAdapter;
import eu.binjr.core.data.sources.DataSource;
import eu.binjr.core.data.sources.FileDataSource;
import eu.binjr.core.data.sources.HttpDataSource;
import eu.binjr.core.data.sources.J

binjr A Time Series Data Browser项目地址:https://gitcode.com/gh_mirrors/bi/binjr

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

幸竹任

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值