InformationPane.java 文件源码

java
阅读 25 收藏 0 点赞 0 评论 0

项目:Goliath-Overclocking-Utility-FX 作者:
public InformationPane()
{
    super();
    super.setPrefHeight(AppTabPane.CONTENT_HEIGHT);
    super.setPrefWidth(AppTabPane.CONTENT_WIDTH);

    infoTable = new TableView<>(FXCollections.observableArrayList(InstanceProvider.getAttributes()));

    if(AppSettings.getShowExtraAttributeInfo())
    {
        cmdName = new TableColumn<>("Cmd Name");
        cmdName.setCellValueFactory(new PropertyValueFactory("cmdName"));

        cmdValue = new TableColumn<>("Cmd Value");
        cmdValue.setCellValueFactory(new PropertyValueFactory("cmdValue"));
    }

    displayName = new TableColumn<>("Name");
    displayName.setCellValueFactory(new PropertyValueFactory("displayName"));

    displayValue = new TableColumn<>("Value");
    displayValue.setCellValueFactory(new PropertyValueFactory("displayValue"));

    if(!AppSettings.getShowExtraAttributeInfo())
        infoTable.getColumns().addAll(displayName, displayValue);
    else
        infoTable.getColumns().addAll(cmdName, displayName, cmdValue, displayValue);

    infoTable.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);

    infoTable.setPrefWidth(AppTabPane.CONTENT_WIDTH);
    infoTable.setPrefHeight(AppTabPane.CONTENT_HEIGHT);
    infoTable.setEditable(false);

    super.getChildren().add(infoTable);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号