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


Java CommandStackListener类代码示例

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


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

示例1: init

import org.eclipse.gef.commands.CommandStackListener; //导入依赖的package包/类
public void init(IViewPart view)
{
  IActionBars actionBars = view.getViewSite().getActionBars();
  IToolBarManager toolBarManager = actionBars.getToolBarManager();

  final UndoAction undoAction = new UndoAction(view);
  toolBarManager.add(undoAction);
  undoAction.setImageDescriptor(Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/undo.png"));
  final RedoAction redoAction = new RedoAction(view);
  redoAction.setImageDescriptor(Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/redo.png"));
  toolBarManager.add(redoAction);

  viewer.getEditDomain().getCommandStack().addCommandStackListener(
      new CommandStackListener()
      {

        @Override
        public void commandStackChanged(EventObject event)
        {
          undoAction.setEnabled(undoAction.isEnabled());
          redoAction.setEnabled(redoAction.isEnabled());
        }
      });

}
 
开发者ID:debrief,项目名称:limpet,代码行数:26,代码来源:StackedchartsEditControl.java

示例2: addCommandStackListener

import org.eclipse.gef.commands.CommandStackListener; //导入依赖的package包/类
/**
 * @see org.eclipse.gef.commands.CommandStack#addCommandStackListener(org.eclipse.gef.commands.CommandStackListener)
 */
@Override
public void addCommandStackListener(CommandStackListener listener) {
    if (!commandStackListenerList.contains(listener)) {
        commandStackListenerList.add(listener);
    }
    super.addCommandStackListener(listener);
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:11,代码来源:UMLDiagramCommandStack.java

示例3: fireNotifyCommandStackListener

import org.eclipse.gef.commands.CommandStackListener; //导入依赖的package包/类
/**
 * 
 * void
 */
@SuppressWarnings("unused")
private void fireNotifyCommandStackListener() {
    for (Iterator<CommandStackListener> iter = this.commandStackListenerList.iterator(); iter.hasNext();) {
        iter.next().commandStackChanged(new EventObject(this));
    }
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:11,代码来源:UMLDiagramCommandStack.java

示例4: UndoablePropertySheetEntry

import org.eclipse.gef.commands.CommandStackListener; //导入依赖的package包/类
/**
 * Constructs the root entry using the given command stack.
 * 
 * @param commandStack
 *            the command stack to use
 * @since 3.1
 */
public UndoablePropertySheetEntry(CommandStack commandStack) {
	this.commandStack = commandStack;
	this.commandStackListener = new CommandStackListener() {
		public void commandStackChanged(EventObject e) {
			refreshFromRoot();
		}
	};
	this.commandStack.addCommandStackListener(commandStackListener);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:17,代码来源:UndoablePropertySheetEntry.java

示例5: addCommandStackListener

import org.eclipse.gef.commands.CommandStackListener; //导入依赖的package包/类
/**
 * @deprecated
 * 
 *             Do not use, use
 *             addCommandStackListener(ActivityStackListener) instead
 * 
 * @see org.eclipse.gef.commands.CommandStack#addCommandStackListener(org.eclipse.gef.commands.CommandStackListener)
 */
public void addCommandStackListener( CommandStackListener listener )
{
	// use addCommandStackListener(ActivityStackListener) instead
	// this method will called by GEF.
	// can't assert false.
	// see bugzilla 147687
	// assert false;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:17,代码来源:WrapperCommandStack.java

示例6: getDelegatingCommandStackListener

import org.eclipse.gef.commands.CommandStackListener; //导入依赖的package包/类
protected CommandStackListener getDelegatingCommandStackListener() {
	return this.delegatingCommandStackListener;
}
 
开发者ID:snakerflow,项目名称:snaker-designer,代码行数:4,代码来源:SnakerFlowDesignerEditor.java

示例7: removeCommandStackListener

import org.eclipse.gef.commands.CommandStackListener; //导入依赖的package包/类
/**
 * @deprecated
 * 
 *             Do not use, use
 *             removeCommandStackListener(ActivityStackListener) instead
 * 
 * @see org.eclipse.gef.commands.CommandStack#removeCommandStackListener(org.eclipse.gef.commands.CommandStackListener)
 */
public void removeCommandStackListener( CommandStackListener listener )
{
	// use removeCommandStackListener(ActivityStackListener) instead
	// assert false;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:14,代码来源:WrapperCommandStack.java


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