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


Java ResultObject.getName方法代码示例

本文整理汇总了Java中com.rapidminer.operator.ResultObject.getName方法的典型用法代码示例。如果您正苦于以下问题:Java ResultObject.getName方法的具体用法?Java ResultObject.getName怎么用?Java ResultObject.getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.rapidminer.operator.ResultObject的用法示例。


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

示例1: getTreeCellRendererComponent

import com.rapidminer.operator.ResultObject; //导入方法依赖的package包/类
@Override
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf,
		int row, boolean hasFocus) {
	JLabel label = (JLabel) super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
	CollectionTreeElement treeElement = (CollectionTreeElement) value;
	IOObject ioobject = treeElement.getIOObject();
	if (ioobject instanceof ResultObject) {
		ResultObject ro = (ResultObject) ioobject;
		String name = childNames.get(ro);
		if (name == null) {
			name = ro.getName();
		}
		String source = ro.getSource() != null ? " (<small>" + ro.getSource() + "</small>)" : "";
		label.setText("<html>" + name + source + "</html>");
		if (ro instanceof IOObjectCollection) {
			label.setIcon(expanded ? ICON_FOLDER_OPEN : ICON_FOLDER_CLOSED);
		} else {
			Icon resultIcon = ro.getResultIcon();
			label.setIcon(resultIcon);
		}
	} else if (ioobject instanceof IOObject) {
		IOObject ioo = ioobject;
		label.setText(ioo.getClass().getSimpleName());
	}
	return label;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:27,代码来源:CollectionTreeCellRenderer.java

示例2: createComponent

import com.rapidminer.operator.ResultObject; //导入方法依赖的package包/类
private JPanel createComponent(ResultObject resultObject, IOContainer resultContainer) {
	final String resultName = RendererService.getName(resultObject.getClass());
	String usedResultName = resultObject.getName();
	if (usedResultName == null) {
		usedResultName = resultName;
	}
	synchronized (currentResultNames) {
		Integer oldCount = currentResultNames.get(usedResultName);
		int myIndex;
		if (oldCount == null) {
			myIndex = 1;			
		} else {
			myIndex = oldCount+1;						
		}
		currentResultNames.put(usedResultName, myIndex);
		if (myIndex > 1) {
			usedResultName += "(" + myIndex + ")";
		}
	}
	return ResultDisplayTools.createVisualizationComponent(resultObject, resultContainer, usedResultName);
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:22,代码来源:TabbedResultDisplay.java

示例3: getTreeCellRendererComponent

import com.rapidminer.operator.ResultObject; //导入方法依赖的package包/类
@Override
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
	JLabel label = (JLabel)super.getTreeCellRendererComponent(tree, value, selected, expanded, leaf, row, hasFocus);
	if (value instanceof ResultObject) {
		ResultObject ro = (ResultObject) value;
		String name = childNames.get(ro);
		if (name == null) {
			name = ro.getName();
		}
		label.setText("<html>" + name + " (<small>"+ro.getSource()+"</small>)</html>");			
		if (ro instanceof IOObjectCollection) {
			label.setIcon(expanded ? ICON_FOLDER_OPEN : ICON_FOLDER_CLOSED);
		} else {
			Icon resultIcon = ro.getResultIcon();
			label.setIcon(resultIcon);
		}
	} else if (value instanceof IOObject) {
		IOObject ioo = (IOObject) value;			
		label.setText(ioo.getClass().getSimpleName());
	} 
	return label;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:23,代码来源:CollectionTreeCellRenderer.java

示例4: createComponent

import com.rapidminer.operator.ResultObject; //导入方法依赖的package包/类
/**
 * Creates an appropriate name, appending a number to make names unique, and calls
 * {@link #createVisualizationComponent(IOObject, IOContainer, String)}.
 */
private JPanel createComponent(ResultObject resultObject, IOContainer resultContainer) {
	final String resultName = RendererService.getName(resultObject.getClass());
	String usedResultName = resultObject.getName();
	if (usedResultName == null) {
		usedResultName = resultName;
	}
	this.resultObject = resultObject;
	return ResultDisplayTools.createVisualizationComponent(resultObject, resultContainer, id + ": " + usedResultName);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:14,代码来源:ResultTab.java

示例5: createComponent

import com.rapidminer.operator.ResultObject; //导入方法依赖的package包/类
/** Creates an appropriate name, appending a number to make names unique, and calls 
 *  {@link #createVisualizationComponent(IOObject, IOContainer, String)}. */
private JPanel createComponent(ResultObject resultObject, IOContainer resultContainer) {
	final String resultName = RendererService.getName(resultObject.getClass());
	String usedResultName = resultObject.getName();
	if (usedResultName == null) {
		usedResultName = resultName;
	}
	return ResultDisplayTools.createVisualizationComponent(resultObject, resultContainer, id + ": "+usedResultName);
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:11,代码来源:ResultTab.java


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