当前位置: 首页>>代码示例>>Java>>正文


Java DataTableViewer类代码示例

本文整理汇总了Java中com.rapidminer.gui.viewer.DataTableViewer的典型用法代码示例。如果您正苦于以下问题:Java DataTableViewer类的具体用法?Java DataTableViewer怎么用?Java DataTableViewer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DataTableViewer类属于com.rapidminer.gui.viewer包,在下文中一共展示了DataTableViewer类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: startVisualization

import com.rapidminer.gui.viewer.DataTableViewer; //导入依赖的package包/类
@Override
public void startVisualization(Object id) {
	double[] weights = lastPopulation.get(id);

	SimpleDataTable dataTable = new SimpleDataTable("Attribute Weights", new String[] { "Attribute", "Weight" });
	int a = 0;
	for (Attribute attribute : exampleSet.getAttributes()) {
		dataTable
				.add(new SimpleDataTableRow(new double[] { dataTable.mapString(0, attribute.getName()), weights[a++] }));
	}

	Component visualizationComponent = new DataTableViewer(dataTable);
	JFrame frame = new JFrame();
	frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
	frame.getContentPane().setLayout(new BorderLayout());

	frame.getContentPane().add(new ExtendedJScrollPane(visualizationComponent), BorderLayout.CENTER);
	frame.setSize(600, 400);
	frame.setLocationRelativeTo(null);
	frame.setVisible(true);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:22,代码来源:PopulationPlotter.java

示例2: updateDataTables

import com.rapidminer.gui.viewer.DataTableViewer; //导入依赖的package包/类
/**
 * Update the DataTableViewers. This does not happen on the EDT and is executed asynchronously
 * by an {@link UpdateQueue}.
 */
private void updateDataTables() {
	final Collection<DataTable> copy = new LinkedList<>(dataTables.values());
	// this is time consuming, so execute off EDT
	tableUpdateQueue.execute(new Runnable() {

		@Override
		public void run() {
			final Collection<DataTableViewer> viewers = new LinkedList<>();
			for (DataTable table : copy) {
				viewers.add(new DataTableViewer(table, true, DataTableViewer.PLOT_MODE));
			}
			installDataTableViewers(viewers);
		}

		@Override
		public String toString() {
			return "Update data table list to size " + copy.size();
		}
	});
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:25,代码来源:DockableResultDisplay.java

示例3: updateDataTables

import com.rapidminer.gui.viewer.DataTableViewer; //导入依赖的package包/类
/**
 * Update the DataTableViewers. This does not happen on the EDT and is executed asynchronously
 * by an {@link UpdateQueue}.
 */
private void updateDataTables() {
	final Collection<DataTable> copy = new LinkedList<>(dataTables.values());
	// this is time consuming, so execute off EDT
	tableUpdateQueue.execute(new Runnable() {

		@Override
		public void run() {
			final Collection<DataTableViewer> viewers = new LinkedList<>();
			for (DataTable table : copy) {
				viewers.add(new DataTableViewer(table, true, DataTableViewer.TABLE_MODE));
			}
			installDataTableViewers(viewers);
		}

		@Override
		public String toString() {
			return "Update data table list to size " + copy.size();
		}
	});
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:25,代码来源:DockableResultDisplay.java

示例4: startVisualization

import com.rapidminer.gui.viewer.DataTableViewer; //导入依赖的package包/类
public void startVisualization(Object id) {
	double[] weights = lastPopulation.get(id);
	
	SimpleDataTable dataTable = new SimpleDataTable("Attribute Weights", new String[] { "Attribute", "Weight" });
	int a = 0;
	for (Attribute attribute : exampleSet.getAttributes()) {
		dataTable.add(new SimpleDataTableRow(new double[] { dataTable.mapString(0, attribute.getName()), weights[a++] } ));
	}
	
	Component visualizationComponent = new DataTableViewer(dataTable);
	JFrame frame = new JFrame();
	frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
	frame.getContentPane().setLayout(new BorderLayout());

	frame.getContentPane().add(new ExtendedJScrollPane(visualizationComponent), BorderLayout.CENTER);
	frame.setSize(600, 400);
	frame.setLocationRelativeTo(null);
	frame.setVisible(true);
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:20,代码来源:PopulationPlotter.java

示例5: updateDataTables

import com.rapidminer.gui.viewer.DataTableViewer; //导入依赖的package包/类
/** Update the DataTableViewers. This does not happen on the EDT 
 *  and is executed asynchronously by an {@link UpdateQueue}. */
private void updateDataTables(final Collection<DataTable> newTableList) {
	final Collection<DataTable> copy = new LinkedList<DataTable>(newTableList);
	// this is time consuming, so execute off EDT
	tableUpdateQueue.execute(new Runnable() {
		public void run() {
			final Collection<DataTableViewer> viewers = new LinkedList<DataTableViewer>();				
			for (DataTable table : copy) {					
				viewers.add(new DataTableViewer(table, true, DataTableViewer.PLOT_MODE));
			}				
			installDataTableViewers(viewers);								
		}
		@Override
		public String toString() {
			return "Update data table list to size "+copy.size();
		}
	});
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:20,代码来源:TabbedResultDisplay.java

示例6: installDataTableViewers

import com.rapidminer.gui.viewer.DataTableViewer; //导入依赖的package包/类
/** Adds the collection of components in the EDT (after removing the old tables. */
private void installDataTableViewers(final Collection<DataTableViewer> viewers) {
	SwingUtilities.invokeLater(new Runnable() {
		public void run() {
			for (int i = tabs.getTabCount() - 1; i >= 0; i--) {
				Component c = tabs.getComponentAt(i);
				if (c instanceof DataTableViewer) {		
					tabs.removeTabAt(i);
				}
			}
			int pos = 0;
			for (DataTableViewer viewer : viewers) {
				tabs.insertTab(viewer.getDataTable().getName(), dataTableIcon, viewer, "The data table '"+viewer.getDataTable().getName()+"'.", pos);
				pos++;
			}
		}
	});
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:19,代码来源:TabbedResultDisplay.java

示例7: updateDataTables

import com.rapidminer.gui.viewer.DataTableViewer; //导入依赖的package包/类
/** Update the DataTableViewers. This does not happen on the EDT 
 *  and is executed asynchronously by an {@link UpdateQueue}. */
private void updateDataTables() {
	final Collection<DataTable> copy = new LinkedList<DataTable>(dataTables.values());
	// this is time consuming, so execute off EDT
	tableUpdateQueue.execute(new Runnable() {
		public void run() {
			final Collection<DataTableViewer> viewers = new LinkedList<DataTableViewer>();				
			for (DataTable table : copy) {					
				viewers.add(new DataTableViewer(table, true, DataTableViewer.PLOT_MODE));
			}				
			installDataTableViewers(viewers);								
		}
		@Override
		public String toString() {
			return "Update data table list to size "+copy.size();
		}
	});
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:20,代码来源:DockableResultDisplay.java

示例8: setDataTableViewer

import com.rapidminer.gui.viewer.DataTableViewer; //导入依赖的package包/类
public void setDataTableViewer(DataTableViewer viewer) {
	if (viewer == this.viewer) {
		return;
	}
	if (this.viewer != null) {
		remove(this.viewer);
	}
	if (viewer != null) {
		this.viewer = viewer;
		dockKey.setName(viewer.getDataTable().getName());
	} else {
		this.viewer = makeTableNotRestoredLabel();
	}
	add(this.viewer, BorderLayout.CENTER);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:16,代码来源:ProcessLogTab.java

示例9: getDataTable

import com.rapidminer.gui.viewer.DataTableViewer; //导入依赖的package包/类
public DataTable getDataTable() {
	if (this.viewer != null && viewer instanceof DataTableViewer) {
		return ((DataTableViewer) this.viewer).getDataTable();
	} else {
		return null;
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:8,代码来源:ProcessLogTab.java

示例10: setDataTableViewer

import com.rapidminer.gui.viewer.DataTableViewer; //导入依赖的package包/类
public void setDataTableViewer(DataTableViewer viewer) {
	if (viewer == this.viewer) {
		return;
	}
	if (this.viewer != null) {
		remove(this.viewer);
	}
	if (viewer != null) {
		this.viewer = viewer;
		dockKey.setName(viewer.getDataTable().getName());
	} else {
		this.viewer = makeTableNotRestoredLabel();			
	}
	add(this.viewer, BorderLayout.CENTER);		
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:16,代码来源:ProcessLogTab.java

示例11: getDataTable

import com.rapidminer.gui.viewer.DataTableViewer; //导入依赖的package包/类
public DataTable getDataTable() {
	if ((this.viewer != null) && (viewer instanceof DataTableViewer)) {
		return ((DataTableViewer)this.viewer).getDataTable();
	} else {
		return null;
	}
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:8,代码来源:ProcessLogTab.java

示例12: clearResults

import com.rapidminer.gui.viewer.DataTableViewer; //导入依赖的package包/类
private void clearResults() {		
	SwingUtilities.invokeLater(new Runnable() {
		public void run() {
			for (int i = tabs.getTabCount() - 1; i >= 0; i--) {
				Component c = tabs.getComponentAt(i);
				if (!(c instanceof DataTableViewer)) {
					tabs.removeTabAt(i);
				}
			}				
		}
	});
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:13,代码来源:TabbedResultDisplay.java


注:本文中的com.rapidminer.gui.viewer.DataTableViewer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。