Browse Source

Merge remote-tracking branch 'origin/release/10.0' into release/10.0

# Conflicts:
#	designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java
security/10.0
Hoky 3 years ago
parent
commit
c28db2993d
  1. 4
      designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java
  2. 42
      designer-base/src/main/java/com/fr/design/utils/LoadingUtils.java
  3. 0
      designer-base/src/main/resources/com/fr/design/images/mainframe/loading.png
  4. 7
      designer-form/src/main/java/com/fr/design/mainframe/share/util/ShareComponentUtils.java
  5. 6
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java
  6. 1
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java
  7. 4
      designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

4
designer-base/src/main/java/com/fr/design/mainframe/DesktopCardPane.java

@ -10,9 +10,11 @@ import com.fr.design.data.BasicTableDataTreePane;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener; import com.fr.design.event.TargetModifiedListener;
import com.fr.design.utils.LoadingUtils;
import javax.swing.JComponent; import javax.swing.JComponent;
import javax.swing.JLayeredPane; import javax.swing.JLayeredPane;
import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
@ -31,7 +33,7 @@ public class DesktopCardPane extends BasicPane implements TargetModifiedListener
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private JTemplate<?, ?> component; private JTemplate<?, ?> component;
private TransparentPane transparentPane = new TransparentPane(); private TransparentPane transparentPane = new TransparentPane();
private OpenLoadingPane loadingPane = new OpenLoadingPane(); private JPanel loadingPane = LoadingUtils.createLoadingPane();
private OpenFailedPane failedPane = new OpenFailedPane(); private OpenFailedPane failedPane = new OpenFailedPane();
private JLayeredPane layeredPane = new JLayeredPane() { private JLayeredPane layeredPane = new JLayeredPane() {
@Override @Override

42
designer-base/src/main/java/com/fr/design/mainframe/OpenLoadingPane.java → designer-base/src/main/java/com/fr/design/utils/LoadingUtils.java

@ -1,35 +1,29 @@
package com.fr.design.mainframe; package com.fr.design.utils;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import javax.swing.ImageIcon;
import javax.swing.JPanel;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
import java.awt.Container; import java.awt.Container;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.LayoutManager; import java.awt.LayoutManager;
import javax.swing.ImageIcon;
import javax.swing.JPanel;
/**
* @author hades
* @version 10.0
* Created by hades on 2021/4/9
*/
public class OpenLoadingPane extends JPanel {
private static final ImageIcon LOADING_ICON = new ImageIcon(IOUtils.readImage("/com/fr/design/images/mainframe/openloading.png")); public class LoadingUtils {
private static final ImageIcon LOADING_ICON = new ImageIcon(IOUtils.readImage("/com/fr/design/images/mainframe/loading.png"));
private static final Color TIP_COLOR = new Color(108, 174, 235); private static final Color TIP_COLOR = new Color(108, 174, 235);
private static final int Y_GAP = 50; private static final int Y_GAP = 50;
private static final int X_GAP = 10; private static final int X_GAP = 10;
private UILabel loadingLabel; public static JPanel createLoadingPane() {
private UILabel tipLabel; JPanel jPanel = new JPanel();
UILabel loadingLabel = new UILabel(LOADING_ICON);
public OpenLoadingPane() { UILabel tipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Loading"));
tipLabel.setForeground(TIP_COLOR);
setLayout(new LayoutManager() { jPanel.setLayout(new LayoutManager() {
@Override @Override
public void removeLayoutComponent(Component comp) { public void removeLayoutComponent(Component comp) {
} }
@ -64,12 +58,10 @@ public class OpenLoadingPane extends JPanel {
public void addLayoutComponent(String name, Component comp) { public void addLayoutComponent(String name, Component comp) {
} }
}); });
setBackground(Color.WHITE);
loadingLabel = new UILabel(LOADING_ICON);
tipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Open_Template_Loading"));
tipLabel.setForeground(TIP_COLOR);
add(loadingLabel);
add(tipLabel);
jPanel.setBackground(Color.WHITE);
jPanel.add(loadingLabel);
jPanel.add(tipLabel);
return jPanel;
} }
} }

0
designer-base/src/main/resources/com/fr/design/images/mainframe/openloading.png → designer-base/src/main/resources/com/fr/design/images/mainframe/loading.png

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

7
designer-form/src/main/java/com/fr/design/mainframe/share/util/ShareComponentUtils.java

@ -8,14 +8,11 @@ import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWTitleLayout; import com.fr.design.designer.creator.XWTitleLayout;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.FormSelection;
import com.fr.design.mainframe.JForm;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.form.share.SharableWidgetProvider; import com.fr.form.share.SharableWidgetProvider;
import com.fr.form.share.bean.ShareLayoutWidget; import com.fr.form.share.bean.ShareLayoutWidget;
import com.fr.form.share.constants.ComponentPath; import com.fr.form.share.constants.ComponentPath;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
@ -38,9 +35,7 @@ public class ShareComponentUtils {
public static XCreator createXCreator(Widget creatorSource, String shareId, SharableWidgetProvider provider) { public static XCreator createXCreator(Widget creatorSource, String shareId, SharableWidgetProvider provider) {
XCreator xCreator; XCreator xCreator;
if (creatorSource instanceof WCardMainBorderLayout) { if (creatorSource instanceof ShareLayoutWidget) {
xCreator = XCreatorUtils.createXCreator(creatorSource, new Dimension(500, 300));
} else if (creatorSource instanceof ShareLayoutWidget) {
xCreator = XCreatorUtils.createXCreator(((ShareLayoutWidget) creatorSource).getWidget(), new Dimension(provider.getWidth(), provider.getHeight())); xCreator = XCreatorUtils.createXCreator(((ShareLayoutWidget) creatorSource).getWidget(), new Dimension(provider.getWidth(), provider.getHeight()));
} else { } else {
xCreator = XCreatorUtils.createXCreator(creatorSource, new Dimension(provider.getWidth(), provider.getHeight())); xCreator = XCreatorUtils.createXCreator(creatorSource, new Dimension(provider.getWidth(), provider.getHeight()));

6
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRAbsoluteBodyLayoutDefinePane.java

@ -13,11 +13,9 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.xpane.LayoutStylePane; import com.fr.design.gui.xpane.LayoutStylePane;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.WidgetPropertyPane; import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.widget.accessibles.AccessibleBodyWatermarkEditor; import com.fr.design.mainframe.widget.accessibles.AccessibleBodyWatermarkEditor;
import com.fr.design.utils.gui.UIComponentUtils;
import com.fr.design.widget.FRWidgetFactory; import com.fr.design.widget.FRWidgetFactory;
import com.fr.design.widget.ui.designer.component.WidgetBoundPane; import com.fr.design.widget.ui.designer.component.WidgetBoundPane;
import com.fr.form.ui.LayoutBorderStyle; import com.fr.form.ui.LayoutBorderStyle;
@ -25,7 +23,6 @@ import com.fr.form.ui.container.WAbsoluteBodyLayout;
import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WAbsoluteLayout;
import com.fr.form.ui.container.WBodyLayoutType; import com.fr.form.ui.container.WBodyLayoutType;
import com.fr.form.ui.container.WFitLayout; import com.fr.form.ui.container.WFitLayout;
import com.fr.general.act.BorderPacker;
import com.fr.report.core.ReportUtils; import com.fr.report.core.ReportUtils;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -134,7 +131,8 @@ public class FRAbsoluteBodyLayoutDefinePane extends FRAbsoluteLayoutDefinePane {
layoutCombox.setSelectedIndex(1); layoutCombox.setSelectedIndex(1);
stylePane.populateBean((LayoutBorderStyle) ob.getBorderStyle()); stylePane.populateBean((LayoutBorderStyle) ob.getBorderStyle());
boundPane.populate(); boundPane.populate();
watermarkEditor.setValue(ReportUtils.getWatermarkAttrFromTemplate(getCurrentIOFile())); //从全局读取水印
watermarkEditor.setValue(ReportUtils.getWatermarkAttrFromTemplateAndGlobal(getCurrentIOFile()));
} }
public WAbsoluteBodyLayout updateSubPane() { public WAbsoluteBodyLayout updateSubPane() {

1
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

@ -162,6 +162,7 @@ public class FRFitLayoutDefinePane extends AbstractFRLayoutDefinePane<WFitLayout
adaptComboBox.setSelectedIndex(ob.getCompState()); adaptComboBox.setSelectedIndex(ob.getCompState());
componentIntervel.setValue(ob.getCompInterval()); componentIntervel.setValue(ob.getCompInterval());
stylePane.populateBean((LayoutBorderStyle) ob.getBorderStyle()); stylePane.populateBean((LayoutBorderStyle) ob.getBorderStyle());
//从全局读取水印
watermarkEditor.setValue(ReportUtils.getWatermarkAttrFromTemplateAndGlobal(getCurrentIOFile())); watermarkEditor.setValue(ReportUtils.getWatermarkAttrFromTemplateAndGlobal(getCurrentIOFile()));
} }

4
designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

@ -834,7 +834,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
//显示set和tip //显示set和tip
setCardPane.setPreferredSize(new Dimension(156, 20)); setCardPane.setPreferredSize(new Dimension(156, 20));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, VGAP); TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, VGAP);
tipCardPane.setPreferredSize(new Dimension(224, 40)); tipCardPane.setPreferredSize(new Dimension(224, 50));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, VGAP_INNER); TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, VGAP_INNER);
} else { } else {
//未定义 //未定义
@ -958,7 +958,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
//显示set和tip //显示set和tip
setCardPane.setPreferredSize(new Dimension(156, 20)); setCardPane.setPreferredSize(new Dimension(156, 20));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, VGAP); TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 2, VGAP);
tipCardPane.setPreferredSize(new Dimension(224, 40)); tipCardPane.setPreferredSize(new Dimension(224, 50));
TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, VGAP_INNER); TableLayoutHelper.modifyTableLayoutIndexVGap(contentPane, 4, VGAP_INNER);
break; break;
case EVEN: case EVEN:

Loading…
Cancel
Save