Browse Source

Merge pull request #8556 in DESIGN/design from final/11.0 to release/11.0

* commit '2ca2d5cf258e64b5ee1adb1ca6ffba27331c6252':
  CHART-22994 图表背景色控件需要更换为支持透明色的控件
  REPORT-68726 【迭代】【数据集管理优化】多张模板切换触发搜索,设计器概率卡住 【问题原因】之前没修改好,可能出现搜索框文字不清空的情况 【改动思路】修改为每次离开搜索模式时,情况搜索框 【review建议】无
  无jira任务,屏蔽部分功能入口
  无jira任务,屏蔽部分功能入口
  REPORT-69422 产品调整部分UI && 删除数据集没反应 【问题原因】1.搜索匹配文字高亮调整为匹配文字加粗;2.UIList获取选中对象的方法返回为空 【改动思路】1.改UI;2.自己写一下获取选中对象的逻辑 【review建议】无
  REPORT-68987 把高级编辑当作可选的
bugfix/11.0
superman 3 years ago
parent
commit
62605eb904
  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. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/component/background/VanChartBackgroundPane.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(); int[] rows = tableDataTree.getSelectionRows();
tableDataTree.refreshChildByName(tdName); tableDataTree.refreshChildByName(tdName);
tableDataTree.setSelectionRows(rows); tableDataTree.setSelectionRows(rows);
FineLoggerFactory.getLogger().info("add table data succeeded for {}", tdName);
} }
@Override @Override
@ -1057,7 +1058,11 @@ public class TableDataTreePane extends BasicTableDataTreePane {
TableDataTreeSearchManager.getInstance().outOfSearchMode(); TableDataTreeSearchManager.getInstance().outOfSearchMode();
} }
for (Object toRemove : selectedValues) { 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); basicDialog.setVisible(true);
} }
private void doRemove(NameObject selectedNO) { private void doRemove(String toRemove) throws Exception {
// richer:这个地方为什么要在DataSourceTree里面去remove呢?多此一举吧 // richer:这个地方为什么要在DataSourceTree里面去remove呢?多此一举吧
op.removeAction(selectedNO.getName()); op.removeAction(toRemove);
tableDataTree.refresh(); tableDataTree.refresh();
// Richie:默认最后一行获得焦点. // Richie:默认最后一行获得焦点.
tableDataTree.requestFocus(); tableDataTree.requestFocus();
@ -1080,14 +1085,15 @@ public class TableDataTreePane extends BasicTableDataTreePane {
checkButtonEnabled(); checkButtonEnabled();
//删掉缓存配置 //删掉缓存配置
StrategyConfigAttrUtils.removeStrategyConfig(selectedNO.getName()); StrategyConfigAttrUtils.removeStrategyConfig(toRemove);
// 如果一个模版是平台开启,这个数据集的配置不会存xml,预览模版时直接从全局配置copy,这样 // 如果一个模版是平台开启,这个数据集的配置不会存xml,预览模版时直接从全局配置copy,这样
// 导致删除的时候StrategyConfigsAttrSavedHook没有通过前后配置比较感知数据集被删除,因此不会发出事件让其失效 // 导致删除的时候StrategyConfigsAttrSavedHook没有通过前后配置比较感知数据集被删除,因此不会发出事件让其失效
// 这里额外发出一次数据集修改事件 // 这里额外发出一次数据集修改事件
StrategyEventsNotifier.modifyDataSet(new DSMapping(getTplPath(), new DsNameTarget(selectedNO.getName()))); StrategyEventsNotifier.modifyDataSet(new DSMapping(getTplPath(), new DsNameTarget(toRemove)));
DesignTableDataManager.removeSelectedColumnNames(selectedNO.getName()); DesignTableDataManager.removeSelectedColumnNames(toRemove);
DesignModelAdapter.getCurrentModelAdapter().removeTableDataParameters(selectedNO.getName()); 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() { returnLabel.addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
searchTextField.setText(StringUtils.EMPTY);
TableDataTreeSearchManager.getInstance().outOfSearchMode(); TableDataTreeSearchManager.getInstance().outOfSearchMode();
switchPane(TOOLBAR_PANE);
} }
}); });
@ -200,6 +198,11 @@ public class TreeSearchToolbarPane extends JPanel implements TreeSearchStatusCha
@Override @Override
public void updateTreeSearchChange(TreeSearchStatusChangeEvent event) { public void updateTreeSearchChange(TreeSearchStatusChangeEvent event) {
TreeSearchStatus treeSearchStatus = event.getTreeSearchStatus(); 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) { private String getHighlightText(String text, String textToHighlight) {
String highLightTemplate = "<font color=\"#419BF9\">$1</font>"; String highLightTemplate = "<strong>$1</strong>";
if (textToHighlight.length() == 0) { if (textToHighlight.length() == 0) {
return text; 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 FunctionGroup ALL = getAllFunctionGroup();
public static List<String> abandonFormulas = Arrays.asList("CIRCULAR", "CROSSLAYERTOTAL", "HIERARCHY", "LAYERTOTAL"); public static List<String> abandonFormulas = Arrays.asList("CIRCULAR", "CROSSLAYERTOTAL", "HIERARCHY", "LAYERTOTAL");
public static NameAndFunctionList NEW = getNewFunctionList(); public static NameAndFunctionList NEW = getNewFunctionList();
private static List<String> shieldedFormulas = Arrays.asList("ENBYSTRNUM","TEXTGETNUM" ,"GETCHARNUM","GCD", "LCM");
static { static {
loadEmbededFunctions(); loadEmbededFunctions();
@ -102,7 +103,7 @@ public final class FunctionConstants {
if (StableUtils.classInstanceOf(cls, iface)) { if (StableUtils.classInstanceOf(cls, iface)) {
Function inst; Function inst;
inst = (Function) cls.newInstance(); inst = (Function) cls.newInstance();
if (abandonFormulas.contains(inst.getClass().getSimpleName())) { if (abandonFormulas.contains(inst.getClass().getSimpleName()) || shieldedFormulas.contains(inst.getClass().getSimpleName())) {
continue; continue;
} }
for (NameAndTypeAndFunctionList EMBFUNCTION : EMBFUNCTIONS) { 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.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.event.MouseListener; import java.awt.event.MouseListener;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
@ -67,7 +68,13 @@ public class CheckBoxListWithPartialSelect extends JPanel {
} }
public List<Object> getSelectedObjects() { 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() { 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); initFunctionTitle(args);
JPanel jsParaPane = createJSParaPane(); JPanel jsParaPane = createJSParaPane();
addNewPaneLabel(); if (needAdvancedEditor()) {
addNewPaneLabel();
}
this.add(jsParaPane, BorderLayout.NORTH); this.add(jsParaPane, BorderLayout.NORTH);
UIScrollPane sp = createContentTextAreaPanel(); UIScrollPane sp = createContentTextAreaPanel();
@ -323,4 +325,8 @@ public class JSContentPane extends BasicPane {
return provider; 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() { private void initList() {
paneList = new ArrayList<>(); paneList = new ArrayList<>();
paneList.add(new NullBackgroundQuickPane()); paneList.add(new NullBackgroundQuickPane());
paneList.add(new ColorBackgroundQuickPane()); paneList.add(new ColorBackgroundQuickPane(true));
paneList.add(new ImageBackgroundQuickPane(false)); paneList.add(new ImageBackgroundQuickPane(false));
paneList.add(new VanChartGradientPane()); paneList.add(new VanChartGradientPane());
} }

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() { protected void initList() {
paneList.add(new NullBackgroundQuickPane()); paneList.add(new NullBackgroundQuickPane());
paneList.add(new ColorBackgroundQuickPane()); paneList.add(new ColorBackgroundQuickPane(true));
paneList.add(new ImageBackgroundQuickPane(false)); paneList.add(new ImageBackgroundQuickPane(false));
paneList.add(new VanChartGradientPane()); paneList.add(new VanChartGradientPane());
} }

Loading…
Cancel
Save