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


Java ToggleAction类代码示例

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


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

示例1: SortByAction

import com.rapidminer.gui.actions.ToggleAction; //导入依赖的package包/类
public SortByAction(String i18n, RepositoryTree tree, RepositorySortingMethod method) {
	super(true, i18n);
	this.tree = tree;
	this.method = method;
	ToggleAction thisAction = this;
	if (tree.getSortingMethod() != method) {
		this.setSelected(false);
	} else {
		this.setSelected(true);
	}
	tree.addRepostorySortingMethodListener(new RepositorySortingMethodListener() {

		@Override
		public void changedRepositorySortingMethod(RepositorySortingMethod changedToMethod) {
			if (changedToMethod != method) {
				thisAction.setSelected(false);
			} else {
				thisAction.setSelected(true);
			}
		}
	});
}
 
开发者ID:rapidminer,项目名称:rapidminer-studio,代码行数:23,代码来源:SortByAction.java

示例2: ToggleDropDownButton

import com.rapidminer.gui.actions.ToggleAction; //导入依赖的package包/类
public ToggleDropDownButton(Action action){
	super(action);
	if (action instanceof ToggleAction) {
		((ToggleAction) action).addToggleActionListener(this);
	}
	mainButton.setText(null);
	mainButton.setOpaque(false);
	mainButton.setBorderPainted(false);
	mainButton.setMargin(new Insets(0,0,0,0));
	mainButton.getModel().addChangeListener(changeListener);
	arrowButton.getModel().addChangeListener(changeListener);
	arrowButton.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent ae){ 
			JPopupMenu popup = getPopupMenu(); 
			popup.addPopupMenuListener(popupMenuListener); 
			popup.show(mainButton, 0, mainButton.getHeight()); 
		}		
	}); 
	arrowButton.setMargin(new Insets(0, 0, 0, 0)); 
	mainButton.addPropertyChangeListener("enabled", new PropertyChangeListener() {
		public void propertyChange(PropertyChangeEvent evt){ 
			arrowButton.setEnabled(mainButton.isEnabled()); 
		} 
	}); 
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:26,代码来源:ToggleDropDownButton.java

示例3: ToggleDropDownButton

import com.rapidminer.gui.actions.ToggleAction; //导入依赖的package包/类
public ToggleDropDownButton(Action action) {
	super(action);
	if (action instanceof ToggleAction) {
		((ToggleAction) action).addToggleActionListener(this);
	}
	mainButton.setText(null);
	mainButton.setOpaque(false);
	mainButton.setBorderPainted(false);
	mainButton.setMargin(new Insets(0, 0, 0, 0));
	mainButton.getModel().addChangeListener(changeListener);
	arrowButton.getModel().addChangeListener(changeListener);
	arrowButton.addActionListener(new ActionListener() {

		@Override
		public void actionPerformed(ActionEvent ae) {
			JPopupMenu popup = getPopupMenu();
			popup.addPopupMenuListener(popupMenuListener);
			popup.show(mainButton, 0, mainButton.getHeight());
		}
	});
	arrowButton.setMargin(new Insets(0, 0, 0, 0));
	mainButton.addPropertyChangeListener("enabled", new PropertyChangeListener() {

		@Override
		public void propertyChange(PropertyChangeEvent evt) {
			arrowButton.setEnabled(mainButton.isEnabled());
		}
	});
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:30,代码来源:ToggleDropDownButton.java

示例4: makeDropDownButton

import com.rapidminer.gui.actions.ToggleAction; //导入依赖的package包/类
public static ToggleDropDownButton makeDropDownButton(ToggleAction mainAction, Action... actions) {
	final JPopupMenu menu = new JPopupMenu();
	for (Action action : actions) {
		menu.add(action);
	}
	return new ToggleDropDownButton(mainAction) {

		private static final long serialVersionUID = -7359018188605409766L;

		@Override
		protected JPopupMenu getPopupMenu() {
			return menu;
		}
	};
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:16,代码来源:ToggleDropDownButton.java

示例5: makeDropDownButton

import com.rapidminer.gui.actions.ToggleAction; //导入依赖的package包/类
public static ToggleDropDownButton makeDropDownButton(ToggleAction mainAction, Action ... actions) {
	final JPopupMenu menu = new JPopupMenu();
	for (Action action : actions) {
		menu.add(action);
	}		
	return new ToggleDropDownButton(mainAction) {
		private static final long serialVersionUID = -7359018188605409766L;

		@Override
		protected JPopupMenu getPopupMenu() {
			return menu;
		}
	};
}
 
开发者ID:rapidminer,项目名称:rapidminer-5,代码行数:15,代码来源:ToggleDropDownButton.java

示例6: getToggleAnnotationsAction

import com.rapidminer.gui.actions.ToggleAction; //导入依赖的package包/类
/**
 * Returns the toggle action for workflow annotations.
 *
 * @return the action, never {@code null}
 */
public ToggleAction getToggleAnnotationsAction() {
	return toggleAnnotations;
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:9,代码来源:AnnotationsVisualizer.java


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