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


Java ParameterTypeAttributes类代码示例

本文整理汇总了Java中com.rapidminer.parameter.ParameterTypeAttributes的典型用法代码示例。如果您正苦于以下问题:Java ParameterTypeAttributes类的具体用法?Java ParameterTypeAttributes怎么用?Java ParameterTypeAttributes使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: getParameterTypes

import com.rapidminer.parameter.ParameterTypeAttributes; //导入依赖的package包/类
@Override
public List<ParameterType> getParameterTypes() {
	List<ParameterType> types = super.getParameterTypes();

	types.add(new ParameterTypeAttributes(PARAMETER_FIRST_ATTRIBUTE_NAME,
			"The name(s) of the first attribute to be multiplied.", getExampleSetInputPort(), false, Ontology.NUMERICAL));
	types.add(new ParameterTypeAttributes(PARAMETER_SECOND_ATTRIBUTE_NAME,
			"The name(s) of the second attribute to be multiplied.", getExampleSetInputPort(), false, Ontology.NUMERICAL));
	return types;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:11,代码来源:ProductGenerationOperator.java

示例2: getParameterTypes

import com.rapidminer.parameter.ParameterTypeAttributes; //导入依赖的package包/类
@Override
public List<ParameterType> getParameterTypes() {
	List<ParameterType> types = super.getParameterTypes();
	ParameterType type = new ParameterTypeAttributes(PARAMETER_ATTRIBUTES,
			"Defines the attributes which should be used for the sorting.", getExampleSetInputPort(), false);
	type.setExpert(false);
	types.add(type);
	return types;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:10,代码来源:NonDominatedSorting.java

示例3: getParameterTypes

import com.rapidminer.parameter.ParameterTypeAttributes; //导入依赖的package包/类
@Override
public List<ParameterType> getParameterTypes(ParameterHandler operator, final InputPort inPort, int... valueTypes) {
	List<ParameterType> types = new LinkedList<ParameterType>();
	ParameterType type = new ParameterTypeAttributes(PARAMETER_ATTRIBUTES, "The attribute which should be chosen.",
			inPort, valueTypes);
	type.setExpert(false);
	types.add(type);
	return types;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:10,代码来源:SubsetAttributeFilter.java

示例4: displayAttributeNotFoundParameterInformation

import com.rapidminer.parameter.ParameterTypeAttributes; //导入依赖的package包/类
/**
 * Displays an information bubble that alerts the user that the attribute specified in the
 * operator parameters was not found. The bubble is located at the operator and the process view
 * will change to said operator. This method is used after the error occurred during process
 * execution.
 *
 * @param error
 *            the error containing all the information about the operator, the parameter and the
 *            name of the attribute which was not found
 * @param i18nKey
 *            the i18n key which defines the title, text and button label for the bubble. Format
 *            is "gui.bubble.{i18nKey}.title", "gui.bubble.{i18nKey}.body" and
 *            "gui.bubble.{i18nKey}.button.label".
 * @param isError
 *            if {@code true}, an error bubble will be shown; otherwise a warning bubble is
 *            displayed
 * @param arguments
 *            optional i18n arguments
 * @return the {@link OperatorInfoBubble} instance, never {@code null}
 */
private static OperatorInfoBubble displayAttributeNotFoundParameterInformation(final AttributeNotFoundError error,
		final boolean isError, final String i18nKey, final Object... arguments) {
	final Operator op = error.getOperator();
	final ParameterType param = op.getParameterType(error.getKey());
	final JButton ackButton = new JButton(I18N.getGUIMessage("gui.bubble." + i18nKey + ".button.label", arguments));
	ackButton.setToolTipText(I18N.getGUIMessage("gui.bubble." + i18nKey + ".button.tip"));

	String decoratorKey = param instanceof CombinedParameterType || param instanceof ParameterTypeAttributes
			? "attributes_not_found_decoration" : "attribute_not_found_decoration";

	ParameterErrorBubbleBuilder builder = new ParameterErrorBubbleBuilder(RapidMinerGUI.getMainFrame(), op, param,
			decoratorKey, i18nKey, arguments);
	final ParameterErrorInfoBubble attributeNotFoundParameterBubble = builder.setHideOnDisable(true)
			.setAlignment(AlignedSide.BOTTOM).setStyle(isError ? BubbleStyle.ERROR : BubbleStyle.WARNING)
			.setEnsureVisible(true).hideCloseButton().setHideOnProcessRun(true)
			.setAdditionalComponents(new JComponent[] { ackButton }).build();

	ackButton.addActionListener(new ActionListener() {

		@Override
		public void actionPerformed(ActionEvent e) {
			attributeNotFoundParameterBubble.killBubble(true);
		}
	});

	attributeNotFoundParameterBubble.setVisible(true);
	return attributeNotFoundParameterBubble;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:49,代码来源:ProcessGUITools.java

示例5: getParameterTypes

import com.rapidminer.parameter.ParameterTypeAttributes; //导入依赖的package包/类
public List<ParameterType> getParameterTypes() {
    List<ParameterType> types = new LinkedList<>();
    types.add(new ParameterTypeBoolean(StringIndexerParams.autoTypeDetection(),
            "automatic type detection", false, false));
    ParameterType inputColumns = new ParameterTypeAttributes(StringIndexerParams.inputColumns(),
            "input column", getInputPort(), true, false);
    inputColumns.registerDependencyCondition(
            new BooleanParameterCondition(this, StringIndexerParams.autoTypeDetection(), false, false));
    types.add(inputColumns);
    return types;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:12,代码来源:StringIndexer.java

示例6: getParameterTypes

import com.rapidminer.parameter.ParameterTypeAttributes; //导入依赖的package包/类
public List<ParameterType> getParameterTypes() {
    List<ParameterType> types = new LinkedList<>();
    ParameterType inputColumns = new ParameterTypeAttributes(StandardScalerParams.inputColumns(),
            "input column", getInputPort(), true, false);

    types.add(inputColumns);

    return types;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:10,代码来源:MaxAbsScalerOp.java

示例7: getParameterTypes

import com.rapidminer.parameter.ParameterTypeAttributes; //导入依赖的package包/类
@Override
public List<ParameterType> getParameterTypes() {
	List<ParameterType> types = super.getParameterTypes();

	types.add(new ParameterTypeAttributes(PARAMETER_FIRST_ATTRIBUTE_NAME, "The name(s) of the first attribute to be multiplied.", getExampleSetInputPort(), false, Ontology.NUMERICAL));
	types.add(new ParameterTypeAttributes(PARAMETER_SECOND_ATTRIBUTE_NAME, "The name(s) of the second attribute to be multiplied.", getExampleSetInputPort(), false, Ontology.NUMERICAL));
	return types;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:9,代码来源:ProductGenerationOperator.java

示例8: getParameterTypes

import com.rapidminer.parameter.ParameterTypeAttributes; //导入依赖的package包/类
@Override
public List<ParameterType> getParameterTypes() {
	List<ParameterType> types = super.getParameterTypes();
	ParameterType type = new ParameterTypeAttributes(PARAMETER_ATTRIBUTES, "Defines the attributes which should be used for the sorting.", getExampleSetInputPort(), false);
	type.setExpert(false);
	types.add(type);
	return types;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:9,代码来源:NonDominatedSorting.java

示例9: getParameterTypes

import com.rapidminer.parameter.ParameterTypeAttributes; //导入依赖的package包/类
@Override
public List<ParameterType> getParameterTypes(ParameterHandler operator, final InputPort inPort, int...valueTypes) {
	List<ParameterType> types = new LinkedList<ParameterType>();
	ParameterType type = new ParameterTypeAttributes(PARAMETER_ATTRIBUTES, "The attribute which should be chosen.", inPort, valueTypes);
	type.setExpert(false);
	types.add(type);
	return types;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:9,代码来源:SubsetAttributeFilter.java

示例10: AttributesValueCellEditor

import com.rapidminer.parameter.ParameterTypeAttributes; //导入依赖的package包/类
public AttributesValueCellEditor(final ParameterTypeAttributes type) {
	this.button = new JButton(new ResourceAction(true, "attributes") {

		private static final long serialVersionUID = -4890375754223285831L;

		@Override
		public void actionPerformed(ActionEvent e) {
			LinkedList<String> preSelectedAttributeNames = new LinkedList<String>();
			String combinedNames = null;
			try {
				if (operator != null)
					combinedNames = operator.getParameter(type.getKey());
			} catch (UndefinedParameterError er) {}
			if (combinedNames != null) {
				for (String attributeName : combinedNames.split("\\|")) {
					preSelectedAttributeNames.add(attributeName);
				}
			}
			AttributesPropertyDialog dialog = new AttributesPropertyDialog(type, preSelectedAttributeNames);
			dialog.setVisible(true);
			if (dialog.isOk()) {
				StringBuilder builder = new StringBuilder();
				boolean first = true;
				Collection<String> attributeNames = dialog.getSelectedAttributeNames();
				for (String attributeName : attributeNames) {
					if (!first) {
						builder.append("|");
					}
					builder.append(attributeName);
					first = false;
				}
				attributeListString = builder.toString();
				fireEditingStopped();
			} else {
				fireEditingCanceled();
			}
		}
	});
	button.setMargin(new Insets(0, 0, 0, 0));
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:41,代码来源:AttributesValueCellEditor.java

示例11: AttributesValueCellEditor

import com.rapidminer.parameter.ParameterTypeAttributes; //导入依赖的package包/类
public AttributesValueCellEditor(final ParameterTypeAttributes type) {
	this.button = new JButton(new ResourceAction(true, "attributes") {

		private static final long serialVersionUID = -4890375754223285831L;

		@Override
		public void loggedActionPerformed(ActionEvent e) {
			LinkedList<String> preSelectedAttributeNames = new LinkedList<>();
			String combinedNames = null;
			try {
				if (operator != null) {
					combinedNames = operator.getParameters().getParameterAsSpecified(type.getKey());
					if (combinedNames == null) {
						throw new UndefinedParameterError(type.getKey(), operator);
					}
				}
			} catch (UndefinedParameterError er) {
			}
			if (combinedNames != null) {
				for (String attributeName : combinedNames.split(ParameterTypeAttributes.ATTRIBUTE_SEPARATOR_REGEX)) {
					preSelectedAttributeNames.add(attributeName);
				}
			}
			AttributesPropertyDialog dialog = new AttributesPropertyDialog(type, preSelectedAttributeNames);
			dialog.setVisible(true);
			if (dialog.isOk()) {
				StringBuilder builder = new StringBuilder();
				boolean first = true;
				Collection<String> attributeNames = dialog.getSelectedAttributeNames();
				for (String attributeName : attributeNames) {
					if (!first) {
						builder.append(ParameterTypeAttributes.ATTRIBUTE_SEPARATOR_CHARACTER);
					}
					builder.append(attributeName);
					first = false;
				}
				attributeListString = builder.toString();
				fireEditingStopped();
			} else {
				fireEditingCanceled();
			}
		}
	});
	button.setMargin(new Insets(0, 0, 0, 0));
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:46,代码来源:AttributesValueCellEditor.java


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