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


Java TableView.setEditable方法代碼示例

本文整理匯總了Java中javafx.scene.control.TableView.setEditable方法的典型用法代碼示例。如果您正苦於以下問題:Java TableView.setEditable方法的具體用法?Java TableView.setEditable怎麽用?Java TableView.setEditable使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javafx.scene.control.TableView的用法示例。


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

示例1: createRegisterTable

import javafx.scene.control.TableView; //導入方法依賴的package包/類
private TableView<RegisterRow> createRegisterTable()
{
	TableView<RegisterRow> table = new TableView<>();
	table.setEditable(true);
	
	TableColumn<RegisterRow, String> nameColumn = new TableColumn<>("Name");
	nameColumn.setCellValueFactory(registerFactory("registerName"));
	setPercentSize(table, nameColumn, 1.0 / 3.0);
	table.getColumns().add(nameColumn);
	
	TableColumn<RegisterRow, String> idColumn = new TableColumn<>("Register");
	idColumn.setCellValueFactory(registerFactory("registerID"));
	setPercentSize(table, idColumn, 1.0 / 3.0);
	table.getColumns().add(idColumn);
	
	TableColumn<RegisterRow, String> valueColumn = new TableColumn<>("Value");
	valueColumn.setCellValueFactory(registerFactory("value"));
	setPercentSize(table, valueColumn, 1.0 / 3.0);
	table.getColumns().add(valueColumn);
	
	table.setItems(registers);
	table.setMinHeight(80);
	return table;
}
 
開發者ID:dhawal9035,項目名稱:WebPLP,代碼行數:25,代碼來源:WatcherWindow.java

示例2: createMemoryTable

import javafx.scene.control.TableView; //導入方法依賴的package包/類
private TableView<MemoryRow> createMemoryTable()
{
	TableView<MemoryRow> table = new TableView<>();
	table.setEditable(true);
	
	TableColumn<MemoryRow, String> idColumn = new TableColumn<>("Address");
	idColumn.setCellValueFactory(memoryFactory("address"));
	setPercentSize(table, idColumn, 0.5);
	table.getColumns().add(idColumn);
	
	TableColumn<MemoryRow, String> valueColumn = new TableColumn<>("Value");
	valueColumn.setCellValueFactory(memoryFactory("value"));
	setPercentSize(table, valueColumn, 0.5);
	table.getColumns().add(valueColumn);
	
	table.setItems(memoryAddresses);
	table.setMinHeight(80);
	return table;
}
 
開發者ID:dhawal9035,項目名稱:WebPLP,代碼行數:20,代碼來源:WatcherWindow.java

示例3: createRegisterTabContent

import javafx.scene.control.TableView; //導入方法依賴的package包/類
private TableView<RegisterRow> createRegisterTabContent()
{
	TableView<RegisterRow> table = new TableView<>();
	table.setEditable(true);
	
	TableColumn<RegisterRow, String> nameColumn = new TableColumn<>("Register");
	nameColumn.setCellValueFactory(registerFactory("register"));
	setPercentSize(table, nameColumn, 1.0 / 3.0);
	table.getColumns().add(nameColumn);
	
	TableColumn<RegisterRow, String> contentsColumn = new TableColumn<>("Contents");
	contentsColumn.setCellValueFactory(registerFactory("content"));
	setPercentSize(table, contentsColumn, 1.0 / 3.0);
	table.getColumns().add(contentsColumn);
	
	TableColumn<RegisterRow, String> valueColumn = new TableColumn<>("Edit Contents");
	valueColumn.setCellValueFactory(registerFactory("editContent"));
	setPercentSize(table, valueColumn, 1.0 / 3.0);
	table.getColumns().add(valueColumn);
	
	table.setItems(registers);
	return table;
}
 
開發者ID:dhawal9035,項目名稱:WebPLP,代碼行數:24,代碼來源:CpuWindow.java

示例4: createSectionView

import javafx.scene.control.TableView; //導入方法依賴的package包/類
private TableView<QuickViewEntry> createSectionView(QuickViewSection section)
{
	String title = section.getTitle();
	String contentHeader = section.getContentHeader();
	String descriptionHeader = section.getDescriptionHeader();
	
	TableView<QuickViewEntry> table = new TableView<>();
	table.setEditable(false);
	table.setMouseTransparent(true);
	table.setFocusTraversable(false);
	table.getStylesheets().add("/noScrollTableView.css");
	
	TableColumn<QuickViewEntry, String> headerColumn = new TableColumn<>(title);
	table.getColumns().add(headerColumn);
	
	TableColumn<QuickViewEntry, String> contentColumn = new TableColumn<>(
			contentHeader);
	contentColumn.setCellValueFactory(cellFactory("content"));
	setPercentSize(table, contentColumn, 0.4);
	headerColumn.getColumns().add(contentColumn);
	
	TableColumn<QuickViewEntry, String> descriptionColumn = new TableColumn<>(
			descriptionHeader);
	descriptionColumn.setCellValueFactory(cellFactory("description"));
	setPercentSize(table, descriptionColumn, 0.6);
	headerColumn.getColumns().add(descriptionColumn);
	
	ObservableList<QuickViewEntry> entries = FXCollections.observableArrayList();
	entries.addAll(section.getEntries());
	table.setItems(entries);
	
	int headerHeight = 50;
	int rows = entries.size();
	table.setPrefHeight(rows * 24 + headerHeight);
	return table;
}
 
開發者ID:dhawal9035,項目名稱:WebPLP,代碼行數:37,代碼來源:QuickViewPanel.java

示例5: createDisassemblyTabContent

import javafx.scene.control.TableView; //導入方法依賴的package包/類
private TableView<DisassemblyRow> createDisassemblyTabContent()
{
	TableView<DisassemblyRow> table = new TableView<>();
	table.setEditable(true);
	
	TableColumn<DisassemblyRow, String> pcColumn = new TableColumn<>("PC");
	pcColumn.setCellValueFactory(disassemblyFactory("pc"));
	setPercentSize(table, pcColumn, 1.0 / 5.0);
	table.getColumns().add(pcColumn);
	
	TableColumn<DisassemblyRow, CheckBox> breakpointColumn = new TableColumn<>(
			"Breakpoint");
	breakpointColumn.setCellValueFactory(disassemblyFactoryCheckBox("checkBox"));
	setPercentSize(table, breakpointColumn, 1.0 / 5.0);
	table.getColumns().add(breakpointColumn);
	
	TableColumn<DisassemblyRow, String> addressColumn = new TableColumn<>("Address");
	addressColumn.setCellValueFactory(disassemblyFactory("address"));
	setPercentSize(table, addressColumn, 1.0 / 5.0);
	table.getColumns().add(addressColumn);
	
	TableColumn<DisassemblyRow, String> instructionHexColumn = new TableColumn<>(
			"Instruction (Hex)");
	instructionHexColumn.setCellValueFactory(disassemblyFactory("instructionHex"));
	setPercentSize(table, instructionHexColumn, 1.0 / 5.0);
	table.getColumns().add(instructionHexColumn);
	
	TableColumn<DisassemblyRow, String> instructionStatementColumn = new TableColumn<>(
			"Instruction");
	instructionStatementColumn
			.setCellValueFactory(disassemblyFactory("instructionStatement"));
	setPercentSize(table, instructionStatementColumn, 1.0 / 5.0);
	table.getColumns().add(instructionStatementColumn);
	
	table.setItems(disassembly);
	return table;
}
 
開發者ID:dhawal9035,項目名稱:WebPLP,代碼行數:38,代碼來源:CpuWindow.java

示例6: createMemoryMapTabContent

import javafx.scene.control.TableView; //導入方法依賴的package包/類
private TableView<MemoryMapRow> createMemoryMapTabContent()
{
	TableView<MemoryMapRow> table = new TableView<>();
	table.setEditable(true);
	
	TableColumn<MemoryMapRow, String> indexColumn = new TableColumn<>("Index");
	indexColumn.setCellValueFactory(memoryMapFactory("index"));
	setPercentSize(table, indexColumn, 1.0 / 5.0);
	table.getColumns().add(indexColumn);
	
	TableColumn<MemoryMapRow, String> moduleNameColumn = new TableColumn<>(
			"Module Name");
	moduleNameColumn.setCellValueFactory(memoryMapFactory("moduleName"));
	setPercentSize(table, moduleNameColumn, 1.0 / 5.0);
	table.getColumns().add(moduleNameColumn);
	
	TableColumn<MemoryMapRow, String> startAddressColumn = new TableColumn<>(
			"Start Address");
	startAddressColumn.setCellValueFactory(memoryMapFactory("startAddress"));
	setPercentSize(table, startAddressColumn, 1.0 / 5.0);
	table.getColumns().add(startAddressColumn);
	
	TableColumn<MemoryMapRow, String> endAddressColumn = new TableColumn<>(
			"Instruction");
	endAddressColumn.setCellValueFactory(memoryMapFactory("endAddress"));
	setPercentSize(table, endAddressColumn, 1.0 / 5.0);
	table.getColumns().add(endAddressColumn);
	
	TableColumn<MemoryMapRow, CheckBox> enableColumn = new TableColumn<>("Enabled");
	enableColumn.setCellValueFactory(memoryMapFactoryCheckBox("enable"));
	setPercentSize(table, enableColumn, 1.0 / 5.0);
	table.getColumns().add(enableColumn);
	
	table.setItems(memoryMap);
	return table;
}
 
開發者ID:dhawal9035,項目名稱:WebPLP,代碼行數:37,代碼來源:CpuWindow.java

示例7: initTabProcesses

import javafx.scene.control.TableView; //導入方法依賴的package包/類
private Node initTabProcesses() {
	userProcessesList = FXCollections.observableArrayList();
	allProcessesList = FXCollections.observableArrayList();
       
	ProcessesUtil.getProcesses(allProcessesList, true);
       ProcessesUtil.getProcesses(userProcessesList, false);
       
       TableColumn pidCol = new TableColumn("PID");
       TableColumn nameCol = new TableColumn("Nome do processo");
	TableColumn userCol = new TableColumn("Usuário");
       TableColumn cpuCol = new TableColumn("CPU (%)");
	TableColumn memCol = new TableColumn("Memória (%)");
       
       pidCol.setCellValueFactory(
           new PropertyValueFactory<>("pid")
       );
	
	nameCol.setCellValueFactory(
           new PropertyValueFactory<>("readableName")
       );
	
	userCol.setCellValueFactory(
           new PropertyValueFactory<>("user")
       );
	
       cpuCol.setCellValueFactory(
           new PropertyValueFactory<>("CPU")
       );
	
	memCol.setCellValueFactory(
           new PropertyValueFactory<>("MEM")
       );
	
       viewProcesses = new TableView();
       viewProcesses.setEditable(false);
       viewProcesses.getColumns().addAll(pidCol, nameCol, userCol, cpuCol, memCol);
       viewProcesses.setItems(userProcessesList);
       
       viewProcesses.setOnMousePressed(mouseEventHandler);
       
       checkBoxAllProcesses = new CheckBox("Processos de todos usuários");
       checkBoxAllProcesses.setOnAction(actionEventHandler);
       
       inputFilter = new TextField();
	inputFilter.textProperty().addListener(this);
	
	Label labelFilter = new Label("Filtrar:");
	labelFilter.setPadding(new Insets(0, 10, 0, 0));
       
	HBox hBoxFilter = new HBox(labelFilter, inputFilter);
	hBoxFilter.setAlignment(Pos.BASELINE_RIGHT);
	HBox.setHgrow(hBoxFilter, Priority.ALWAYS); 
	
       HBox hBoxOptions = new HBox(checkBoxAllProcesses, hBoxFilter);
       hBoxOptions.setPrefWidth(prefWidth);
       hBoxOptions.setPadding(new Insets(10));
	
	return new VBox(viewProcesses, hBoxOptions);
}
 
開發者ID:dhiogoboza,項目名稱:SystemMonitorJFX,代碼行數:60,代碼來源:MainStage.java


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