Browse Source

Pull request #4652: REPORT-53875 新增组件库弹框

Merge in DESIGN/design from ~LANLAN/design:release/10.0 to release/10.0

* commit '4aec5671a5b0edda1327a52f18f1cc7a9372d891':
  fix
  REPORT-53875 新增组件库弹框
zheng-1641779399395
Lanlan 4 years ago
parent
commit
59e44c1a30
  1. 33
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java
  2. 10
      designer-base/src/main/java/com/fr/design/login/message/DesignerModuleClickType.java

33
designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java

@ -242,7 +242,27 @@ public class UIEastResizableContainer extends JPanel {
* 伸缩右子面板时触发此方法 * 伸缩右子面板时触发此方法
*/ */
public void onResize() { public void onResize() {
// do nothing here refreshContainer();
if (DesignModeContext.isAuthorityEditing()) {
DesignerContext.getDesignerFrame().doResize();
}
}
public void showContainer() {
if (containerWidth != leftPaneWidth) {
return;
}
containerWidth = preferredWidth;
onResize();
}
public void hideContainer() {
if (containerWidth == leftPaneWidth) {
return;
}
setPreferredWidth(containerWidth);
containerWidth = leftPaneWidth;
onResize();
} }
private class TopToolPane extends JPanel { private class TopToolPane extends JPanel {
@ -281,15 +301,9 @@ public class UIEastResizableContainer extends JPanel {
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (e.getX() <= ARROW_RANGE) { if (e.getX() <= ARROW_RANGE) {
if (containerWidth == leftPaneWidth) { if (containerWidth == leftPaneWidth) {
containerWidth = preferredWidth; showContainer();
} else { } else {
setPreferredWidth(containerWidth); hideContainer();
containerWidth = leftPaneWidth;
}
onResize();
refreshContainer();
if (DesignModeContext.isAuthorityEditing()) {
DesignerContext.getDesignerFrame().doResize();
} }
} }
} }
@ -316,5 +330,4 @@ public class UIEastResizableContainer extends JPanel {
g.drawImage(button, 18, 7, 5, 10, null); g.drawImage(button, 18, 7, 5, 10, null);
} }
} }
} }

10
designer-base/src/main/java/com/fr/design/login/message/DesignerModuleClickType.java

@ -3,11 +3,16 @@ package com.fr.design.login.message;
import com.fr.config.ServerPreferenceConfig; import com.fr.config.ServerPreferenceConfig;
import com.fr.design.dialog.NotificationDialogAction; import com.fr.design.dialog.NotificationDialogAction;
import com.fr.design.extra.WebViewDlgHelper; import com.fr.design.extra.WebViewDlgHelper;
import com.fr.design.mainframe.BaseJForm;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.os.impl.SupportOSImpl; import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.upm.UpmFinder; import com.fr.design.upm.UpmFinder;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.log.FineLoggerFactory; import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.os.Arch; import com.fr.stable.os.Arch;
import com.fr.stable.os.OperatingSystem; import com.fr.stable.os.OperatingSystem;
@ -39,7 +44,10 @@ public enum DesignerModuleClickType {
@Override @Override
public void doClick() { public void doClick() {
try { try {
// TODO BaseJForm jform = StableFactory.getMarkedInstanceObjectFromClass(BaseJForm.XML_TAG, BaseJForm.class);
DesignerContext.getDesignerFrame().addAndActivateJTemplate((JTemplate<?, ?>) jform);
EastRegionContainerPane.getInstance().showContainer();
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_LIB);
} catch (Exception e) { } catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e); FineLoggerFactory.getLogger().error(e.getMessage(), e);
} }

Loading…
Cancel
Save