热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.eclipse.jface.bindings.keys.KeyBinding.getKeySequence()方法的使用及代码示例

本文整理了Java中org.eclipse.jface.bindings.keys.KeyBinding.getKeySequence()方法的一些代码示例,展示了

本文整理了Java中org.eclipse.jface.bindings.keys.KeyBinding.getKeySequence()方法的一些代码示例,展示了KeyBinding.getKeySequence()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。KeyBinding.getKeySequence()方法的具体详情如下:
包路径:org.eclipse.jface.bindings.keys.KeyBinding
类名称:KeyBinding
方法名:getKeySequence

KeyBinding.getKeySequence介绍

[英]Returns the key sequence which triggers this binding. The key sequence will not be null, empty or incomplete.
[中]返回触发此绑定的键序列。密钥序列将不是null、空或不完整。

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

@Override
public TriggerSequence getTriggerSequence() {
return getKeySequence();
}
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

@Override
public TriggerSequence getTriggerSequence() {
return getKeySequence();
}
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

public TriggerSequence getTriggerSequence() {
return getKeySequence();
}
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

private void updateKeyBindingList() {
if( activeBindings != null ) {
List keyBindingList = new ArrayList();
final Iterator bindingItr = activeBindings.entrySet().iterator();
while( bindingItr.hasNext() ) {
final Map.Entry entry = ( Map.Entry )bindingItr.next();
Binding binding = ( Binding )entry.getValue();
if( binding instanceof KeyBinding ) {
KeyBinding keyBinding = ( KeyBinding )binding;
KeySequence keySequence = keyBinding.getKeySequence();
KeyStroke[] keyStroke = keySequence.getKeyStrokes();
if( keyStroke.length > 0 ) {
keyBindingList.add( keyStroke[ 0 ].toString() );
}
}
}
String[] array = new String[ keyBindingList.size() ];
keyBindingList.toArray( array );
Display display = Display.getCurrent();
if( display == null ) {
throw new IllegalStateException();
}
display.setData( RWT.ACTIVE_KEYS, array );
display.setData( RWT.CANCEL_KEYS, array );
}
}
// ENDRAP [if]

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

/**
* Handles the selection event on the table containing the bindings for a
* particular command. This updates the context and trigger sequence based
* on the selected binding.
*/
private void selectedTableBindingsForCommand() {
final int selection = tableBindingsForCommand.getSelectionIndex();
if ((selection >= 0)
&& (selection final TableItem item = tableBindingsForCommand.getItem(selection);
final KeyBinding binding = (KeyBinding) item.getData(ITEM_DATA_KEY);
setContextId(binding.getContextId());
setKeySequence(binding.getKeySequence());
}
update();
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

if (!keyBinding.getContextId().equals(context.getId())) {
final KeyBinding binding = new KeyBinding(keyBinding
.getKeySequence(),
keyBinding.getParameterizedCommand(), activeSchemeId,
context.getId(), null, null, null, Binding.USER);
} else {
fBindingManager.addBinding(new KeyBinding(keyBinding
.getKeySequence(), null, keyBinding.getSchemeId(),
keyBinding.getContextId(), null, null, null,
Binding.USER));

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

bindingManager.removeBinding(keyBinding);
} else {
KeySequence keySequence = keyBinding.getKeySequence();

代码示例来源:origin: org.eclipse.platform/org.eclipse.ui.workbench

if (obj instanceof KeyBinding) {
KeyBinding keyBinding = (KeyBinding) obj;
if (!keyBinding.getKeySequence().equals(keySequence)) {
if (keySequence != null && !keySequence.isEmpty()) {
String activeSchemeId = fSchemeModel.getSelectedElement()
} else {
fBindingManager.addBinding(new KeyBinding(keyBinding
.getKeySequence(), null, keyBinding
.getSchemeId(), keyBinding.getContextId(),
null, null, null, Binding.USER));
} else {
fBindingManager.addBinding(new KeyBinding(keyBinding
.getKeySequence(), null, keyBinding
.getSchemeId(), keyBinding.getContextId(),
null, null, null, Binding.USER));

推荐阅读
author-avatar
逢源堂_344
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有