Browse Source

Merge branch 'release/10.0' of ssh://code.fineres.com:7999/~zheng/C-design into release/10.0

zheng-1641779399395
shine 3 years ago
parent
commit
8cca88818c
  1. 37
      designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java
  2. 2
      designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java
  3. 3
      designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java
  4. 2
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  5. 13
      designer-realize/src/main/java/com/fr/design/webattr/ServerFitAttrPane.java

37
designer-base/src/main/java/com/fr/design/report/fit/BaseFitAttrPane.java

@ -17,7 +17,6 @@ import com.fr.report.fit.ReportFitAttr;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.EmptyBorder;
import java.awt.*; import java.awt.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -33,6 +32,7 @@ import static com.fr.design.i18n.Toolkit.i18nText;
public abstract class BaseFitAttrPane extends BasicBeanPane<ReportFitAttr> { public abstract class BaseFitAttrPane extends BasicBeanPane<ReportFitAttr> {
protected JPanel contentJPanel; protected JPanel contentJPanel;
protected UILabel belowSetLabel;
protected UIComboBox itemChoose; protected UIComboBox itemChoose;
protected java.util.List<FitAttrModel> fitAttrModelList = new ArrayList<>(); protected java.util.List<FitAttrModel> fitAttrModelList = new ArrayList<>();
@ -97,7 +97,7 @@ public abstract class BaseFitAttrPane extends BasicBeanPane<ReportFitAttr> {
} }
attrJPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); attrJPanel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
attrJPanel.setBorder(new EmptyBorder(0, 100, 10, 100)); attrJPanel.setBorder(BorderFactory.createEmptyBorder(5, 0, 10, 0));
contentJPanel.add(attrJPanel); contentJPanel.add(attrJPanel);
} }
@ -136,9 +136,18 @@ public abstract class BaseFitAttrPane extends BasicBeanPane<ReportFitAttr> {
protected void initPreviewJPanel() { protected void initPreviewJPanel() {
previewJPanel = new FitPreviewPane(); previewJPanel = new FitPreviewPane();
previewJPanel.setBorder(BorderFactory.createEmptyBorder(0, getPreviewJPanelLeft(), 0, 0));
contentJPanel.add(previewJPanel); contentJPanel.add(previewJPanel);
} }
private int getPreviewJPanelLeft() {
int left = 0;
if (belowSetLabel.getPreferredSize() != null) {
left = belowSetLabel.getPreferredSize().width + BELOW_SET_COMPONENT_HSPACE;
}
return left;
}
protected int getStateInPC(int index) { protected int getStateInPC(int index) {
FitType[] fitTypes = fitAttrModel.getFitTypes(); FitType[] fitTypes = fitAttrModel.getFitTypes();
return fitTypes[index].getState(); return fitTypes[index].getState();
@ -188,29 +197,26 @@ public abstract class BaseFitAttrPane extends BasicBeanPane<ReportFitAttr> {
protected void initComponents() { protected void initComponents() {
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
contentJPanel = new JPanel(); contentJPanel = FRGUIPaneFactory.createVerticalFlowLayout_Pane(false, FlowLayout.LEFT, 0, 0);
contentJPanel.setLayout(FRGUIPaneFactory.createCenterFlowLayout());
this.add(contentJPanel); this.add(contentJPanel);
initItemChoose(); initItemChoose();
initPrompt();
} }
private void initItemChoose() { private void initItemChoose() {
JPanel chooseJPanel = new JPanel(); JPanel chooseJPanel = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane();
chooseJPanel.setLayout(FRGUIPaneFactory.createLabelFlowLayout());
ItemListener itemListener = getItemListener(); ItemListener itemListener = getItemListener();
itemChoose = new UIComboBox(getItemNames()); itemChoose = new UIComboBox(getItemNames());
itemChoose.addItemListener(itemListener); itemChoose.addItemListener(itemListener);
UILabel belowSetLabel = new UILabel(i18nText("Fine-Design_Report_Blow_Set")); belowSetLabel = new UILabel(i18nText("Fine-Design_Report_Blow_Set"));
JPanel hSpaceLabel = new JPanel();
hSpaceLabel.setSize(BELOW_SET_COMPONENT_HSPACE, 0);
JPanel buttonPane = GUICoreUtils.createFlowPane(new Component[]{ JPanel buttonPane = GUICoreUtils.createFlowPane(new Component[]{
belowSetLabel, itemChoose}, FlowLayout.LEFT, BELOW_SET_COMPONENT_HSPACE); belowSetLabel, hSpaceLabel, itemChoose}, FlowLayout.LEFT);
chooseJPanel.add(buttonPane); chooseJPanel.add(buttonPane);
chooseJPanel.setPreferredSize(new Dimension(500, 50)); chooseJPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));
JPanel jPanel = new JPanel(); contentJPanel.add(chooseJPanel);
jPanel.setLayout(FRGUIPaneFactory.createBorderLayout());
jPanel.add(chooseJPanel, BorderLayout.WEST);
contentJPanel.add(jPanel);
} }
@ -221,6 +227,9 @@ public abstract class BaseFitAttrPane extends BasicBeanPane<ReportFitAttr> {
} }
protected void initPrompt() {
}
protected void refresh() { protected void refresh() {
validate(); validate();
repaint(); repaint();

2
designer-base/src/main/java/com/fr/design/worker/open/OpenWorker.java

@ -133,7 +133,7 @@ public class OpenWorker<T> extends SwingWorker<T, Void> {
this.template.setOpening(false); this.template.setOpening(false);
JTemplate<?, ?> currentTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate(); JTemplate<?, ?> currentTemplate = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
// 需要判断当前打开的模板是不是异步执行后失败的模板 是的话立即展示失败后的提示内容 否则只设置下失败的提示内容 // 需要判断当前打开的模板是不是异步执行后失败的模板 是的话立即展示失败后的提示内容 否则只设置下失败的提示内容
if (ComparatorUtils.equals(currentTemplate.getEditingFILE().getName(), this.template.getName())) { if (ComparatorUtils.equals(currentTemplate.getEditingFILE().getName(), this.template.getEditingFILE().getName())) {
DesignerContext.getDesignerFrame().getCenterTemplateCardPane().showOpenFailedCover(text); DesignerContext.getDesignerFrame().getCenterTemplateCardPane().showOpenFailedCover(text);
DesignerFrameFileDealerPane.getInstance().stateChange(); DesignerFrameFileDealerPane.getInstance().stateChange();
} else { } else {

3
designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java

@ -96,7 +96,8 @@ public class FormWidgetDetailPane extends FormDockView{
} }
headGroup = new UIHeadGroup(paneNames) { headGroup = new UIHeadGroup(paneNames) {
protected void tabChanged(int newSelectedIndex) { protected void tabChanged(int newSelectedIndex) {
if (newSelectedIndex == 1) { //初始化还未展示的时候不需要收集其 marketClick
if (this.isShowing() && newSelectedIndex == 1) {
ComponentCollector.getInstance().collectMarkerClick(); ComponentCollector.getInstance().collectMarkerClick();
} }
cardLayout.show(centerPane, paneList.get(newSelectedIndex).getTitle()); cardLayout.show(centerPane, paneList.get(newSelectedIndex).getTitle());

2
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -576,7 +576,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
} }
private ShortCut getReportFitAttrAction() { protected ShortCut getReportFitAttrAction() {
FormAdaptiveConfigUIProcessor adaptiveConfigUI = ExtraDesignClassManager.getInstance().getSingle(FormAdaptiveConfigUIProcessor.MARK_STRING); FormAdaptiveConfigUIProcessor adaptiveConfigUI = ExtraDesignClassManager.getInstance().getSingle(FormAdaptiveConfigUIProcessor.MARK_STRING);
if (adaptiveConfigUI != null) { if (adaptiveConfigUI != null) {
return adaptiveConfigUI.getConfigShortCut(this); return adaptiveConfigUI.getConfigShortCut(this);

13
designer-realize/src/main/java/com/fr/design/webattr/ServerFitAttrPane.java

@ -1,6 +1,8 @@
package com.fr.design.webattr; package com.fr.design.webattr;
import com.fr.config.Configuration; import com.fr.config.Configuration;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.report.fit.BaseFitAttrPane; import com.fr.design.report.fit.BaseFitAttrPane;
import com.fr.design.report.fit.FitAttrModel; import com.fr.design.report.fit.FitAttrModel;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
@ -9,6 +11,7 @@ import com.fr.report.fit.ReportFitConfig;
import com.fr.transaction.Configurations; import com.fr.transaction.Configurations;
import com.fr.transaction.Worker; import com.fr.transaction.Worker;
import java.awt.Color;
import java.awt.event.ItemEvent; import java.awt.event.ItemEvent;
import java.awt.event.ItemListener; import java.awt.event.ItemListener;
@ -33,7 +36,6 @@ public class ServerFitAttrPane extends BaseFitAttrPane {
super.populateBean(reportFitAttr); super.populateBean(reportFitAttr);
} }
public ReportFitAttr updateBean() { public ReportFitAttr updateBean() {
ReportFitAttr reportFitAttr = super.updateBean(); ReportFitAttr reportFitAttr = super.updateBean();
Configurations.update(new Worker() { Configurations.update(new Worker() {
@ -74,5 +76,14 @@ public class ServerFitAttrPane extends BaseFitAttrPane {
} }
}; };
} }
@Override
protected void initPrompt() {
if (fitAttrModelList.size() == 3) {
UILabel uiLabel = new UILabel(Toolkit.i18nText("Fine-Designer_Fit_Attr_Pane_Hint"));
uiLabel.setForeground(Color.lightGray);
contentJPanel.add(uiLabel);
}
}
} }

Loading…
Cancel
Save