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