當前位置: 首頁>>代碼示例>>Java>>正文


Java PropertyValueFactory類代碼示例

本文整理匯總了Java中javafx.scene.control.cell.PropertyValueFactory的典型用法代碼示例。如果您正苦於以下問題:Java PropertyValueFactory類的具體用法?Java PropertyValueFactory怎麽用?Java PropertyValueFactory使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


PropertyValueFactory類屬於javafx.scene.control.cell包,在下文中一共展示了PropertyValueFactory類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: TableSample

import javafx.scene.control.cell.PropertyValueFactory; //導入依賴的package包/類
public TableSample() {
    final ObservableList<Person> data = FXCollections.observableArrayList(
        new Person("Jacob",     "Smith",    "[email protected]" ),
        new Person("Isabella",  "Johnson",  "[email protected]" ),
        new Person("Ethan",     "Williams", "[email protected]" ),
        new Person("Emma",      "Jones",    "[email protected]" ),
        new Person("Michael",   "Brown",    "[email protected]" )
    );
    TableColumn firstNameCol = new TableColumn();
    firstNameCol.setText("First");
    firstNameCol.setCellValueFactory(new PropertyValueFactory("firstName"));
    TableColumn lastNameCol = new TableColumn();
    lastNameCol.setText("Last");
    lastNameCol.setCellValueFactory(new PropertyValueFactory("lastName"));
    TableColumn emailCol = new TableColumn();
    emailCol.setText("Email");
    emailCol.setMinWidth(200);
    emailCol.setCellValueFactory(new PropertyValueFactory("email"));
    TableView tableView = new TableView();
    tableView.setItems(data);
    tableView.getColumns().addAll(firstNameCol, lastNameCol, emailCol);
    getChildren().add(tableView);
}
 
開發者ID:jalian-systems,項目名稱:marathonv5,代碼行數:24,代碼來源:TableSample.java

示例2: initializeTable

import javafx.scene.control.cell.PropertyValueFactory; //導入依賴的package包/類
public void initializeTable() {
    dateColumn.setCellValueFactory(new PropertyValueFactory<Sale, String>("date"));
    billNumberColumn.setCellValueFactory(new PropertyValueFactory<Sale, Long>("billNumber"));
    patientNameColumn.setCellValueFactory(new PropertyValueFactory<Sale, String>("patientName"));
    doctorNameColumn.setCellValueFactory(new PropertyValueFactory<Sale, String>("doctorName"));
    companyNameColumn.setCellValueFactory(new PropertyValueFactory<Sale, String>("companyName"));
    modeColumn.setCellValueFactory(new PropertyValueFactory<Sale, String>("mode"));
    amountColumn.setCellValueFactory(new PropertyValueFactory<Sale, Float>("amount"));
    saleList = getSale();
    if (saleList.size() < 1) {
        Calendar dateToday = Calendar.getInstance();
        int year, day, month;
        year = dateToday.get(Calendar.YEAR);
        month = dateToday.get(Calendar.MONTH) + 1;
        day = dateToday.get(Calendar.DAY_OF_MONTH);
        String date = year + "-" + month + "-" + day;
        saleList.add(new Sale(date, (long) 0, "-", "-", "-", "-", 0.0f));
    }
    saleTableView.setItems(saleList);

}
 
開發者ID:alchemsynergy,項目名稱:alchem,代碼行數:22,代碼來源:ViewSaleController.java

示例3: initialize

import javafx.scene.control.cell.PropertyValueFactory; //導入依賴的package包/類
@Override
public void initialize(URL url, ResourceBundle rb) {
    cbTypes.getItems().addAll(OPT_2K3DES, OPT_3K3DES, OPT_AES);
    cbTypes.setValue(OPT_2K3DES);
    
    disableTextControl4Key();

    //configuration for table AppIDs
    appIdCol.setCellValueFactory(new PropertyValueFactory<>("id"));
    selCol.setCellValueFactory(new PropertyValueFactory<>("type"));

    //configuration for table view History
    statusCol.setCellValueFactory(new PropertyValueFactory<>("status"));
    cmdCol.setCellValueFactory(new PropertyValueFactory<>("command"));
    uidCol.setCellValueFactory(new PropertyValueFactory<>("uid"));
    receivedDataCol.setCellValueFactory(new PropertyValueFactory<>("receivedData"));
    tbViewHistory.setItems(historyData);
    
    setupUI();
}
 
開發者ID:identiv,項目名稱:ts-cards,代碼行數:21,代碼來源:TsCardExplorerController.java

示例4: searchDrugs

import javafx.scene.control.cell.PropertyValueFactory; //導入依賴的package包/類
private void searchDrugs(String query) {
    drugDefault = false;
    totalSearchDrug = drugGetway.totalSearchDrug(query);
    paginate.setTotal(totalSearchDrug);
    paginate.setStart(0);
    paginate.setPerPage(10);
    paginate.setEnd(10);
    drugTable.getItems().clear();
    drugs = drugGetway.searchDrug(paginate, query);
    clmSl.setCellValueFactory(new PropertyValueFactory<>("sl"));
    clmDrugName.setCellValueFactory(new PropertyValueFactory<>("name"));
    clmGenericName.setCellValueFactory(new PropertyValueFactory<>("genricName"));
    clmNote.setCellValueFactory(new PropertyValueFactory<>("note"));
    clmUseInPrescription.setCellValueFactory(new PropertyValueFactory<>("useInPrescription"));
    clmUseInTemplate.setCellValueFactory(new PropertyValueFactory<>("useInTemplate"));
    clmAction.setCellFactory(action);
    drugTable.setItems(drugs);
}
 
開發者ID:kmrifat,項目名稱:Dr-Assistant,代碼行數:19,代碼來源:DrugsController.java

示例5: initialize

import javafx.scene.control.cell.PropertyValueFactory; //導入依賴的package包/類
@Override
public void initialize(URL url, ResourceBundle rb) {        	
	
    makeFadeInTransition();            
    
    tblClmNome.setResizable(false);
    tblClmPosicao.setResizable(false);
    tblClmPontuacao.setResizable(false);
    
    tblClmPosicao.setCellValueFactory(new PropertyValueFactory<ModelJogadorTable, Integer>("linhaTable"));        
    tblClmNome.setCellValueFactory(new PropertyValueFactory<ModelJogadorTable, String>("nomeTable"));
    tblClmPontuacao.setCellValueFactory(new PropertyValueFactory<ModelJogadorTable, Integer>("pontuacaoTable"));       
    
    ObservableList<ModelJogadorTable> jogadorTable = FXCollections.observableArrayList(mostrarRankingView());
    tblRanking.setItems(jogadorTable);             
}
 
開發者ID:tadeuespindolapalermo,項目名稱:ShowMilhaoPOOJava,代碼行數:17,代碼來源:ControllerLayoutRanking.java

示例6: initialize

import javafx.scene.control.cell.PropertyValueFactory; //導入依賴的package包/類
@Override
public void initialize(URL location, ResourceBundle resources) {
    registerFile.addObserver(this);
    pc.addObserver(this);
    lr.addObserver(this);
    navigator.addObserver(this);
    property.setCellValueFactory(new PropertyValueFactory<>("property"));
    property.setComparator(new NavigatorRowComparator());
    value.setCellValueFactory(new PropertyValueFactory<>("value"));
    for(int i = 0; i < 13; i++) {
        String registerName = "r" + Integer.toString(i);
        data.add(new NavigatorRow(registerName, registerFile.getValue(registerName)));
    }
    data.add(new NavigatorRow("LR", lr.getValue()));
    data.add(new NavigatorRow("PC", pc.getValue()));
    table.setItems(data);
}
 
開發者ID:kasirgalabs,項目名稱:ETUmulator,代碼行數:18,代碼來源:RegistersTab.java

示例7: initialize

import javafx.scene.control.cell.PropertyValueFactory; //導入依賴的package包/類
@Override
public void initialize(URL url, ResourceBundle rb) {
    itemVColumn.setCellValueFactory(new PropertyValueFactory("value"));
    itemWColumn.setCellValueFactory(new PropertyValueFactory("weight"));
    GAitemVColumn.setCellValueFactory(new PropertyValueFactory("value"));
    GAitemWColumn.setCellValueFactory(new PropertyValueFactory("weight"));
    SAitemVColumn.setCellValueFactory(new PropertyValueFactory("value"));
    SAitemWColumn.setCellValueFactory(new PropertyValueFactory("weight"));
    DPitemVColumn.setCellValueFactory(new PropertyValueFactory("value"));
    DPitemWColumn.setCellValueFactory(new PropertyValueFactory("weight"));
    HCitemVColumn.setCellValueFactory(new PropertyValueFactory("value"));
    HCitemWColumn.setCellValueFactory(new PropertyValueFactory("weight"));
    TSitemVColumn.setCellValueFactory(new PropertyValueFactory("value"));
    TSitemWColumn.setCellValueFactory(new PropertyValueFactory("weight"));
    HCVersionBox.getItems().addAll("Standard", "Stochastic", "Best First", "HC with Sideways Moves");
    HCVersionBox.getSelectionModel().select(0);
}
 
開發者ID:mhrimaz,項目名稱:KnapsackFX,代碼行數:18,代碼來源:FXMLDocumentController.java

示例8: defineTable

import javafx.scene.control.cell.PropertyValueFactory; //導入依賴的package包/類
private void defineTable() {
    tableView = new TableView<>();

    TableColumn<JWKItem, String> idCol = new TableColumn<>("ID");
    TableColumn<JWKItem, String> typeCol = new TableColumn<>("Type");
    TableColumn<JWKItem, Boolean> privateCol = new TableColumn<>("Private");
    TableColumn<JWKItem, String> keyUseCol = new TableColumn<>("Key Usage");

    idCol.setCellValueFactory(new PropertyValueFactory<>("kid"));
    typeCol.setCellValueFactory(new PropertyValueFactory<>("keyType"));
    privateCol.setCellValueFactory(new PropertyValueFactory<>("privatePart"));
    keyUseCol.setCellValueFactory(new PropertyValueFactory<>("keyUse"));

    tableView.getColumns().addAll(idCol, typeCol, privateCol, keyUseCol);
    ObservableList<JWKItem> list = getItemList();
    tableView.setItems(list);

}
 
開發者ID:atbashEE,項目名稱:atbash-octopus,代碼行數:19,代碼來源:JWKView.java

示例9: defineTable

import javafx.scene.control.cell.PropertyValueFactory; //導入依賴的package包/類
private void defineTable() {
    tableView = new TableView<>();

    TableColumn<JWKItem, String> idCol = new TableColumn<>("ID");
    TableColumn<JWKItem, String> typeCol = new TableColumn<>("Type");
    TableColumn<JWKItem, Boolean> privateCol = new TableColumn<>("Private");
    TableColumn<JWKItem, String> keyUseCol = new TableColumn<>("Key Usage");

    idCol.setCellValueFactory(new PropertyValueFactory<>("kid"));
    typeCol.setCellValueFactory(new PropertyValueFactory<>("keyType"));
    privateCol.setCellValueFactory(new PropertyValueFactory<>("privatePart"));
    keyUseCol.setCellValueFactory(new PropertyValueFactory<>("keyUse"));

    tableView.getColumns().addAll(idCol, typeCol, privateCol, keyUseCol);
    ObservableList<JWKItem> list = getItemList();
    tableView.setItems(list);

    /*
    tableView.getSelectionModel().selectedItemProperty().addListener((obs, oldSelection, newSelection) -> {
        if (newSelection != null) {
            System.out.println(newSelection);
        }
    });
    */

}
 
開發者ID:atbashEE,項目名稱:atbash-octopus,代碼行數:27,代碼來源:ImportJWKView.java

示例10: initTable

import javafx.scene.control.cell.PropertyValueFactory; //導入依賴的package包/類
/**
 * 初始化配置table
 */
public void initTable() {
	LOG.debug("初始化配置信息表格...");
	ObservableList<HistoryConfigCVF> data = null;
	try {
		data = getHistoryConfig();
	} catch (Exception e) {
		tblConfigInfo.setPlaceholder(new Label("加載配置文件失敗!失敗原因:\r\n" + e.getMessage()));
		LOG.error("初始化配置信息表格出現異常!!!" + e);
	}

	TableColumn<HistoryConfigCVF, String> tdInfo = new TableColumn<HistoryConfigCVF, String>("配置信息文件名");
	TableColumn<HistoryConfigCVF, String> tdOperation = new TableColumn<HistoryConfigCVF, String>("操作");

	tdInfo.setPrefWidth(320);
	tdInfo.setCellValueFactory(new PropertyValueFactory<>("name"));

	tdOperation.setPrefWidth(198);
	tdOperation.setCellValueFactory(new PropertyValueFactory<>("hbox"));

	tblConfigInfo.getColumns().add(tdInfo);
	tblConfigInfo.getColumns().add(tdOperation);

	tblConfigInfo.setItems(data);
	LOG.debug("初始化配置信息完成!");
}
 
開發者ID:shenzhenMirren,項目名稱:vertx-generator,代碼行數:29,代碼來源:HistoryConfigController.java

示例11: RankingsController

import javafx.scene.control.cell.PropertyValueFactory; //導入依賴的package包/類
public RankingsController(DataSyncController instance) {
    this.controller = instance;
    this.teamRankings = FXCollections.observableArrayList();
    this.controller.btnRankUpload.setDisable(true);
    this.controller.colRank.setCellValueFactory(new PropertyValueFactory<>("rank"));
    this.controller.colRankTeam.setCellValueFactory(new PropertyValueFactory<>("teamKey"));
    this.controller.colRankWins.setCellValueFactory(new PropertyValueFactory<>("wins"));
    this.controller.colRankLosses.setCellValueFactory(new PropertyValueFactory<>("losses"));
    this.controller.colRankTies.setCellValueFactory(new PropertyValueFactory<>("ties"));
    this.controller.colRankQP.setCellValueFactory(new PropertyValueFactory<>("qualPoints"));
    this.controller.colRankRP.setCellValueFactory(new PropertyValueFactory<>("rankPoints"));
    this.controller.colRankScore.setCellValueFactory(new PropertyValueFactory<>("highestScore"));
    this.controller.colRankPlayed.setCellValueFactory(new PropertyValueFactory<>("played"));

    this.controller.tableRankings.setItems(this.teamRankings);
}
 
開發者ID:orange-alliance,項目名稱:TOA-DataSync,代碼行數:17,代碼來源:RankingsController.java

示例12: initializeTable

import javafx.scene.control.cell.PropertyValueFactory; //導入依賴的package包/類
public void initializeTable() {
    codeColumn.setCellValueFactory(new PropertyValueFactory<Medicine, Integer>("code"));
    nameColumn.setCellValueFactory(new PropertyValueFactory<Medicine, String>("name"));
    saltColumn.setCellValueFactory(new PropertyValueFactory<Medicine, String>("salt"));
    companyColumn.setCellValueFactory(new PropertyValueFactory<Medicine, String>("company"));
    typeColumn.setCellValueFactory(new PropertyValueFactory<Medicine, String>("type"));
    hsnColumn.setCellValueFactory(new PropertyValueFactory<Medicine, String>("hsn"));
    batchColumn.setCellValueFactory(new PropertyValueFactory<Medicine, String>("batch"));
    expiryColumn.setCellValueFactory(new PropertyValueFactory<Medicine, String>("expiry"));
    quantityColumn.setCellValueFactory(new PropertyValueFactory<Medicine, Integer>("quantity"));
    mrpColumn.setCellValueFactory(new PropertyValueFactory<Medicine, Float>("mrp"));
    costColumn.setCellValueFactory(new PropertyValueFactory<Medicine, Float>("cost"));
    sgstColumn.setCellValueFactory(new PropertyValueFactory<Medicine, Integer>("sgst"));
    cgstColumn.setCellValueFactory(new PropertyValueFactory<Medicine, Integer>("cgst"));
    igstColumn.setCellValueFactory(new PropertyValueFactory<Medicine, Integer>("igst"));

    medicineTableView.setItems(getMedicine());

}
 
開發者ID:alchemsynergy,項目名稱:alchem,代碼行數:20,代碼來源:InventoryController.java

示例13: MovieTableView

import javafx.scene.control.cell.PropertyValueFactory; //導入依賴的package包/類
public MovieTableView() {

        TableColumn<Movie, String> titleColumn = new TableColumn<>("Title");
        titleColumn.setPrefWidth(300);
        titleColumn.setCellValueFactory(new PropertyValueFactory<>("title"));

        TableColumn<Movie, Integer> yearColumn = new TableColumn<>("Year");
        yearColumn.setPrefWidth(80);
        yearColumn.setCellValueFactory(new PropertyValueFactory<>("year"));

        TableColumn<Movie, String> genreColumn = new TableColumn<>("Genre");
        genreColumn.setPrefWidth(140);
        genreColumn.setCellValueFactory(new PropertyValueFactory<>("genre"));

        TableColumn<Movie, Integer> directorColumn = new TableColumn<>("Director");
        directorColumn.setPrefWidth(140);
        directorColumn.setCellValueFactory(new PropertyValueFactory<>("director"));

        TableColumn<Movie, Integer> ratingColumn = new TableColumn<>("Rating");
        ratingColumn.setPrefWidth(120);
        ratingColumn.setCellValueFactory(new PropertyValueFactory<>("rating"));

        getColumns().setAll(titleColumn, yearColumn, genreColumn, directorColumn, ratingColumn);
    }
 
開發者ID:hendrikebbers,項目名稱:ExtremeGuiMakeover,代碼行數:25,代碼來源:MovieTableView.java

示例14: initialize

import javafx.scene.control.cell.PropertyValueFactory; //導入依賴的package包/類
@Override
public void initialize(URL location, ResourceBundle resources) {
    title = resources.getString(R.Translate.GUIDE_NEW_HERO_3_TITLE);
    tableItems.setItems(items);
    selectedItem.bind(tableItems.getSelectionModel().selectedIndexProperty());

    columnImage.setCellValueFactory(new PropertyValueFactory<>("image"));
    columnImage.setCellFactory(param -> CellUtils.forImage());
    columnName.setCellValueFactory(new PropertyValueFactory<>("name"));
    columnWeight.setCellValueFactory(new PropertyValueFactory<>("weight"));
    columnAmmount.setCellValueFactory(new PropertyValueFactory<>("ammount"));
    columnAmmount.setCellFactory(param -> CellUtils.forMaxActValue());

    ObservableMergers.mergeList(databaseItem -> new ChoiceEntry(databaseItem), item_registry,
        ItemRegistry.getINSTANCE().getRegistry());

    btnRemoveItem.disableProperty().bind(selectedItem.lessThan(0));
}
 
開發者ID:stechy1,項目名稱:drd,代碼行數:19,代碼來源:HeroCreatorController3.java

示例15: initialize

import javafx.scene.control.cell.PropertyValueFactory; //導入依賴的package包/類
@Override
public void initialize(URL location, ResourceBundle resources) {
    this.resources = resources;
    tableGeneralItems.setItems(generalItems);
    tableGeneralItems.getSelectionModel().selectedIndexProperty()
        .addListener((observable, oldValue, newValue) -> selectedRowIndex.setValue(newValue));

    columnImage.setCellValueFactory(new PropertyValueFactory<>("image"));
    columnImage.setCellFactory(param -> CellUtils.forImage());
    columnName.setCellValueFactory(new PropertyValueFactory<>("name"));
    columnAuthor.setCellValueFactory(new PropertyValueFactory<>("author"));
    columnWeight.setCellValueFactory(new PropertyValueFactory<>("weight"));
    columnPrice.setCellValueFactory(new PropertyValueFactory<>("price"));
    columnAmmount.setCellValueFactory(new PropertyValueFactory<>("ammount"));
    columnAmmount.setCellFactory(param -> CellUtils.forMaxActValue());

    ObservableMergers.mergeList(GeneralEntry::new, generalItems, manager.selectAll());
}
 
開發者ID:stechy1,項目名稱:drd,代碼行數:19,代碼來源:ShopGeneralController.java


注:本文中的javafx.scene.control.cell.PropertyValueFactory類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。