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


Java RepositoryActionCondition类代码示例

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


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

示例1: RepositoryActionEntry

import com.rapidminer.repository.RepositoryActionCondition; //导入依赖的package包/类
public RepositoryActionEntry(Class<? extends AbstractRepositoryAction> actionClass,
		RepositoryActionCondition condition, boolean hasSeparatorBefore, boolean hasSeparatorAfter) {
	this.actionClass = actionClass;
	this.condition = condition;
	this.hasSeparatorAfter = hasSeparatorAfter;
	this.hasSeparatorBefore = hasSeparatorBefore;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:8,代码来源:RepositoryTree.java

示例2: addRepositoryAction

import com.rapidminer.repository.RepositoryActionCondition; //导入依赖的package包/类
/**
 * Adds the given {@link AbstractRepositoryAction} extending class to the popup menu actions at
 * the given index.
 * <p>
 * The class <b>MUST</b> have one public constructor taking only a RepositoryTree. </br>
 * Example: public MyNewRepoAction(RepositoryTree tree) { ... } </br>
 * Otherwise creating the action via reflection will fail.
 *
 * @param actionClass
 *            the class extending {@link AbstractRepositoryAction}
 * @param condition
 *            the {@link RepositoryActionCondition} which determines on which selected entries
 *            the action will be visible.
 * @param insertAfterThisAction
 *            the class of the action after which the new action should be inserted. Set to
 *            {@code null} to append the action at the end.
 * @param hasSeparatorBefore
 *            if true, a separator will be added before the action
 * @param hasSeparatorAfter
 *            if true, a separator will be added after the action
 * @return true if the action was successfully added; false otherwise
 */
public static void addRepositoryAction(Class<? extends AbstractRepositoryAction> actionClass,
		RepositoryActionCondition condition, Class<? extends Action> insertAfterThisAction, boolean hasSeparatorBefore,
		boolean hasSeparatorAfter) {
	if (actionClass == null || condition == null) {
		throw new IllegalArgumentException("actionClass and condition must not be null!");
	}

	RepositoryActionEntry newEntry = new RepositoryActionEntry(actionClass, condition, hasSeparatorBefore,
			hasSeparatorAfter);
	if (insertAfterThisAction == null) {
		REPOSITORY_ACTIONS.add(newEntry);
	} else {
		// searching for class to insert after
		boolean inserted = false;
		int i = 0;
		for (RepositoryActionEntry entry : REPOSITORY_ACTIONS) {
			Class<? extends Action> existingAction = entry.getRepositoryActionClass();
			if (existingAction.equals(insertAfterThisAction)) {
				REPOSITORY_ACTIONS.add(i + 1, newEntry);
				inserted = true;
				break;
			}
			i++;
		}

		// if reference couldn't be found: just add as last
		if (!inserted) {
			REPOSITORY_ACTIONS.add(newEntry);
		}
	}

	// add action instances for multiple entires
	if (multipleMenuEntriesActionClasses.contains(actionClass.getName())) {
		REPOSITORY_MULTIPLE_ENTRIES_ACTIONS.add(newEntry);
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:59,代码来源:RepositoryTree.java

示例3: RepositoryActionEntry

import com.rapidminer.repository.RepositoryActionCondition; //导入依赖的package包/类
public RepositoryActionEntry(Class<? extends AbstractRepositoryAction<?>> actionClass,
		RepositoryActionCondition condition, boolean hasSeparatorBefore, boolean hasSeparatorAfter) {
	this.actionClass = actionClass;
	this.condition = condition;
	this.hasSeparatorAfter = hasSeparatorAfter;
	this.hasSeparatorBefore = hasSeparatorBefore;
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:8,代码来源:RepositoryTree.java

示例4: addRepositoryAction

import com.rapidminer.repository.RepositoryActionCondition; //导入依赖的package包/类
/**
 * Adds the given {@link AbstractRepositoryAction} extending class to the popup menu actions at
 * the given index.
 * <p>
 * The class <b>MUST</b> have one public constructor taking only a RepositoryTree. </br>
 * Example: public MyNewRepoAction(RepositoryTree tree) { ... } </br>
 * Otherwise creating the action via reflection will fail.
 *
 * @param actionClass
 *            the class extending {@link AbstractRepositoryAction}
 * @param condition
 *            the {@link RepositoryActionCondition} which determines on which selected entries
 *            the action will be visible.
 * @param insertAfterThisAction
 *            the class of the action after which the new action should be inserted. Set to
 *            {@code null} to append the action at the end.
 * @param hasSeparatorBefore
 *            if true, a separator will be added before the action
 * @param hasSeparatorAfter
 *            if true, a separator will be added after the action
 * @return true if the action was successfully added; false otherwise
 */
public static void addRepositoryAction(Class<? extends AbstractRepositoryAction<?>> actionClass,
		RepositoryActionCondition condition, Class<? extends Action> insertAfterThisAction, boolean hasSeparatorBefore,
		boolean hasSeparatorAfter) {
	if (actionClass == null || condition == null) {
		throw new IllegalArgumentException("actionClass and condition must not be null!");
	}

	RepositoryActionEntry newEntry = new RepositoryActionEntry(actionClass, condition, hasSeparatorBefore,
			hasSeparatorAfter);
	if (insertAfterThisAction == null) {
		REPOSITORY_ACTIONS.add(newEntry);
	} else {
		// searching for class to insert after
		boolean inserted = false;
		int i = 0;
		for (RepositoryActionEntry entry : REPOSITORY_ACTIONS) {
			Class<? extends Action> existingAction = entry.getRepositoryActionClass();
			if (existingAction.equals(insertAfterThisAction)) {
				REPOSITORY_ACTIONS.add(i + 1, newEntry);
				inserted = true;
				break;
			}
			i++;
		}

		// if reference couldn't be found: just add as last
		if (!inserted) {
			REPOSITORY_ACTIONS.add(newEntry);
		}
	}

	// add action instances for multiple entires
	if (multipleMenuEntriesActionClasses.contains(actionClass.getName())) {
		REPOSITORY_MULTIPLE_ENTRIES_ACTIONS.add(newEntry);
	}
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:59,代码来源:RepositoryTree.java

示例5: addRepositoryAction

import com.rapidminer.repository.RepositoryActionCondition; //导入依赖的package包/类
/**
 * Adds the given {@link AbstractRepositoryAction} extending class to the popup menu actions at the given index.
 * <p>The class <b>MUST</b> have one public constructor taking only a RepositoryTree.
 * </br>Example: public MyNewRepoAction(RepositoryTree tree) { ... }
 * </br>Otherwise creating the action via reflection will fail.
 * 
 * @param actionClass the class extending {@link AbstractRepositoryAction}
 * @param condition the {@link RepositoryActionCondition} which determines on which selected entries the action will be visible.
 * @param insertAfterThisAction the class of the action after which the new action should be inserted. Set to {@code null} to append the action at the end.
 * @param hasSeparatorBefore if true, a separator will be added before the action
 * @param hasSeparatorAfter if true, a separator will be added after the action
 * @return true if the action was successfully added; false otherwise
 */
public static void addRepositoryAction(Class<? extends AbstractRepositoryAction> actionClass, RepositoryActionCondition condition, Class<? extends Action> insertAfterThisAction, boolean hasSeparatorBefore, boolean hasSeparatorAfter) {
	if (actionClass == null || condition == null) {
		throw new IllegalArgumentException("actionClass and condition must not be null!");
	}

	RepositoryActionEntry newEntry = new RepositoryActionEntry(actionClass, condition, hasSeparatorBefore, hasSeparatorAfter);
	if (insertAfterThisAction == null) {
		REPOSITORY_ACTIONS.add(newEntry);
	} else {
		// searching for class to insert after
		boolean inserted = false;
		int i = 0;
		for (RepositoryActionEntry entry : REPOSITORY_ACTIONS) {
			Class<? extends Action> existingAction = entry.getRepositoryActionClass();
			if (existingAction.equals(insertAfterThisAction)) {
				REPOSITORY_ACTIONS.add(i + 1, newEntry);
				inserted = true;
				break;
			}
			i++;
		}

		// if reference couldn't be found: just add as last
		if (!inserted)
			REPOSITORY_ACTIONS.add(newEntry);
	}
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:41,代码来源:RepositoryTree.java

示例6: getRepositoryActionCondition

import com.rapidminer.repository.RepositoryActionCondition; //导入依赖的package包/类
public RepositoryActionCondition getRepositoryActionCondition() {
	return condition;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:4,代码来源:RepositoryTree.java

示例7: RepositoryActionEntry

import com.rapidminer.repository.RepositoryActionCondition; //导入依赖的package包/类
public RepositoryActionEntry(Class<? extends AbstractRepositoryAction> actionClass, RepositoryActionCondition condition, boolean hasSeparatorBefore, boolean hasSeparatorAfter) {
	this.actionClass = actionClass;
	this.condition = condition;
	this.hasSeparatorAfter = hasSeparatorAfter;
	this.hasSeparatorBefore = hasSeparatorBefore;
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:7,代码来源:RepositoryTree.java


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