本文整理汇总了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;
}
示例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);
}
}
示例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;
}
示例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);
}
}
示例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);
}
}
示例6: getRepositoryActionCondition
import com.rapidminer.repository.RepositoryActionCondition; //导入依赖的package包/类
public RepositoryActionCondition getRepositoryActionCondition() {
return condition;
}
示例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;
}