Browse Source

Merging in latest from upstream (DESIGN/design:refs/heads/release/11.0)

* commit 'e672f45685f8d2c799176a904165ff09f9908fcd':
  REPORT-68638 design fix:没有配色的时候渲染和配置界面配色不一致,统一成配置界面的
  REPORT-68357 fix:namestyle导致fvs.cpt中单元格样式中有主题相关配置
  REPORT-69575 设计器在线组件刷不出来
newui
Henry.Wang 3 years ago
parent
commit
8a7c44c740
  1. 3
      designer-base/src/main/java/com/fr/design/mainframe/theme/utils/DefaultThemedTemplateCellElementCase.java
  2. 18
      designer-base/src/main/java/com/fr/design/style/color/ColorAdjustPane.java
  3. 7
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/AbstractOnlineWidgetBlock.java
  4. 9
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java

3
designer-base/src/main/java/com/fr/design/mainframe/theme/utils/DefaultThemedTemplateCellElementCase.java

@ -3,6 +3,7 @@ package com.fr.design.mainframe.theme.utils;
import com.fr.base.NameStyle;
import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.settings.ThemedCellStyle;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.mainframe.JTemplate;
import com.fr.report.cell.DefaultTemplateCellElement;
@ -37,7 +38,7 @@ public class DefaultThemedTemplateCellElementCase {
ThemedCellStyle themedCellStyle = theme.getCellStyleList().getUse4Default();
if (themedCellStyle != null) {
NameStyle nameStyle = NameStyle.getPassiveInstance(themedCellStyle.getName(), themedCellStyle.getStyle());
cellElement.setStyle(nameStyle);
cellElement.setStyle(DesignModeContext.isDuchampMode() ? nameStyle.getRealStyle() : nameStyle);
}
}
return cellElement;

18
designer-base/src/main/java/com/fr/design/style/color/ColorAdjustPane.java

@ -1,6 +1,7 @@
package com.fr.design.style.color;
import com.fr.base.BaseUtils;
import com.fr.chart.base.ChartConstants;
import com.fr.design.DesignerEnvManager;
import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener;
@ -12,8 +13,6 @@ import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.util.ArrayList;
import java.util.List;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
@ -23,6 +22,8 @@ import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.List;
/**
* 配色方案选择组合色之后可以调整颜色的组件
@ -33,18 +34,7 @@ import java.awt.image.BufferedImage;
*/
public class ColorAdjustPane extends JPanel implements UIObserver {
public static final Color[] DEFAULT_COLORS = {
new Color(99, 178, 238),
new Color(118, 218, 145),
new Color(248, 203, 127),
new Color(248, 149, 136),
new Color(124, 214, 207),
new Color(145, 146, 171),
new Color(120, 152, 225),
new Color(239, 166, 102),
new Color(237, 221, 134),
new Color(153, 135, 206),
};
public static final Color[] DEFAULT_COLORS = ChartConstants.NEW_FEATURES;
private static final int COUNT_OF_ROW = 8;

7
designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/AbstractOnlineWidgetBlock.java

@ -23,7 +23,6 @@ import javax.swing.JPopupMenu;
import java.awt.Dimension;
import java.awt.Image;
import java.awt.event.MouseEvent;
import java.io.IOException;
import java.net.URL;
/**
@ -75,7 +74,8 @@ public abstract class AbstractOnlineWidgetBlock extends PreviewWidgetBlock<Onlin
public Image getPreviewImage() {
try {
return ImageIO.read(new URL(UriUtils.encodePath(widget.getPicPath(), EncodeConstants.ENCODING_UTF_8)));
} catch (IOException e) {
} catch (Exception e) {
FineLoggerFactory.getLogger().error(widget.getName());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
return getDefaultDisplayImage();
}
@ -88,7 +88,8 @@ public abstract class AbstractOnlineWidgetBlock extends PreviewWidgetBlock<Onlin
String previewURI = UriUtils.encodePath(widget.getPicPath(), EncodeConstants.ENCODING_UTF_8) + "?x-oss-process=image/resize,m_fixed," + "w_" + coverDimension.width +
",h_" + coverDimension.height;
image = ImageIO.read(new URL(previewURI));
} catch (IOException e) {
} catch (Exception e) {
FineLoggerFactory.getLogger().error(widget.getName());
FineLoggerFactory.getLogger().error(e.getMessage(), e);
image = getDefaultDisplayImage();
}

9
designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java

@ -43,6 +43,7 @@ public class OnlineWidgetTabPane extends JPanel {
private CardLayout cardLayout;
private JPanel centerPane;
private boolean packagePaneCreated = false;
private boolean componentPaneCreated = false;
private final List<TabChangeListener> tabChangeListeners;
private OnlineEmbedFilterShowPane embedFilterShowPane;
private OnlineWidgetPackagesShowPane widgetPackagesShowPane;
@ -57,8 +58,6 @@ public class OnlineWidgetTabPane extends JPanel {
this.cardLayout = new CardLayout();
this.centerPane = new JPanel(cardLayout);
this.centerPane.add(new OnlineWidgetShowPane(sharableWidgets), COMPONENT);
this.centerPane.add( embedFilterShowPane = new OnlineEmbedFilterShowPane(new OnlineWidgetShowPane(sharableWidgets, OnlineWidgetSortType.SALES)), COMPONENT_EMBED);
//延迟组件包面板的初始化,防止组件面板里组件的缩略图和组件包面板里组件的缩略图一起加载
this.headGroup = new UITabGroup(new String[]{COMPONENT_PACKAGE, COMPONENT}) {
public void tabChanged(int newSelectedIndex) {
@ -66,6 +65,12 @@ public class OnlineWidgetTabPane extends JPanel {
changeListener.tabChange(newSelectedIndex);
}
if (newSelectedIndex == COMPONENT_TAB_INDEX) {
//延迟组件包面板的初始化,防止组件面板里组件和缩略图和组件包面板里组件的缩略图一起加载
if (!componentPaneCreated) {
centerPane.add(new OnlineWidgetShowPane(sharableWidgets), COMPONENT);
centerPane.add( embedFilterShowPane = new OnlineEmbedFilterShowPane(new OnlineWidgetShowPane(sharableWidgets, OnlineWidgetSortType.SALES)), COMPONENT_EMBED);
componentPaneCreated = true;
}
cardLayout.show(centerPane, ComponentShareUtil.needShowEmbedFilterPane() ? COMPONENT_EMBED : COMPONENT);
} else {
ComponentShareUtil.completeEmbedFilter();

Loading…
Cancel
Save