Browse Source

Merge pull request #11227 in DESIGN/design from bugfix/11.0 to feature/x

* commit '129ee326d69047bf8a591faaf19ac3d173b94b68':
  REPORT-84144 智能运维RPC部分移除
  REPORT-88307 控件-标签控件-将设计器中的“字体大小”改为“字体”
  REPORT-88359 设计器Key缺失
  REPORT-88359 设计器Key缺失
  REPORT-87768 给子类提供一下重写的能力
  REPORT-86045 FR11决策报表假保存-报表块内撤销后,再编辑除此报表块外部分,保存模板 实际未保存
  REPORT-87768 判断逻辑前置
  REPORT-86430 AlphaFine插件中心tab页显示内容有误
  REPORT-87576 取色板使用后会让fr卡住。可稳定复现
  REPORT-87768 fix:考虑另存为
  REPORT-87013 设计器11.0.11更新日志显示的信息是重复的
  REPORT-87576 取色板使用后会让fr卡住。可稳定复现
  REPORT-87768 fix:规避下templateID的重复生成
  REPORT-86045 FR11决策报表假保存-报表块内撤销后,再编辑除此报表块外部分,保存模板 实际未保存
feature/x
superman 2 years ago
parent
commit
eac9e8774f
  1. 41
      designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java
  2. 2
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  3. 3
      designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java
  4. 11
      designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java
  5. 88
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  6. 4
      designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java
  7. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java
  8. 2
      designer-form/src/main/java/com/fr/design/widget/ui/designer/btn/ButtonGroupDefinePane.java
  9. 2
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/PluginSearchManager.java

41
designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java

@ -265,34 +265,31 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse
int lineStyle = currentLineCombo.getSelectedLineStyle();
Color lineColor = currentLineColorPane.getSelectObject();
CellBorderStyle cellBorderStyle = new CellBorderStyle();
if (topToggleButton.isSelected()) {
cellBorderStyle.setTopColor(lineColor);
if (lineColor != null) {
if (topToggleButton.isSelected()) {
cellBorderStyle.setTopColor(lineColor);
}
if (bottomToggleButton.isSelected()) {
cellBorderStyle.setBottomColor(lineColor);
}
if (leftToggleButton.isSelected()) {
cellBorderStyle.setLeftColor(lineColor);
}
if (rightToggleButton.isSelected()) {
cellBorderStyle.setRightColor(lineColor);
}
if (verticalToggleButton.isSelected()) {
cellBorderStyle.setVerticalColor(lineColor);
}
if (horizontalToggleButton.isSelected()) {
cellBorderStyle.setHorizontalColor(lineColor);
}
}
cellBorderStyle.setTopStyle(topToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE);
if (bottomToggleButton.isSelected()) {
cellBorderStyle.setBottomColor(lineColor);
}
cellBorderStyle.setBottomStyle(bottomToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE);
if (leftToggleButton.isSelected()) {
cellBorderStyle.setLeftColor(lineColor);
}
cellBorderStyle.setLeftStyle(leftToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE);
if (rightToggleButton.isSelected()) {
cellBorderStyle.setRightColor(lineColor);
}
cellBorderStyle.setRightStyle(rightToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE);
if (verticalToggleButton.isSelected()) {
cellBorderStyle.setVerticalColor(lineColor);
}
cellBorderStyle.setVerticalStyle(verticalToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE);
if (horizontalToggleButton.isSelected()) {
cellBorderStyle.setHorizontalColor(lineColor);
}
cellBorderStyle.setHorizontalStyle(horizontalToggleButton.isSelected() ? lineStyle : Constants.LINE_NONE);
outerToggleButton.setSelected(leftToggleButton.isSelected() && bottomToggleButton.isSelected() && rightToggleButton.isSelected() && topToggleButton.isSelected());

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

@ -329,7 +329,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
/**
* 为另存的模板创建新的模板id
*/
private void generateNewTemplateIdForSaveAs() {
protected void generateNewTemplateIdForSaveAs() {
generateTemplateId();
}

3
designer-base/src/main/java/com/fr/design/record/analyzer/advice/MonitorAdvice.java

@ -11,6 +11,7 @@ import com.fr.intelli.record.Measurable;
import com.fr.intelli.record.MeasureObject;
import com.fr.intelli.record.MeasureUnit;
import com.fr.log.FineLoggerFactory;
import com.fr.log.message.AbstractMessage;
import com.fr.measure.DBMeterFactory;
import com.fr.stable.StringUtils;
import com.fr.third.net.bytebuddy.asm.Advice;
@ -75,7 +76,7 @@ public class MonitorAdvice implements DesignerAnalyzerAdvice {
List<Object> newArgs = new ArrayList<>(Arrays.asList(args));
newArgs.add(id);
recordSQLDetail(id);
Object message = null;
AbstractMessage message = null;
try {
message = measurable.durableEntity(measureObject, newArgs.toArray());
} catch (Throwable throwable) {

11
designer-base/src/main/java/com/fr/design/update/ui/dialog/UpdateMainDialog.java

@ -118,6 +118,8 @@ public class UpdateMainDialog extends UIDialog {
private ArrayList<Object[]> updateInfoList;
private Set<String> titleSet;
private boolean getUpdateInfoSuccess;
private UpdateInfoCachePropertyManager cacheProperty;
@ -267,6 +269,7 @@ public class UpdateMainDialog extends UIDialog {
String keyword = searchUpdateInfoKeyword.getText();
if (ComparatorUtils.equals(keyword, StringUtils.EMPTY) && getUpdateInfoSuccess) {
updateInfoList.clear();
titleSet.clear();
getUpdateInfo(keyword).execute();
}
}
@ -281,6 +284,7 @@ public class UpdateMainDialog extends UIDialog {
public void actionPerformed(ActionEvent e) {
if (getUpdateInfoSuccess) {
updateInfoList.clear();
titleSet.clear();
getUpdateInfo(searchUpdateInfoKeyword.getText()).execute();
}
}
@ -388,6 +392,7 @@ public class UpdateMainDialog extends UIDialog {
private SwingWorker<JSONArray, Void> getUpdateInfo(final String keyword) {
updateInfoList = new ArrayList<>();
titleSet = new HashSet<>();
lastUpdateCacheTime = UpdateConstants.CHANGELOG_X_START;
String cacheConfigPath = getUpdateCacheConfig();
cacheProperty = new UpdateInfoCachePropertyManager(StableUtils.pathJoin(WorkContext.getCurrent().getPath(), "resources", "offlineres", cacheConfigPath));
@ -489,6 +494,7 @@ public class UpdateMainDialog extends UIDialog {
}
}
if (isValid(updateInfo, GeneralUtils.objectToString(curJarDate))) {
titleSet.add(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]);
updateInfoList.add(new Object[]{UPDATELOG_FORMAT.format(updateTime), updateInfo[UpdateInfoTable.UPDATE_VERSION_INDEX], updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX], updateTime.after(curJarDate)});
}
}
@ -501,7 +507,7 @@ public class UpdateMainDialog extends UIDialog {
private boolean isValid(String[] updateInfo, String curJarDate) {
return isValidLogInfo(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]) && curJarDate != null && curJarDate.compareTo(updateInfo[UpdateInfoTable.UPDATE_DATE_INDEX]) <= 0;
return isValidLogInfo(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]) && curJarDate != null && curJarDate.compareTo(updateInfo[UpdateInfoTable.UPDATE_DATE_INDEX]) <= 0 && !titleSet.contains(updateInfo[UpdateInfoTable.UPDATE_TITLE_INDEX]);
}
private void updateCachedInfoFile(JSONArray jsonArray) throws Exception {
@ -561,6 +567,7 @@ public class UpdateMainDialog extends UIDialog {
}
Date curDate = UPDATE_INFO_TABLE_FORMAT.parse(currentNO, new ParsePosition(currentNO.indexOf("-") + 1));
if (isValid4GenerateInfo(updateTitle, GeneralUtils.objectToString(curDate), updateTimeStr)) {
titleSet.add(updateTitle);
updateInfoList.add(new Object[]{updateTimeStr, updateVersionStr, updateTitle, updateTime.after(curJarDate)});
}
}
@ -568,7 +575,7 @@ public class UpdateMainDialog extends UIDialog {
}
private boolean isValid4GenerateInfo(String updateTitle, String curDate, String updateTimeStr) {
return isValidLogInfo(updateTitle) && curDate.compareTo(updateTimeStr) <= 0;
return isValidLogInfo(updateTitle) && curDate.compareTo(updateTimeStr) <= 0 && !titleSet.contains(updateTitle);
}
private boolean containsKeyword(String str, String keyword) {

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

@ -6,8 +6,6 @@ import com.fr.base.Parameter;
import com.fr.base.Releasable;
import com.fr.base.extension.FileExtension;
import com.fr.base.iofile.attr.ExtendSharableAttrMark;
import com.fr.base.theme.FineColorGather;
import com.fr.base.theme.FineColorManager;
import com.fr.base.theme.FineColorSynchronizer;
import com.fr.base.theme.FormTheme;
import com.fr.base.theme.TemplateTheme;
@ -17,8 +15,8 @@ import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.FormMobileAttrAction;
import com.fr.design.actions.FormECParallelCalAction;
import com.fr.design.actions.FormMobileAttrAction;
import com.fr.design.actions.TemplateParameterAction;
import com.fr.design.actions.core.WorkBookSupportable;
import com.fr.design.actions.file.export.EmbeddedFormExportExportAction;
@ -56,8 +54,8 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.form.FormECCompositeProvider;
import com.fr.design.mainframe.form.FormECDesignerProvider;
import com.fr.design.mainframe.reuse.ComponentReuseNotificationInfo;
import com.fr.design.mainframe.share.collect.ComponentCollector;
import com.fr.design.mainframe.share.ComponentShareUtil;
import com.fr.design.mainframe.share.collect.ComponentCollector;
import com.fr.design.mainframe.template.info.JFormProcessInfo;
import com.fr.design.mainframe.template.info.TemplateProcessInfo;
import com.fr.design.mainframe.theme.dialog.TemplateThemeUsingDialog;
@ -71,7 +69,6 @@ import com.fr.design.parameter.ParameterPropertyPane;
import com.fr.design.preview.FormPreview;
import com.fr.design.preview.MobilePreview;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.gui.LayoutUtils;
import com.fr.file.FILE;
import com.fr.file.FILEChooserPane;
@ -110,7 +107,14 @@ import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.tree.TreePath;
import java.awt.*;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Insets;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
@ -1266,46 +1270,48 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
private void refreshTarget(Form form) {
setTarget(form);
if (HistoryTemplateListCache.getInstance().getCurrentEditingTemplate() == this) {
if (this.index == FORM_TAB) {
// save state
FormArea formArea = formDesign.getArea();
int horizontalValue = formArea.getHorizontalValue();
int verticalValue = formArea.getVerticalValue();
Dimension areaSize = formArea.getAreaSize();
double widthValue = formArea.getWidthPaneValue();
double heightValue = formArea.getHeightPaneValue();
double slideValue = formArea.getSlideValue();
Widget[] selectedWidgets = formArea.getFormEditor().getSelectionModel().getSelection().getSelectedWidgets();
// refresh ui
JForm.this.refreshRoot();
// restore state
formDesign.getArea().setAreaSize(areaSize, horizontalValue, verticalValue, widthValue, heightValue, slideValue);
formDesign.getArea().undoFixLayoutState(formArea.isFixLayout());
this.formDesign.getSelectionModel().setSelectedCreators(FormSelectionUtils.rebuildSelection(formDesign.getRootComponent(),
formDesign.getRootComponent() == selectedBodyLayout() ? selectedWidgets : new Widget[]{selectedBodyLayout().toData()}));
if (HistoryTemplateListCache.getInstance().getCurrentEditingTemplate() != this) {
return;
}
// save state
FormArea formArea = formDesign.getArea();
int horizontalValue = formArea.getHorizontalValue();
int verticalValue = formArea.getVerticalValue();
Dimension areaSize = formArea.getAreaSize();
double widthValue = formArea.getWidthPaneValue();
double heightValue = formArea.getHeightPaneValue();
double slideValue = formArea.getSlideValue();
Widget[] selectedWidgets = formArea.getFormEditor().getSelectionModel().getSelection().getSelectedWidgets();
// refresh ui
JForm.this.refreshRoot();
// restore state
formDesign.getArea().setAreaSize(areaSize, horizontalValue, verticalValue, widthValue, heightValue, slideValue);
formDesign.getArea().undoFixLayoutState(formArea.isFixLayout());
this.formDesign.getSelectionModel().setSelectedCreators(FormSelectionUtils.rebuildSelection(formDesign.getRootComponent(),
formDesign.getRootComponent() == selectedBodyLayout() ? selectedWidgets : new Widget[]{selectedBodyLayout().toData()}));
refreshToolArea();
refreshToolArea();
// 停止编辑 恢复浮层展示
TreePath[] treePaths = FormHierarchyTreePane.getInstance(formDesign).getComponentTree().getSelectedTreePath();
if (treePaths != null) {
for (TreePath path : treePaths) {
if (path != null) {
formDesign.stopEditing(path);
}
}
// 停止编辑 恢复浮层展示
TreePath[] treePaths = FormHierarchyTreePane.getInstance(formDesign).getComponentTree().getSelectedTreePath();
if (treePaths != null) {
for (TreePath path : treePaths) {
if (path != null) {
formDesign.stopEditing(path);
}
} else {
String widgetName = this.formDesign.getElementCaseContainerName();
FormElementCaseProvider dataTable = form.getElementCaseByName(widgetName);
this.reportComposite.setSelectedWidget(dataTable);
formDesign.setElementCase(dataTable);
}
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView();
}
if (this.index != FORM_TAB) {
String widgetName = this.formDesign.getElementCaseContainerName();
FormElementCaseProvider dataTable = form.getElementCaseByName(widgetName);
this.reportComposite.setSelectedWidget(dataTable);
formDesign.setElementCase(dataTable);
}
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()).refreshDockingView();
}
@Override

4
designer-form/src/main/java/com/fr/design/parameter/RootDesignDefinePane.java

@ -134,7 +134,7 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> {
displayReport = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Display_Nothing_Before_Query"));
UIComponentUtils.setLineWrap(displayReport);
useParamsTemplate = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Use_Params_Template"));
fireAfterEditor = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("触发编辑结束事件"));
fireAfterEditor = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Trigger_Editing_End_Event"));
fireAfterEditor.setEnabled(false);
fireAfterEditor.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0));
useParamsTemplate.addChangeListener(e -> {
@ -189,7 +189,7 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> {
displayReport = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Display_Nothing_Before_Query"));
UIComponentUtils.setLineWrap(displayReport);
useParamsTemplate = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Use_Params_Template"));
fireAfterEditor = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("触发编辑结束事件"));
fireAfterEditor = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Trigger_Editing_End_Event"));
fireAfterEditor.setEnabled(false);
fireAfterEditor.setBorder(BorderFactory.createEmptyBorder(0, 30, 0, 0));
useParamsTemplate.addChangeListener(e -> {

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/LabelDefinePane.java

@ -68,7 +68,7 @@ public class LabelDefinePane extends AbstractDataModify<Label> {
int[][] rowCount = {{1, 3}, {1, 1}, {1, 1}, {1, 1}, {1, 1}};
UILabel widgetValueLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Estate_Widget_Value"));
widgetValueLabel.setVerticalAlignment(SwingConstants.TOP);
UILabel fontLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Font_Size"));
UILabel fontLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Font"));
fontLabel.setVerticalAlignment(SwingConstants.TOP);
Component[][] components = new Component[][]{
new Component[]{widgetValueLabel, formWidgetValuePane},

2
designer-form/src/main/java/com/fr/design/widget/ui/designer/btn/ButtonGroupDefinePane.java

@ -44,7 +44,7 @@ public abstract class ButtonGroupDefinePane<T extends ButtonGroup> extends Field
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Label_Name")), labelNameTextField},
new Component[]{widgetValueLabel, formWidgetValuePane},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_DS_Dictionary")), dictionaryEditor},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_FR_Font")), fontSizePane},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Font_Size")), fontSizePane},
new Component[]{buttonGroupDictPane, null}
};
double[] rowSize = {p, p, p, p, p, p, p};

2
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/search/manager/impl/PluginSearchManager.java

@ -214,7 +214,7 @@ public class PluginSearchManager implements AlphaFineSearchProvider {
}
return time;
}
}));
}).reversed());
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e, e.getMessage());
}

Loading…
Cancel
Save