作者:逢源堂_344 | 来源:互联网 | 2023-09-24 15:50
本文整理了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));