當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。