Browse Source

Merge pull request #8557 in DESIGN/design from release/11.0 to feature/x

* commit '62605eb904df9b63db2547993debf02e4e6b204a':
  CHART-22994 图表背景色控件需要更换为支持透明色的控件
  REPORT-68638 design fix:没有配色的时候渲染和配置界面配色不一致,统一成配置界面的
  REPORT-68726 【迭代】【数据集管理优化】多张模板切换触发搜索,设计器概率卡住 【问题原因】之前没修改好,可能出现搜索框文字不清空的情况 【改动思路】修改为每次离开搜索模式时,情况搜索框 【review建议】无
  REPORT-68357 fix:namestyle导致fvs.cpt中单元格样式中有主题相关配置
  无jira任务,屏蔽部分功能入口
  REPORT-69575 设计器在线组件刷不出来
  无jira任务,屏蔽部分功能入口
  REPORT-69422 产品调整部分UI && 删除数据集没反应 【问题原因】1.搜索匹配文字高亮调整为匹配文字加粗;2.UIList获取选中对象的方法返回为空 【改动思路】1.改UI;2.自己写一下获取选中对象的逻辑 【review建议】无
  REPORT-68987 把高级编辑当作可选的
feature/x
superman 3 years ago
parent
commit
eaee94241b
  1. 20
      designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java
  2. 9
      designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java
  3. 2
      designer-base/src/main/java/com/fr/design/data/datapane/management/search/view/TreeSearchRendererHelper.java
  4. 3
      designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java
  5. 9
      designer-base/src/main/java/com/fr/design/gui/ilist/CheckBoxListWithPartialSelect.java
  6. 8
      designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java
  7. 2
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartTitleAndBackgroundStylePane.java
  8. 3
      designer-base/src/main/java/com/fr/design/mainframe/theme/utils/DefaultThemedTemplateCellElementCase.java
  9. 18
      designer-base/src/main/java/com/fr/design/style/color/ColorAdjustPane.java
  10. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundPane.java
  11. 7
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/block/AbstractOnlineWidgetBlock.java
  12. 9
      designer-form/src/main/java/com/fr/design/mainframe/share/ui/online/OnlineWidgetTabPane.java

20
designer-base/src/main/java/com/fr/design/data/datapane/TableDataTreePane.java

@ -596,6 +596,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
int[] rows = tableDataTree.getSelectionRows();
tableDataTree.refreshChildByName(tdName);
tableDataTree.setSelectionRows(rows);
FineLoggerFactory.getLogger().info("add table data succeeded for {}", tdName);
}
@Override
@ -1057,7 +1058,11 @@ public class TableDataTreePane extends BasicTableDataTreePane {
TableDataTreeSearchManager.getInstance().outOfSearchMode();
}
for (Object toRemove : selectedValues) {
doRemove((NameObject) toRemove);
try {
doRemove((String) toRemove);
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e, "remove table data failed for {}", toRemove);
}
}
}
@ -1069,9 +1074,9 @@ public class TableDataTreePane extends BasicTableDataTreePane {
basicDialog.setVisible(true);
}
private void doRemove(NameObject selectedNO) {
private void doRemove(String toRemove) throws Exception {
// richer:这个地方为什么要在DataSourceTree里面去remove呢?多此一举吧
op.removeAction(selectedNO.getName());
op.removeAction(toRemove);
tableDataTree.refresh();
// Richie:默认最后一行获得焦点.
tableDataTree.requestFocus();
@ -1080,14 +1085,15 @@ public class TableDataTreePane extends BasicTableDataTreePane {
checkButtonEnabled();
//删掉缓存配置
StrategyConfigAttrUtils.removeStrategyConfig(selectedNO.getName());
StrategyConfigAttrUtils.removeStrategyConfig(toRemove);
// 如果一个模版是平台开启,这个数据集的配置不会存xml,预览模版时直接从全局配置copy,这样
// 导致删除的时候StrategyConfigsAttrSavedHook没有通过前后配置比较感知数据集被删除,因此不会发出事件让其失效
// 这里额外发出一次数据集修改事件
StrategyEventsNotifier.modifyDataSet(new DSMapping(getTplPath(), new DsNameTarget(selectedNO.getName())));
DesignTableDataManager.removeSelectedColumnNames(selectedNO.getName());
DesignModelAdapter.getCurrentModelAdapter().removeTableDataParameters(selectedNO.getName());
StrategyEventsNotifier.modifyDataSet(new DSMapping(getTplPath(), new DsNameTarget(toRemove)));
DesignTableDataManager.removeSelectedColumnNames(toRemove);
DesignModelAdapter.getCurrentModelAdapter().removeTableDataParameters(toRemove);
FineLoggerFactory.getLogger().info("remove table data succeeded for {}", toRemove);
}
}

9
designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java

@ -156,9 +156,7 @@ public class TreeSearchToolbarPane extends JPanel implements TreeSearchStatusCha
returnLabel.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
searchTextField.setText(StringUtils.EMPTY);
TableDataTreeSearchManager.getInstance().outOfSearchMode();
switchPane(TOOLBAR_PANE);
}
});
@ -200,6 +198,11 @@ public class TreeSearchToolbarPane extends JPanel implements TreeSearchStatusCha
@Override
public void updateTreeSearchChange(TreeSearchStatusChangeEvent event) {
TreeSearchStatus treeSearchStatus = event.getTreeSearchStatus();
switchPane(treeSearchStatus == TreeSearchStatus.NOT_IN_SEARCH_MODE ? TOOLBAR_PANE : SEARCH_PANE);
if (treeSearchStatus == TreeSearchStatus.NOT_IN_SEARCH_MODE) {
this.searchTextField.setText(StringUtils.EMPTY);
switchPane(TOOLBAR_PANE);
} else {
switchPane(SEARCH_PANE);
}
}
}

2
designer-base/src/main/java/com/fr/design/data/datapane/management/search/view/TreeSearchRendererHelper.java

@ -67,7 +67,7 @@ public class TreeSearchRendererHelper {
}
private String getHighlightText(String text, String textToHighlight) {
String highLightTemplate = "<font color=\"#419BF9\">$1</font>";
String highLightTemplate = "<strong>$1</strong>";
if (textToHighlight.length() == 0) {
return text;
}

3
designer-base/src/main/java/com/fr/design/formula/FunctionConstants.java

@ -58,6 +58,7 @@ public final class FunctionConstants {
public static FunctionGroup ALL = getAllFunctionGroup();
public static List<String> abandonFormulas = Arrays.asList("CIRCULAR", "CROSSLAYERTOTAL", "HIERARCHY", "LAYERTOTAL");
public static NameAndFunctionList NEW = getNewFunctionList();
private static List<String> shieldedFormulas = Arrays.asList("ENBYSTRNUM","TEXTGETNUM" ,"GETCHARNUM","GCD", "LCM");
static {
loadEmbededFunctions();
@ -102,7 +103,7 @@ public final class FunctionConstants {
if (StableUtils.classInstanceOf(cls, iface)) {
Function inst;
inst = (Function) cls.newInstance();
if (abandonFormulas.contains(inst.getClass().getSimpleName())) {
if (abandonFormulas.contains(inst.getClass().getSimpleName()) || shieldedFormulas.contains(inst.getClass().getSimpleName())) {
continue;
}
for (NameAndTypeAndFunctionList EMBFUNCTION : EMBFUNCTIONS) {

9
designer-base/src/main/java/com/fr/design/gui/ilist/CheckBoxListWithPartialSelect.java

@ -16,6 +16,7 @@ import java.awt.Component;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.ArrayList;
import java.util.List;
/**
@ -67,7 +68,13 @@ public class CheckBoxListWithPartialSelect extends JPanel {
}
public List<Object> getSelectedObjects() {
return dataList.getSelectedValuesList();
List<Object> seleted = new ArrayList<>();
for (UICheckBox dataCheckBox : dataCheckBoxes) {
if (dataCheckBox.isSelected()) {
seleted.add(dataCheckBox.getText());
}
}
return seleted;
}
protected MouseListener getDataListMouseListener() {

8
designer-base/src/main/java/com/fr/design/javascript/JSContentPane.java

@ -63,7 +63,9 @@ public class JSContentPane extends BasicPane {
initFunctionTitle(args);
JPanel jsParaPane = createJSParaPane();
addNewPaneLabel();
if (needAdvancedEditor()) {
addNewPaneLabel();
}
this.add(jsParaPane, BorderLayout.NORTH);
UIScrollPane sp = createContentTextAreaPanel();
@ -323,4 +325,8 @@ public class JSContentPane extends BasicPane {
return provider;
}
protected boolean needAdvancedEditor() {
return true;
}
}

2
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartTitleAndBackgroundStylePane.java

@ -77,7 +77,7 @@ public class ChartTitleAndBackgroundStylePane extends AbstractChartStylePane {
private void initList() {
paneList = new ArrayList<>();
paneList.add(new NullBackgroundQuickPane());
paneList.add(new ColorBackgroundQuickPane());
paneList.add(new ColorBackgroundQuickPane(true));
paneList.add(new ImageBackgroundQuickPane(false));
paneList.add(new VanChartGradientPane());
}

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;

2
designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundPane.java

@ -148,7 +148,7 @@ public class VanChartBackgroundPane extends BasicPane {
protected void initList() {
paneList.add(new NullBackgroundQuickPane());
paneList.add(new ColorBackgroundQuickPane());
paneList.add(new ColorBackgroundQuickPane(true));
paneList.add(new ImageBackgroundQuickPane(false));
paneList.add(new VanChartGradientPane());
}

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