Browse Source

REPORT-81583【运营产品化二期】自定义排序使用向上或向下到最顶或最底交互显示有问题;REPORT-80117 alphafine默认配置没有模板商城,首次打开却有模板商城

1、修改交互
2、修改升级兼容问题
release/11.0
Link.Zhao 2 years ago
parent
commit
d65ce99715
  1. 3
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java
  2. 28
      designer-base/src/main/java/com/fr/design/actions/help/alphafine/component/CustomSortPane.java

3
designer-base/src/main/java/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java

@ -108,6 +108,7 @@ public class AlphaFineConfigManager implements XMLable {
private Map<String, String> actionSearchTextCache = new HashMap<>(8); private Map<String, String> actionSearchTextCache = new HashMap<>(8);
private String cacheBuildNO; private String cacheBuildNO;
private static final String CONTAIN_TEMPLATE_SHOP = "isContainTemplateShop";
/** /**
* key: 登录的bbs用户 * key: 登录的bbs用户
@ -151,6 +152,7 @@ public class AlphaFineConfigManager implements XMLable {
this.setContainPlugin(reader.getAttrAsBoolean("isContainDocument", true)); this.setContainPlugin(reader.getAttrAsBoolean("isContainDocument", true));
this.setContainDocument(reader.getAttrAsBoolean("isContainDocument", true)); this.setContainDocument(reader.getAttrAsBoolean("isContainDocument", true));
this.setContainRecommend(reader.getAttrAsBoolean("isContainRecommend", true)); this.setContainRecommend(reader.getAttrAsBoolean("isContainRecommend", true));
this.setShowTemplateShop(reader.getAttrAsBoolean(CONTAIN_TEMPLATE_SHOP, true));
this.setContainAction(reader.getAttrAsBoolean("isContainAction", true)); this.setContainAction(reader.getAttrAsBoolean("isContainAction", true));
this.setContainTemplate(reader.getAttrAsBoolean("isContainTemplate", true)); this.setContainTemplate(reader.getAttrAsBoolean("isContainTemplate", true));
this.setContainFileContent(reader.getAttrAsBoolean("isContainFileContent", false)); this.setContainFileContent(reader.getAttrAsBoolean("isContainFileContent", false));
@ -258,6 +260,7 @@ public class AlphaFineConfigManager implements XMLable {
.attr("needSegmentationCheckbox", this.isNeedSegmentationCheckbox()) .attr("needSegmentationCheckbox", this.isNeedSegmentationCheckbox())
.attr("needIntelligentCustomerService", this.isNeedIntelligentCustomerService()) .attr("needIntelligentCustomerService", this.isNeedIntelligentCustomerService())
.attr("productDynamics", this.isProductDynamics()) .attr("productDynamics", this.isProductDynamics())
.attr(CONTAIN_TEMPLATE_SHOP, this.showTemplateShop)
.attr("tabOrder", this.getTabOrderString()); .attr("tabOrder", this.getTabOrderString());
writeActionSearchTextCacheXML(writer); writeActionSearchTextCacheXML(writer);
writeSearchHistory(writer); writeSearchHistory(writer);

28
designer-base/src/main/java/com/fr/design/actions/help/alphafine/component/CustomSortPane.java

@ -85,7 +85,7 @@ public class CustomSortPane extends JPanel {
top.addActionListener(e -> { top.addActionListener(e -> {
SwingUtilities.invokeLater(() -> { SwingUtilities.invokeLater(() -> {
sortItemPane.setComponentZOrder(selectedLabel, 0); sortItemPane.setComponentZOrder(selectedLabel, 0);
setToolbarEnable(false, false, true, true); setToolbarEnable(sortItemPane.getComponentZOrder(selectedLabel), sortItemPane.getComponentCount());
CustomSortPane.this.revalidate(); CustomSortPane.this.revalidate();
CustomSortPane.this.repaint(); CustomSortPane.this.repaint();
refreshCurrentOrder(); refreshCurrentOrder();
@ -95,7 +95,7 @@ public class CustomSortPane extends JPanel {
bottom.addActionListener(e -> { bottom.addActionListener(e -> {
SwingUtilities.invokeLater(() -> { SwingUtilities.invokeLater(() -> {
sortItemPane.setComponentZOrder(selectedLabel, sortItemPane.getComponentCount() - 1); sortItemPane.setComponentZOrder(selectedLabel, sortItemPane.getComponentCount() - 1);
setToolbarEnable(true, true, false, false); setToolbarEnable(sortItemPane.getComponentZOrder(selectedLabel), sortItemPane.getComponentCount());
CustomSortPane.this.revalidate(); CustomSortPane.this.revalidate();
CustomSortPane.this.repaint(); CustomSortPane.this.repaint();
refreshCurrentOrder(); refreshCurrentOrder();
@ -105,7 +105,7 @@ public class CustomSortPane extends JPanel {
up.addActionListener(e -> { up.addActionListener(e -> {
SwingUtilities.invokeLater(() -> { SwingUtilities.invokeLater(() -> {
sortItemPane.setComponentZOrder(selectedLabel, sortItemPane.getComponentZOrder(selectedLabel) - 1); sortItemPane.setComponentZOrder(selectedLabel, sortItemPane.getComponentZOrder(selectedLabel) - 1);
setToolbarEnable(true, true, true, true); setToolbarEnable(sortItemPane.getComponentZOrder(selectedLabel), sortItemPane.getComponentCount());
CustomSortPane.this.revalidate(); CustomSortPane.this.revalidate();
CustomSortPane.this.repaint(); CustomSortPane.this.repaint();
refreshCurrentOrder(); refreshCurrentOrder();
@ -115,7 +115,7 @@ public class CustomSortPane extends JPanel {
down.addActionListener(e -> { down.addActionListener(e -> {
SwingUtilities.invokeLater(() -> { SwingUtilities.invokeLater(() -> {
sortItemPane.setComponentZOrder(selectedLabel, sortItemPane.getComponentZOrder(selectedLabel) + 1); sortItemPane.setComponentZOrder(selectedLabel, sortItemPane.getComponentZOrder(selectedLabel) + 1);
setToolbarEnable(true, true, true, true); setToolbarEnable(sortItemPane.getComponentZOrder(selectedLabel), sortItemPane.getComponentCount());
CustomSortPane.this.revalidate(); CustomSortPane.this.revalidate();
CustomSortPane.this.repaint(); CustomSortPane.this.repaint();
refreshCurrentOrder(); refreshCurrentOrder();
@ -175,6 +175,26 @@ public class CustomSortPane extends JPanel {
this.bottom.setEnabled(bottom); this.bottom.setEnabled(bottom);
} }
/**
* 根据选项当前位置以及菜单大小设置 置顶上移下移置底 按钮的状态
*/
private void setToolbarEnable(int order, int maxOrder) {
this.top.setEnabled(true);
this.up.setEnabled(true);
this.down.setEnabled(true);
this.bottom.setEnabled(true);
// 选项处于顶端,则置灰上移和置顶按钮
if (order == 0) {
this.top.setEnabled(false);
this.up.setEnabled(false);
}
// 选项处于底端,则置灰下移和置底按钮
if (order == maxOrder - 1) {
this.down.setEnabled(false);
this.bottom.setEnabled(false);
}
}
private void refreshCurrentOrder() { private void refreshCurrentOrder() {
String[] currentTabOrder = parentPane.getCurrentOrder(); String[] currentTabOrder = parentPane.getCurrentOrder();
HashSet<String> selectedTab = new HashSet<>(); HashSet<String> selectedTab = new HashSet<>();

Loading…
Cancel
Save