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


Java ExtendedJComboBox.addItem方法代码示例

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


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

示例1: TransitionGraphCreator

import com.rapidminer.gui.tools.ExtendedJComboBox; //导入方法依赖的package包/类
public TransitionGraphCreator(TransitionGraph transitionGraph, ExampleSet exampleSet) {
		this.sourceAttribute = exampleSet.getAttributes().get(transitionGraph.getSourceAttribute());
		this.targetAttribute = exampleSet.getAttributes().get(transitionGraph.getTargetAttribute());
		if (transitionGraph.getStrengthAttribute() != null)
			this.strengthAttribute = exampleSet.getAttributes().get(transitionGraph.getStrengthAttribute());
		if (transitionGraph.getTypeAttribute() != null)
			this.typeAttribute = exampleSet.getAttributes().get(transitionGraph.getTypeAttribute());
		this.exampleSet = exampleSet;
		this.nodeDescription = transitionGraph.getNodeDescription();
		
		SortedSet<SourceId> sourceNames = new TreeSet<SourceId>();
//		Attribute idAttribute = exampleSet.getAttributes().getId();
		for (Example example : exampleSet) {
			Object id = example.getValue(sourceAttribute);
			if (sourceAttribute.isNominal())
				id = example.getValueAsString(sourceAttribute);
			String description = getNodeDescription(id);
			if (description == null) {
				sourceNames.add(new SourceId(id.toString(), id.toString()));
			} else {
				sourceNames.add(new SourceId(id.toString(), description));
			}
			
		}

		sourceFilter = new ExtendedJComboBox(200);
		sourceFilter.addItem(new SourceId("None", "None"));
		for (SourceId sourceId : sourceNames) {
			sourceFilter.addItem(sourceId);
		}
		
		objectViewer = new DefaultObjectViewer(exampleSet);
	}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:34,代码来源:TransitionGraphCreator.java

示例2: TransitionGraphCreator

import com.rapidminer.gui.tools.ExtendedJComboBox; //导入方法依赖的package包/类
public TransitionGraphCreator(TransitionGraph transitionGraph, ExampleSet exampleSet) {
	this.sourceAttribute = exampleSet.getAttributes().get(transitionGraph.getSourceAttribute());
	this.targetAttribute = exampleSet.getAttributes().get(transitionGraph.getTargetAttribute());
	if (transitionGraph.getStrengthAttribute() != null) {
		this.strengthAttribute = exampleSet.getAttributes().get(transitionGraph.getStrengthAttribute());
	}
	if (transitionGraph.getTypeAttribute() != null) {
		this.typeAttribute = exampleSet.getAttributes().get(transitionGraph.getTypeAttribute());
	}
	this.exampleSet = exampleSet;
	this.nodeDescription = transitionGraph.getNodeDescription();

	SortedSet<SourceId> sourceNames = new TreeSet<SourceId>();
	// Attribute idAttribute = exampleSet.getAttributes().getId();
	for (Example example : exampleSet) {
		Object id = example.getValue(sourceAttribute);
		if (sourceAttribute.isNominal()) {
			id = example.getValueAsString(sourceAttribute);
		}
		String description = getNodeDescription(id);
		if (description == null) {
			sourceNames.add(new SourceId(id.toString(), id.toString()));
		} else {
			sourceNames.add(new SourceId(id.toString(), description));
		}

	}

	sourceFilter = new ExtendedJComboBox(200);
	sourceFilter.putClientProperty(RapidLookTools.PROPERTY_INPUT_BACKGROUND_DARK, true);
	sourceFilter.setPreferredSize(new Dimension(sourceFilter.getPreferredSize().width,
			PropertyPanel.VALUE_CELL_EDITOR_HEIGHT));
	sourceFilter.addItem(new SourceId("None", "None"));
	for (SourceId sourceId : sourceNames) {
		sourceFilter.addItem(sourceId);
	}

	this.numberOfHops = new JSpinner(new SpinnerNumberModel(1, 1, Integer.MAX_VALUE, 1));
	this.numberOfHops.setPreferredSize(new Dimension(this.numberOfHops.getPreferredSize().width,
			PropertyPanel.VALUE_CELL_EDITOR_HEIGHT));

	objectViewer = new DefaultObjectViewer(exampleSet);
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:44,代码来源:TransitionGraphCreator.java


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