本文整理汇总了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;
}
示例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);
}
示例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;
}
示例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);
}
示例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);
}