本文整理汇总了Java中com.rapidminer.parameter.ParameterTypeText类的典型用法代码示例。如果您正苦于以下问题:Java ParameterTypeText类的具体用法?Java ParameterTypeText怎么用?Java ParameterTypeText使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ParameterTypeText类属于com.rapidminer.parameter包,在下文中一共展示了ParameterTypeText类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getParameterTypes
import com.rapidminer.parameter.ParameterTypeText; //导入依赖的package包/类
@Override
public List<ParameterType> getParameterTypes() {
List<ParameterType> types = super.getParameterTypes();
ParameterType type = new ParameterTypeText(PARAMETER_SCRIPT, "The script to execute.", TextType.GROOVY, false);
type.setExpert(false);
type.setDefaultValue("/* \n" + " * You can use both Java and Groovy syntax in this script.\n"
+ " * \n * Note that you have access to the following two predefined variables:\n"
+ " * 1) input (an array of all input data)\n"
+ " * 2) operator (the operator instance which is running this script)\n" + " */\n" + "\n"
+ "// Take first input data and treat it as generic IOObject\n"
+ "// Alternatively, you could treat it as an ExampleSet if it is one:\n"
+ "// ExampleSet inputData = input[0];\n" + "IOObject inputData = input[0];\n" + "\n\n"
+ "// You can add any code here\n" + "\n" + "\n"
+ "// This line returns the first input as the first output\n" + "return inputData;");
types.add(type);
types.add(new ParameterTypeBoolean(PARAMETER_STANDARD_IMPORTS,
"Indicates if standard imports for examples and attributes etc. should be automatically generated.", true));
return types;
}
示例2: getParameterTypes
import com.rapidminer.parameter.ParameterTypeText; //导入依赖的package包/类
@Override
public List<ParameterType> getParameterTypes() {
List<ParameterType> types = super.getParameterTypes();
types.addAll(DatabaseHandler.getConnectionParameterTypes(this));
// ParameterType type = new ParameterTypeCategory(PARAMETER_DATABASE_SYSTEM, "Indicates the used database system", DatabaseService.getDBSystemNames(), 0);
// type.setExpert(false);
// types.add(type);
//
// types.add(new ParameterTypeString(PARAMETER_DATABASE_URL, "The complete URL connection string for the database, e.g. 'jdbc:mysql://foo.bar:portnr/database'", false, false));
// types.add(new ParameterTypeString(PARAMETER_USERNAME, "Database username.", false, false));
// type = new ParameterTypePassword(PARAMETER_PASSWORD, "Password for the database.");
// type.setExpert(false);
// types.add(type);
ParameterType type = new ParameterTypeText(PARAMETER_QUERY, "SQL query. If not set, the query is read from the file specified by 'query_file'.", TextType.SQL);
type.setExpert(false);
types.add(type);
types.add(new ParameterTypeFile(PARAMETER_QUERY_FILE, "File containing the query. Only evaluated if 'query' is not set.", null, true));
types.addAll(DatabaseHandler.getStatementPreparationParamterTypes(this));
return types;
}
示例3: getParameterTypes
import com.rapidminer.parameter.ParameterTypeText; //导入依赖的package包/类
public List<ParameterType> getParameterTypes() {
List types = super.getParameterTypes();
types.addAll(DatabaseHandler.getConnectionParameterTypes(this));
ParameterTypeText type = new ParameterTypeText("query", "SQL query. If not set, the query is read from the file specified by \'query_file\'.", TextType.SQL);
type.setExpert(false);
types.add(type);
types.add(new ParameterTypeFile("query_file", "File containing the query. Only evaluated if \'query\' is not set.", (String)null, true));
types.addAll(DatabaseHandler.getStatementPreparationParamterTypes(this));
return types;
}
示例4: getParameterTypes
import com.rapidminer.parameter.ParameterTypeText; //导入依赖的package包/类
@Override
public List<ParameterType> getParameterTypes() {
List<ParameterType> types = super.getParameterTypes();
ParameterType type = new ParameterTypeText(PARAMETER_SCRIPT, "The script to execute.", TextType.GROOVY, false);
type.setExpert(false);
types.add(type);
types.add(new ParameterTypeBoolean(PARAMETER_STANDARD_IMPORTS,
"Indicates if standard imports for examples and attributes etc. should be automatically generated.", true));
return types;
}
示例5: getParameterTypes
import com.rapidminer.parameter.ParameterTypeText; //导入依赖的package包/类
@Override
public List<ParameterType> getParameterTypes() {
List<ParameterType> types = super.getParameterTypes();
ParameterType type = new ParameterTypeText(PARAMETER_SCRIPT, "The script to execute.", TextType.JAVA, false);
type.setExpert(false);
types.add(type);
types.add(new ParameterTypeBoolean(PARAMETER_STANDARD_IMPORTS, "Indicates if standard imports for examples and attributes etc. should be automatically generated.", true));
return types;
}
示例6: TextPropertyDialog
import com.rapidminer.parameter.ParameterTypeText; //导入依赖的package包/类
public TextPropertyDialog(final ParameterTypeText type, String text, Operator operator) {
super(type, "text");
this.text = text;
ResourceAction resizeAction = new ResourceAction(true, "text_dialog.enlarge") {
private static final long serialVersionUID = 8857840715142145951L;
@Override
public void actionPerformed(ActionEvent e) {
Dimension screenDim = Toolkit.getDefaultToolkit().getScreenSize();
Dimension dim = new Dimension((int)(screenDim.width * 0.9), (int)(screenDim.height* 0.9));
Dimension currentSize = getSize();
if (currentSize.getHeight() != dim.getHeight() && currentSize.getWidth() != dim.getWidth()) {
setSize(dim);
setLocationRelativeTo(null);
resizeButton.setText(I18N.getMessage(I18N.getGUIBundle(), "gui.action.text_dialog.shrink.label"));
resizeButton.setToolTipText(I18N.getMessage(I18N.getGUIBundle(), "gui.action.text_dialog.shrink.tip"));
resizeButton.setMnemonic(I18N.getMessage(I18N.getGUIBundle(), "gui.action.text_dialog.shrink.mne").charAt(0));
} else {
setSize(getDefaultSize(NORMAL));
setDefaultLocation();
resizeButton.setText(I18N.getMessage(I18N.getGUIBundle(), "gui.action.text_dialog.enlarge.label"));
resizeButton.setToolTipText(I18N.getMessage(I18N.getGUIBundle(), "gui.action.text_dialog.enlarge.tip"));
resizeButton.setMnemonic(I18N.getMessage(I18N.getGUIBundle(), "gui.action.text_dialog.enlarge.mne").charAt(0));
}
}
};
resizeButton = new JButton(resizeAction);
textArea.setDocument(new RSyntaxDocument(type.getTextType().getSyntaxIdentifier()));
textArea.setText(text);
textArea.setAnimateBracketMatching(type.getTextType().isBracketMatching());
textArea.setAutoIndentEnabled(type.getTextType().isAutoIntending());
textArea.setAutoscrolls(true);
layoutDefault(new RTextScrollPane(textArea), NORMAL, resizeButton, makeOkButton("text_property_dialog_apply"), makeCancelButton());
textArea.requestFocusInWindow();
}
示例7: TextValueCellEditor
import com.rapidminer.parameter.ParameterTypeText; //导入依赖的package包/类
public TextValueCellEditor(ParameterTypeText type) {
this.type = type;
button.setMargin(new java.awt.Insets(0, 0, 0, 0));
button.setToolTipText(type.getDescription());
setButtonText();
}
示例8: TextValueCellEditor
import com.rapidminer.parameter.ParameterTypeText; //导入依赖的package包/类
public TextValueCellEditor(ParameterTypeText type) {
this.type = type;
button.setMargin(new java.awt.Insets(0, 0, 0, 0));
button.setToolTipText(type.getDescription());
setButtonText();
}