Browse Source

REPORT-6558 组件叠加优化交互验收

plough 7 years ago
parent
commit
1451bee69d
  1. 9
      designer_base/src/com/fr/design/actions/UpdateAction.java
  2. 6
      designer_form/src/com/fr/design/designer/beans/actions/FormDeleteAction.java
  3. 8
      designer_form/src/com/fr/design/designer/beans/actions/MoveToBottomAction.java
  4. 8
      designer_form/src/com/fr/design/designer/beans/actions/MoveToTopAction.java

9
designer_base/src/com/fr/design/actions/UpdateAction.java

@ -293,13 +293,20 @@ public abstract class UpdateAction extends ShortCut implements Action {
button.setEnabled(this.isEnabled());
//peter:产生tooltip
button.setToolTipText(ActionFactory.createButtonToolTipText(this));
button.setToolTipText(getToolTipText());
object = button;
}
return (JComponent) object;
}
/**
* 重写此方法可以自定义 action 的提示文字
*/
protected String getToolTipText() {
return ActionFactory.createButtonToolTipText(this);
}
/**
* Equals
*/

6
designer_form/src/com/fr/design/designer/beans/actions/FormDeleteAction.java

@ -29,6 +29,12 @@ public class FormDeleteAction extends FormWidgetEditAction {
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0));
}
@Override
protected String getToolTipText() {
String originText = super.getToolTipText();
return originText.replace(KeyEvent.getKeyText(KeyEvent.VK_BACK_SPACE), KeyEvent.getKeyText(KeyEvent.VK_DELETE));
}
@Override
public JComponent createToolBarComponent() {
JComponent comp = super.createToolBarComponent();

8
designer_form/src/com/fr/design/designer/beans/actions/MoveToBottomAction.java

@ -27,7 +27,13 @@ public class MoveToBottomAction extends FormWidgetEditAction {
this.setName(Inter.getLocText("FR-Designer_Move_To_Bottom"));
this.setMnemonic('K');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/to_bottom.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_OPEN_BRACKET, DEFAULT_MODIFIER + InputEvent.ALT_MASK));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_OPEN_BRACKET, DEFAULT_MODIFIER + InputEvent.SHIFT_MASK));
}
@Override
protected String getToolTipText() {
String originText = super.getToolTipText();
return originText.replace(KeyEvent.getKeyText(KeyEvent.VK_OPEN_BRACKET), "[");
}
@Override

8
designer_form/src/com/fr/design/designer/beans/actions/MoveToTopAction.java

@ -27,7 +27,13 @@ public class MoveToTopAction extends FormWidgetEditAction {
this.setName(Inter.getLocText("FR-Designer_Move_To_Top"));
this.setMnemonic('T');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/to_top.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_CLOSE_BRACKET, DEFAULT_MODIFIER + InputEvent.ALT_MASK));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_CLOSE_BRACKET, DEFAULT_MODIFIER + InputEvent.SHIFT_MASK));
}
@Override
protected String getToolTipText() {
String originText = super.getToolTipText();
return originText.replace(KeyEvent.getKeyText(KeyEvent.VK_CLOSE_BRACKET), "]");
}
@Override

Loading…
Cancel
Save