Browse Source

Pull request #7303: 无JIRA任务,处理冲突

Merge in DESIGN/design from ~YVAN/design:feature/x to feature/x

* commit '296e1cb37aa6605799f366ce1237cc8fce9f40e9':
  REPORT-64451 最新官网jar包,11.0设计器切换成英文,新建决策报表异常
  REPORT-64811 保持设计器商城下载reu文件名中的版本信息
  CHART-21877 fix:fvs.cpt 批量设置单元格背景颜色后 单元格字体是黑色
  CHART-22076 fix:fvs.cpt 单元格设置超链删除超链 文本白色
  REPORT-64606 插件修改active逻辑重构-插件校验未通过,没有被禁用 【问题原因】未适配插件管理里的插件运行状态 【改动思路】1. 传递正确的插件管理里请求的插件运行状态;2. 当isActive与isRunning不匹配时,保证可以正确的启用或禁用插件 【review建议】无
  update
  CHART-22090 条件属性-颜色控件残留
feature/x
Yvan 3 years ago
parent
commit
1296169113
  1. 3
      designer-base/src/main/java/com/fr/design/extra/PluginUtils.java
  2. 4
      designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java
  3. 10
      designer-base/src/main/java/com/fr/design/mainframe/share/ComponentShareUtil.java
  4. 16
      designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java
  5. 11
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java
  6. 13
      designer-form/src/main/java/com/fr/design/mainframe/FormWidgetDetailPane.java
  7. 11
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/OnlineWidgetBlock.java
  8. 2
      designer-form/src/main/java/com/fr/design/mainframe/share/util/DownloadUtils.java
  9. 5
      designer-realize/src/main/java/com/fr/design/actions/utils/ReportActionUtils.java
  10. 3
      designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java
  11. 2
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/AbstractCellAttrPane.java
  12. 7
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java

3
designer-base/src/main/java/com/fr/design/extra/PluginUtils.java

@ -269,7 +269,8 @@ public class PluginUtils {
jo.put("vendor", pluginContext.getVendor());
jo.put("price", pluginContext.getPrice());
jo.put("requiredJarTime", pluginContext.getRequiredJarTime());
jo.put("active", pluginContext.isActive());
// 前端需求的active实际上是插件的运行状态,通过isRunning()获取
jo.put("active", pluginContext.isRunning());
jo.put("hidden", pluginContext.isHidden());
jo.put("free", pluginContext.isFree());
jo.put("licDamaged", pluginContext.isLicDamaged());

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

@ -4,6 +4,7 @@ package com.fr.design.gui.style;
* Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved.
*/
import com.fr.base.BaseUtils;
import com.fr.base.CellBorderStyle;
import com.fr.base.Style;
import com.fr.design.constants.LayoutConstants;
@ -17,6 +18,7 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.general.IOUtils;
import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils;
import com.fr.stable.Constants;
import com.fr.stable.CoreConstants;
@ -238,7 +240,7 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse
public Style update(Style style) {
if (style == null) {
style = Style.DEFAULT_STYLE;
style = AdjustWorkBookDefaultStyleUtils.adjustCellElement(Style.DEFAULT_STYLE);
}
if (backgroundPane.currentPane.isBackgroundChange()) {

10
designer-base/src/main/java/com/fr/design/mainframe/share/ComponentShareUtil.java

@ -2,11 +2,14 @@ package com.fr.design.mainframe.share;
import com.fr.design.DesignerEnvManager;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.locale.impl.ShowOnlineWidgetMark;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.reuse.ComponentReuseNotificationInfo;
import com.fr.form.share.constants.ComponentPath;
import com.fr.form.share.group.filter.ReuFilter;
import com.fr.design.DesignerCloudURLManager;
import com.fr.general.locale.LocaleCenter;
import com.fr.general.locale.LocaleMark;
import com.fr.workspace.WorkContext;
/**
@ -23,7 +26,12 @@ public class ComponentShareUtil {
* @return
*/
public static boolean needSwitch2OnlineTab() {
return DesignerCloudURLManager.getInstance().isConnected() && !hasTouched() && isCurrentTplNewCreate();
return DesignerCloudURLManager.getInstance().isConnected() && !hasTouched() && isCurrentTplNewCreate() && isShowOnlineWidgetRepoPane();
}
public static boolean isShowOnlineWidgetRepoPane() {
LocaleMark<Boolean> localeMark = LocaleCenter.getMark(ShowOnlineWidgetMark.class);
return localeMark.getValue();
}
/**

16
designer-base/src/main/java/com/fr/design/utils/gui/AdjustWorkBookDefaultStyleUtils.java

@ -17,6 +17,7 @@ public class AdjustWorkBookDefaultStyleUtils {
private static final Color TEMPLATE_BACKGROUND = new Color(16, 11, 43);
private static final Color CELL_ELEMENT_BORDER = new Color(110, 110, 110);
private static final Color CELL_ELEMENT_FONT_FOREGROUND = Color.WHITE;
private static Color currentStoryBack = null;
@ -31,13 +32,24 @@ public class AdjustWorkBookDefaultStyleUtils {
public static void adjustCellElement(CellElement cellElement) {
if (DesignModeContext.isDuchampMode()) {
Style style = cellElement.getStyle();
style = style.deriveFRFont(style.getFRFont().applyForeground(Color.WHITE));
style = adjustCellElement(style);
cellElement.setStyle(style);
}
}
public static Style adjustCellElement(Style style) {
if (DesignModeContext.isDuchampMode()) {
style = style.deriveFRFont(style.getFRFont().applyForeground(CELL_ELEMENT_FONT_FOREGROUND));
style = style.deriveBorder(0, CELL_ELEMENT_BORDER,
0, CELL_ELEMENT_BORDER,
0, CELL_ELEMENT_BORDER,
0, CELL_ELEMENT_BORDER);
cellElement.setStyle(style);
}
return style;
}
public static Color adjustCellElementFontForeground(Color color) {
return DesignModeContext.isDuchampMode() ? CELL_ELEMENT_FONT_FOREGROUND : color;
}
public static void adjustFloatElement(FloatElement floatElement) {

11
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartUIListControlPane.java

@ -25,6 +25,7 @@ import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.Point;
import java.awt.Window;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -210,6 +211,16 @@ public abstract class VanChartUIListControlPane extends UIListControlPane implem
public void doCancel() {
setVisible(false);
}
@Override
public void setVisible(boolean b) {
super.setVisible(b);
//把一些可能没隐藏的子弹框隐藏 比如 边框-颜色弹框
for (Window window : getOwnedWindows()) {
window.setVisible(false);
}
}
}
}

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

@ -6,13 +6,11 @@ import com.fr.design.gui.ibutton.UIHeadGroup;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.locale.impl.ShowOnlineWidgetMark;
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.share.ui.local.LocalWidgetRepoPane;
import com.fr.design.mainframe.share.ui.online.OnlineWidgetRepoPane;
import com.fr.general.locale.LocaleCenter;
import com.fr.general.locale.LocaleMark;
import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.JPanel;
@ -190,14 +188,9 @@ public class FormWidgetDetailPane extends FormDockView {
private void initPaneList() {
paneList = new ArrayList<>();
paneList.add(LocalWidgetRepoPane.getInstance());
if (isShowOnlineWidgetRepoPane()) {
if (ComponentShareUtil.isShowOnlineWidgetRepoPane()) {
OnlineWidgetRepoPane.getInstance().refresh();
paneList.add(OnlineWidgetRepoPane.getInstance());
}
}
private boolean isShowOnlineWidgetRepoPane() {
LocaleMark<Boolean> localeMark = LocaleCenter.getMark(ShowOnlineWidgetMark.class);
return localeMark.getValue();
}
}

11
designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/OnlineWidgetBlock.java

@ -221,6 +221,14 @@ public class OnlineWidgetBlock extends AbstractOnlineWidgetBlock {
}
}
private String createLocalReuFilename() {
String filename = widget.getFileLoca();
if (StringUtils.isEmpty(filename) || !filename.endsWith(".reu")) {
filename = widget.getName() + "." + widget.getUuid() + ".reu";
}
return filename;
}
private void downLoadWidget() {
CarouselStateManger.getInstance().suspend(CarouselStateManger.DOWNLOAD_COMPONENT);
if (OnlineWidgetRepoPane.getInstance().isShowPackagePanel()) {
@ -242,7 +250,8 @@ public class OnlineWidgetBlock extends AbstractOnlineWidgetBlock {
protected Boolean doInBackground() {
String filePath;
try {
filePath = DownloadUtils.download(widget.getId(), widget.getName() + "." + widget.getUuid(), process);
String filename = createLocalReuFilename();
filePath = DownloadUtils.download(widget.getId(), filename, process);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return false;

2
designer-form/src/main/java/com/fr/design/mainframe/share/util/DownloadUtils.java

@ -80,7 +80,7 @@ public class DownloadUtils {
long totalSize = entity.getContentLength();
InputStream content = entity.getContent();
filePath = StableUtils.pathJoin(realPath, fileName + ".reu");
filePath = StableUtils.pathJoin(realPath, fileName);
StableUtils.makesureFileExist(new File(filePath));
FileOutputStream writer = new FileOutputStream(filePath);
byte[] data = new byte[PluginConstants.BYTES_NUM];

5
designer-realize/src/main/java/com/fr/design/actions/utils/ReportActionUtils.java

@ -4,6 +4,7 @@ import com.fr.base.Style;
import com.fr.design.actions.cell.style.StyleActionInterface;
import com.fr.design.mainframe.DesignOperationEvent;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils;
import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase;
import com.fr.event.EventDispatcher;
import com.fr.grid.selection.CellSelection;
@ -15,7 +16,7 @@ import com.fr.report.cell.TemplateCellElement;
import com.fr.report.elementcase.ElementCase;
import com.fr.report.elementcase.TemplateElementCase;
import java.awt.*;
import java.awt.Rectangle;
public class ReportActionUtils {
private ReportActionUtils() {
@ -113,7 +114,7 @@ public class ReportActionUtils {
CellElement editCellElement = report.getCellElement(((CellSelection) sel).getColumn(), ((CellSelection) sel).getRow());
if (editCellElement == null) {
return Style.DEFAULT_STYLE;
return AdjustWorkBookDefaultStyleUtils.adjustCellElement(Style.DEFAULT_STYLE);
}
//peter:直接返回当前编辑元素的Style

3
designer-realize/src/main/java/com/fr/design/mainframe/HyperlinkGroupPaneActionImpl.java

@ -6,6 +6,7 @@ import com.fr.design.designer.TargetComponent;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider;
import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils;
import com.fr.general.FRFont;
import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.FloatSelection;
@ -82,7 +83,7 @@ public class HyperlinkGroupPaneActionImpl implements HyperlinkGroupPaneActionPro
frFont = frFont.applyForeground(Color.blue);
frFont = frFont.applyUnderline(Constants.LINE_THIN);
} else {
frFont = frFont.applyForeground(Color.black);
frFont = frFont.applyForeground(AdjustWorkBookDefaultStyleUtils.adjustCellElementFontForeground(Color.black));
frFont = frFont.applyUnderline(Constants.LINE_NONE);
}
editCellElement.setStyle(elementStyle.deriveFRFont(frFont));

2
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/AbstractCellAttrPane.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.cell.settingpane;
import com.fr.design.mainframe.AbstractAttrPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils;
import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase;
import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.FloatSelection;
@ -53,6 +54,7 @@ public abstract class AbstractCellAttrPane extends AbstractAttrPane {
TemplateCellElement cellElement = elementCase.getTemplateCellElement(cs.getColumn(), cs.getRow());
if (cellElement == null) {
cellElement = DefaultThemedTemplateCellElementCase.createInstance(cs.getColumn(), cs.getRow());
AdjustWorkBookDefaultStyleUtils.adjustCellElement(cellElement);
}
this.cellElement = cellElement;
elementCase.addCellElement(this.cellElement);

7
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellStylePane.java

@ -9,7 +9,9 @@ import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.mainframe.cell.settingpane.style.StylePane;
import com.fr.design.mainframe.theme.utils.DefaultThemedTemplateCellElementCase;
import com.fr.design.style.BorderUtils;
import com.fr.design.utils.gui.AdjustWorkBookDefaultStyleUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.report.cell.DefaultTemplateCellElement;
import com.fr.report.cell.TemplateCellElement;
import com.fr.report.elementcase.TemplateElementCase;
@ -18,6 +20,7 @@ import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Rectangle;
/**
* @author zhou
@ -112,9 +115,13 @@ public class CellStylePane extends AbstractCellAttrPane {
public void visit(int column, int row, TemplateCellElement cellElement) {
if (cellElement == null) {
cellElement = DefaultThemedTemplateCellElementCase.createInstance(column, row);
AdjustWorkBookDefaultStyleUtils.adjustCellElement(cellElement);
elementCase.addCellElement(cellElement);
}
Style style = stylePane.updateBean();
if (style == null) {
style = AdjustWorkBookDefaultStyleUtils.adjustCellElement(Style.DEFAULT_STYLE);
}
cellElement.setStyle(style);
}
});

Loading…
Cancel
Save