Browse Source

Merge pull request #13415 in DESIGN/design from bugfix/11.0 to feature/x

* commit '17a3b1e1397db6b5e5283cabb03464cd6f15cbd3':
  REPORT-111890 升级到release后,延迟启动云端运维模块不会自动开启
  REPORT-111890 升级到release后,延迟启动云端运维模块不会自动开启
  方法名也改下,以及成员变量名
  改下命名,颜色深浅模式可以作为公共枚举使用,并且层级往上抽一下
  改为枚举实现
  REPORT-111740 【控件显示增强】历史模板升级后,工具栏没有根据背景适配深浅
feature/x
superman 11 months ago
parent
commit
78da60fd0f
  1. 7
      designer-base/src/main/java/com/fr/design/DesignerEnvManager.java
  2. 5
      designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java
  3. 13
      designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateConfigManager.java
  4. 9
      designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java
  5. 13
      designer-realize/src/main/java/com/fr/design/webattr/FToolBar.java
  6. 2
      designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java

7
designer-base/src/main/java/com/fr/design/DesignerEnvManager.java

@ -899,13 +899,18 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter, AsyncXmlReada
}
public boolean isCloudAnalyticsDelay() {
return designerPushUpdateConfigManager.isCloudAnalyticsDelay();
return designerPushUpdateConfigManager.isCloudAnalyticsDelay() || designerPushUpdateConfigManager.isUseCloudAnalyticsDelayFirst();
}
public void setCloudAnalyticsDelay(boolean cloudAnalyticsDelay) {
designerPushUpdateConfigManager.setCloudAnalyticsDelay(cloudAnalyticsDelay);
}
public void setUseCloudAnalyticsDelayFirst(boolean useCloudAnalyticsDelayFirst) {
designerPushUpdateConfigManager.setUseCloudAnalyticsDelayFirst(useCloudAnalyticsDelayFirst);
}
/**
* 设计器登录相关配置
*/

5
designer-base/src/main/java/com/fr/design/actions/file/PreferencePane.java

@ -1122,7 +1122,10 @@ public class PreferencePane extends BasicPane {
designerEnvManager.setUseOptimizedUPM4Adapter(optimizedUPMFlag);
//只有取消掉使用新插件管理器这个选项才需要把useNewPluginFirst置false(意味着用户手动配置了,如果勾选着的话,这个useNewPluginFirst为true就行了)
designerEnvManager.setUseNewPluginFirst(optimizedUPMFlag);
designerEnvManager.setCloudAnalyticsDelay(this.cloudAnalyticsDelayCheckBox.isSelected());
boolean cloudDelayFlag = this.cloudAnalyticsDelayCheckBox.isSelected();
designerEnvManager.setCloudAnalyticsDelay(cloudDelayFlag);
// cloudDelayFlag默认为true,如果用户手动配置过才会是false,则后续的云端运维配置都按照用户意愿来
designerEnvManager.setUseCloudAnalyticsDelayFirst(cloudDelayFlag);
VcsConfigManager vcsConfigManager = designerEnvManager.getVcsConfigManager();
vcsConfigManager.setSaveInterval(this.saveIntervalEditor.getValue());
vcsConfigManager.setVcsEnable(this.vcsEnableCheckBox.isSelected());

13
designer-base/src/main/java/com/fr/design/update/push/DesignerPushUpdateConfigManager.java

@ -16,6 +16,7 @@ public class DesignerPushUpdateConfigManager implements XMLReadable, XMLWriter {
private boolean autoPushUpdateEnabled = true; // 是否开启自动推送更新
private boolean cloudAnalyticsDelay = true; // 是否云端运维模块延迟启动
private boolean useCloudAnalyticsDelayFirst = true; // 默认打开,如果有手动改延迟启动配置则按客户配置的来
private String lastIgnoredVersion = StringUtils.EMPTY; // 最近一次跳过的更新版本
private DesignerPushUpdateConfigManager() {
@ -33,7 +34,8 @@ public class DesignerPushUpdateConfigManager implements XMLReadable, XMLWriter {
if (reader.isAttr()) {
this.setAutoPushUpdateEnabled(reader.getAttrAsBoolean("autoPushUpdateEnabled", true));
this.setLastIgnoredVersion(reader.getAttrAsString("lastIgnoredVersion", StringUtils.EMPTY));
this.setCloudAnalyticsDelay(reader.getAttrAsBoolean("cloudAnalyticsDelay", false));
this.setCloudAnalyticsDelay(reader.getAttrAsBoolean("cloudAnalyticsDelay", true));
this.setUseCloudAnalyticsDelayFirst(reader.getAttrAsBoolean("useCloudAnalyticsDelayFirst", true));
}
}
@ -43,6 +45,7 @@ public class DesignerPushUpdateConfigManager implements XMLReadable, XMLWriter {
writer.attr("autoPushUpdateEnabled", autoPushUpdateEnabled);
writer.attr("lastIgnoredVersion", lastIgnoredVersion);
writer.attr("cloudAnalyticsDelay", cloudAnalyticsDelay);
writer.attr("useCloudAnalyticsDelayFirst", useCloudAnalyticsDelayFirst);
writer.end();
}
@ -69,4 +72,12 @@ public class DesignerPushUpdateConfigManager implements XMLReadable, XMLWriter {
public void setCloudAnalyticsDelay(boolean cloudAnalyticsDelay) {
this.cloudAnalyticsDelay = cloudAnalyticsDelay;
}
public boolean isUseCloudAnalyticsDelayFirst() {
return useCloudAnalyticsDelayFirst;
}
public void setUseCloudAnalyticsDelayFirst(boolean useCloudAnalyticsDelayFirst) {
this.useCloudAnalyticsDelayFirst = useCloudAnalyticsDelayFirst;
}
}

9
designer-realize/src/main/java/com/fr/design/webattr/EditToolBar.java

@ -30,6 +30,7 @@ import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.widget.IconDefinePane;
import com.fr.form.ui.Button;
import com.fr.form.ui.CustomToolBarButton;
import com.fr.general.ColorMode;
import com.fr.form.ui.Widget;
import com.fr.form.ui.WidgetInfoConfig;
import com.fr.general.Background;
@ -227,7 +228,7 @@ public class EditToolBar extends BasicPane {
this.defaultCheckBox.setSelected(ftoolbar.isDefault() ? true : false);
if (bgColorButtonGroup != null) {
this.bgColorButtonGroup.setSelectedIndex(ftoolbar.isBgColorLight() ? 0 : 1);
this.bgColorButtonGroup.setSelectedIndex(ftoolbar.getButtonBgColorMode().getCode());
}
}
@ -263,7 +264,7 @@ public class EditToolBar extends BasicPane {
ftoolBar.setBackground(this.background);
}
if (bgColorButtonGroup != null) {
ftoolBar.setBgColorLight(bgColorButtonGroup.getSelectedIndex() == 0);
ftoolBar.setButtonBgColorMode(ColorMode.getModeByCode(bgColorButtonGroup.getSelectedIndex()));
}
return ftoolBar;
}
@ -729,7 +730,9 @@ public class EditToolBar extends BasicPane {
private JPanel createButtonColorGroup() {
UILabel headLabel = new UILabel(Toolkit.i18nText("Fine-Design_ToolBar_Button_Color"));
String[] titles = new String[]{Toolkit.i18nText("Fine-Design_ToolBar_Button_Color_Light"), Toolkit.i18nText("Fine-Design_ToolBar_Button_Color_Dark")};
String[] titles = new String[]{ Toolkit.i18nText("Fine-Design_ToolBar_Button_Color_Auto"),
Toolkit.i18nText("Fine-Design_ToolBar_Button_Color_Light"),
Toolkit.i18nText("Fine-Design_ToolBar_Button_Color_Dark")};
bgColorButtonGroup = new UIButtonGroup<String>(titles) {
@Override
public void setSelectedIndex(int newSelectedIndex, boolean fireChanged) {

13
designer-realize/src/main/java/com/fr/design/webattr/FToolBar.java

@ -4,6 +4,7 @@ import java.util.ArrayList;
import java.util.List;
import com.fr.form.ui.ToolBar;
import com.fr.general.ColorMode;
import com.fr.form.ui.Widget;
import com.fr.general.Background;
@ -12,7 +13,7 @@ public class FToolBar {
private Background background = null;
private boolean isDefault = true;
private boolean buttonBgColorLight = true;
private ColorMode buttonBgColorMode = ColorMode.AUTO;
public List<ToolBarButton> getButtonlist() {
return buttonlist;
}
@ -53,12 +54,12 @@ public class FToolBar {
this.isDefault = isDefault;
}
public boolean isBgColorLight() {
return buttonBgColorLight;
public ColorMode getButtonBgColorMode() {
return buttonBgColorMode;
}
public void setBgColorLight(boolean bgColorLight) {
this.buttonBgColorLight = bgColorLight;
public void setButtonBgColorMode(ColorMode buttonBgColorMode) {
this.buttonBgColorMode = buttonBgColorMode;
}
public ToolBar getToolBar() {
@ -69,7 +70,7 @@ public class FToolBar {
ToolBar toolBar = new ToolBar(n);
toolBar.setBackground(this.background);
toolBar.setDefault(this.isDefault);
toolBar.setButtonBgColorLight(this.buttonBgColorLight);
toolBar.setButtonBgColorMode(this.buttonBgColorMode);
return toolBar;
}
}

2
designer-realize/src/main/java/com/fr/design/webattr/ToolBarPane.java

@ -157,7 +157,7 @@ public class ToolBarPane extends BasicBeanPane<ToolBar> {
}
this.getFToolBar().setBackground(toolbar.getBackground());
this.getFToolBar().setDefault(toolbar.isDefault());
this.getFToolBar().setBgColorLight(toolbar.isButtonBgColorLight());
this.getFToolBar().setButtonBgColorMode(toolbar.getButtonBgColorMode());
setPopulateFinished(true);
}

Loading…
Cancel
Save