Browse Source

设计器初始界面镜像化

persist/11.0-arabic
obo 4 months ago
parent
commit
d59b14aba5
  1. 2
      designer-base/src/main/java/com/fr/design/actions/UpdateAction.java
  2. 1
      designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java
  3. 2
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  4. 7
      designer-base/src/main/java/com/fr/design/menu/MenuDef.java
  5. 8
      designer-realize/src/main/java/com/fr/start/MainDesigner.java

2
designer-base/src/main/java/com/fr/design/actions/UpdateAction.java

@ -328,7 +328,7 @@ public abstract class UpdateAction extends ShortCut implements Action {
object = menuItem;
this.putValue(UIMenuItem.class.getName(), object);
menuItem.applyComponentOrientation(BidiUtils.getOrientationByLocale());
BidiUtils.applyOrientationByLocale(menuItem);
}
return (UIMenuItem) object;
}

1
designer-base/src/main/java/com/fr/design/mainframe/NorthRegionContainerPane.java

@ -181,7 +181,6 @@ public class NorthRegionContainerPane extends JPanel {
MenuManager.getInstance().setMenus4Designer(designState);
if (menuBar == null) {
this.add(menuBar = ad.createJMenuBar(plus), BorderLayout.CENTER);
menuBar.applyComponentOrientation(BidiUtils.getOrientationByLocale());
} else {
ad.resetJMenuBar(menuBar, plus);
}

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

@ -4,7 +4,6 @@
package com.fr.design.mainframe.toolbar;
import com.fr.base.FRContext;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager;
@ -219,7 +218,6 @@ public abstract class ToolBarMenuDock {
}
};
resetJMenuBar(jMenuBar, plus);
jMenuBar.applyComponentOrientation(BidiUtils.getOrientationByLocale());
return jMenuBar;
}

7
designer-base/src/main/java/com/fr/design/menu/MenuDef.java

@ -1,6 +1,5 @@
package com.fr.design.menu;
import com.fr.base.i18n.BidiUtils;
import com.fr.base.svg.IconUtils;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.ibutton.UIButton;
@ -26,6 +25,7 @@ import java.awt.event.ContainerListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.text.Bidi;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
@ -241,7 +241,6 @@ public class MenuDef extends ShortCut {
createdJMenu.getPopupMenu().addContainerListener(listener);
}
}
createdJMenu.applyComponentOrientation(BidiUtils.getOrientationByLocale());
return createdJMenu;
}
@ -255,7 +254,6 @@ public class MenuDef extends ShortCut {
} else {
createdJMenu = new UIMenu(this.getName());
}
createdJMenu.applyComponentOrientation(BidiUtils.getOrientationByLocale());
return createdJMenu;
}
@ -492,7 +490,8 @@ public class MenuDef extends ShortCut {
MenuDef.this.updatePopupMenu(popupMenu);
GUICoreUtils.showPopupMenu(popupMenu, button, 0, button.getSize().height);
}
popupMenu.applyComponentOrientation(BidiUtils.getOrientationByLocale());
// BidiUtils.applyOrientationByLocale(popupMenu);
// popupMenu.revalidate();
}
};

8
designer-realize/src/main/java/com/fr/start/MainDesigner.java

@ -27,6 +27,7 @@ import com.fr.design.gui.ibutton.UISaveForbiddenButton;
import com.fr.design.gui.imenu.UIMenuItem;
import com.fr.design.gui.imenu.UIPopupMenu;
import com.fr.design.gui.itoolbar.UILargeToolbar;
import com.fr.design.i18n.DesignI18nProviderImpl;
import com.fr.design.mainframe.ActiveKeyGenerator;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.InformationCollector;
@ -68,6 +69,8 @@ import com.fr.runtime.FineRuntime;
import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactoryBase;
import com.fr.stable.fun.I18nProvider;
import com.fr.stable.lifecycle.FineLifecycleFatalError;
import com.fr.stable.xml.XMLTools;
import com.fr.start.common.DesignerStartupContext;
@ -89,6 +92,7 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.util.ArrayList;
import java.util.ServiceLoader;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadFactory;
@ -123,6 +127,10 @@ public class MainDesigner extends BaseDesigner {
DesignerStartupContext.getRecorder().start();
// 设置一下默认的logger,启动后再Reset
FineLoggerFactory.setLogger(SystemOutLoggerProvider.getInstance());
ServiceLoader<I18nProvider> i18nProviders = ServiceLoader.load(I18nProvider.class);
for (I18nProvider i18nProvider : i18nProviders) {
StableFactoryBase.registerMarkedClass(I18nProvider.MARK_STRING, i18nProvider.getClass());
}
showSplash();

Loading…
Cancel
Save