当前位置: 首页>>代码示例>>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;未经允许,请勿转载。