Browse Source

REPORT-75998 国际化、菜单插入、快捷键修改

feature/x
Destiny.Lin 2 years ago
parent
commit
9ed353d15e
  1. 8
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  2. 7
      designer-base/src/main/java/com/fr/design/module/DesignModuleFactory.java
  3. 2
      designer-form/src/main/java/com/fr/design/actions/NewFormAction.java
  4. 23
      designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java
  5. 4
      designer-form/src/main/java/com/fr/design/fit/NewJForm.java

8
designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -60,6 +60,7 @@ import com.fr.design.menu.MenuDef;
import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.SeparatorDef;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.design.module.DesignModuleFactory;
import com.fr.design.os.impl.SupportOSImpl; import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.remote.action.RemoteDesignAuthManagerAction; import com.fr.design.remote.action.RemoteDesignAuthManagerAction;
import com.fr.design.update.actions.SoftwareUpdateAction; import com.fr.design.update.actions.SoftwareUpdateAction;
@ -579,6 +580,13 @@ public abstract class ToolBarMenuDock {
} }
shortCuts.add(new AboutAction()); shortCuts.add(new AboutAction());
try {
if (DesignModuleFactory.getITReplaceAction() != null) {
shortCuts.add((ShortCut) DesignModuleFactory.getITReplaceAction().newInstance());
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
}
return shortCuts.toArray(new ShortCut[0]); return shortCuts.toArray(new ShortCut[0]);
} }

7
designer-base/src/main/java/com/fr/design/module/DesignModuleFactory.java

@ -47,6 +47,7 @@ public class DesignModuleFactory {
private Class<MiddleChartDialog> autoChartDialogClass; private Class<MiddleChartDialog> autoChartDialogClass;
private Class<? extends BaseChartPropertyPane> chartPropertyPaneClass; private Class<? extends BaseChartPropertyPane> chartPropertyPaneClass;
private Class newFormAction; private Class newFormAction;
private Class ITReplaceAction;
private Class formParaDesigner; private Class formParaDesigner;
private Class paraPropertyPane; private Class paraPropertyPane;
private Class<? extends HierarchyTreePane> formHierarchyPaneCls; private Class<? extends HierarchyTreePane> formHierarchyPaneCls;
@ -116,6 +117,12 @@ public class DesignModuleFactory {
public static Class getNewFormAction() { public static Class getNewFormAction() {
return instance.newFormAction; return instance.newFormAction;
} }
public static void registerReplaceActionClass(Class r){
instance.ITReplaceAction = r;
}
public static Class getITReplaceAction(){
return instance.ITReplaceAction;
}
public static void registerParaPropertyPaneClass(Class p) { public static void registerParaPropertyPaneClass(Class p) {
instance.paraPropertyPane = p; instance.paraPropertyPane = p;

2
designer-form/src/main/java/com/fr/design/actions/NewFormAction.java

@ -43,7 +43,7 @@ public class NewFormAction extends UpdateAction {
@Override @Override
public KeyStroke getKeyStroke() { public KeyStroke getKeyStroke() {
return KeyStroke.getKeyStroke(KeyEvent.VK_F, DEFAULT_MODIFIER); return null;
} }
}; };
} }

23
designer-form/src/main/java/com/fr/design/designer/beans/models/SelectionModel.java

@ -131,6 +131,29 @@ public class SelectionModel {
} }
} }
/**
* 用于强制定位所需组件不对布局组件的顶层布局进行编辑判定即使上层未展开或者未处于编辑状态依然可以强制跳转到对应的子组件
* @param comp 设计组件
*/
public void selectACreator4ITLocation(XCreator comp) {
// 如果父层是scale和title两个专属容器,返回其父层,组件本身是不让被选中的
if (comp != designer.getRootComponent() && comp != designer.getParaComponent()) {
dealParentContainer(comp);
}
if (selection.removeSelectedCreator(comp) || selection.addSelectedCreator(comp)) {
designer.getEditListenerTable().fireCreatorModified(comp, DesignerEvent.CREATOR_SELECTED);
designer.repaint();
}
}
private void dealParentContainer(XCreator comp) {
XCreator parentContainer = (XCreator) comp.getParent();
if (parentContainer != null) {
comp = parentContainer.isDedicateContainer() || comp instanceof XCardSwitchButton ? parentContainer : comp;
}
}
/** /**
* 将所选组件剪切到剪切板上 * 将所选组件剪切到剪切板上
*/ */

4
designer-form/src/main/java/com/fr/design/fit/NewJForm.java

@ -243,7 +243,7 @@ public class NewJForm extends JForm {
return; return;
} }
if (xCreator instanceof XElementCase) { if (xCreator instanceof XElementCase) {
getFormDesign().getSelectionModel().selectACreator(xCreator); getFormDesign().getSelectionModel().selectACreator4ITLocation(xCreator);
xCreator.startEditing(); xCreator.startEditing();
if (getElementCaseDesign() != null) { if (getElementCaseDesign() != null) {
getElementCaseDesign().navigate(trl); getElementCaseDesign().navigate(trl);
@ -251,7 +251,7 @@ public class NewJForm extends JForm {
} else { } else {
tabChanged(FORM_TAB); tabChanged(FORM_TAB);
getFormDesign().getSelectionModel().reset(); getFormDesign().getSelectionModel().reset();
getFormDesign().getSelectionModel().selectACreator(xCreator); getFormDesign().getSelectionModel().selectACreator4ITLocation(xCreator);
} }
}, XCreator.class); }, XCreator.class);
} }

Loading…
Cancel
Save