Browse Source

REPORT-60625【固定布局-原布局推荐4.1】决策报表-自适应布局-右侧显示组件库面板时,选中组件无法按delete键删除,显示设置页面时可以delete删除组件

research/11.0
kerry 3 years ago
parent
commit
eba4ce270b
  1. 8
      designer-form/src/main/java/com/fr/design/designer/beans/actions/FormDeleteAction.java

8
designer-form/src/main/java/com/fr/design/designer/beans/actions/FormDeleteAction.java

@ -41,6 +41,14 @@ public class FormDeleteAction extends FormWidgetEditAction {
return comp;
}
@Override
public JComponent createToolBarComponentByName(String componentName) {
JComponent comp = super.createToolBarComponentByName(componentName);
// 除了 BACKSPACE 之外,DELETE 键也要能删除(直接在此处添加绑定,没有按钮提示)
comp.registerKeyboardAction(this, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), JComponent.WHEN_IN_FOCUSED_WINDOW);
return comp;
}
/**
* 删除
*

Loading…
Cancel
Save