Browse Source

Merge branch 'feature/x' of https://code.fineres.com/scm/~harrison/design into feature/x

feature/x
Harrison 2 years ago
parent
commit
a87dc259d8
  1. 6
      designer-base/src/main/java/com/fr/design/data/StrategyConfigAttrUtils.java
  2. 2
      designer-base/src/main/java/com/fr/design/formula/FormulaPane.java
  3. 9
      designer-base/src/main/java/com/fr/design/fun/DefaultValueAdjustProvider.java
  4. 9
      designer-base/src/main/java/com/fr/design/gui/ispinner/UISpinner.java
  5. 3
      designer-base/src/main/java/com/fr/design/gui/style/ComponentTitleStylePane.java
  6. 3
      designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java
  7. 5
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java
  8. 21
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java
  9. 3
      designer-base/src/main/java/com/fr/design/mainframe/mobile/utils/FontConfigPane.java
  10. 3
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java
  11. 3
      designer-base/src/main/java/com/fr/design/mainframe/widget/MobileTabFontConfPane.java
  12. 3
      designer-base/src/main/java/com/fr/design/style/FontFamilyPane.java
  13. 13
      designer-base/src/main/java/com/fr/design/utils/DesignUtils.java
  14. 47
      designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java
  15. 3
      designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertValuePane.java
  16. 3
      designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataLabelStylePane.java
  17. 3
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java
  18. 3
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java
  19. 3
      designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java
  20. 3
      designer-form/src/main/java/com/fr/design/gui/xpane/CardTagLayoutBorderPane.java
  21. 3
      designer-form/src/main/java/com/fr/design/gui/xpane/LayoutBorderPane.java
  22. 3
      designer-realize/src/main/java/com/fr/design/actions/cell/style/ReportFontNameAction.java
  23. 24
      designer-realize/src/main/java/com/fr/design/actions/replace/action/setting/CellGroupType.java
  24. 16
      designer-realize/src/main/java/com/fr/design/actions/replace/action/setting/SettingController.java
  25. 3
      designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java
  26. 2
      designer-realize/src/main/java/com/fr/grid/GridUI.java

6
designer-base/src/main/java/com/fr/design/data/StrategyConfigAttrUtils.java

@ -11,11 +11,11 @@ import com.fr.esd.event.DSMapping;
import com.fr.esd.event.DsNameTarget;
import com.fr.esd.event.StrategyEventsNotifier;
import com.fr.esd.event.xml.XMLSavedHook;
import com.fr.file.FILE;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
import java.nio.file.Paths;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@ -46,7 +46,9 @@ public class StrategyConfigAttrUtils {
}
//新建模版此时不存在,不需要注册钩子
if (attr.getXmlSavedHook() == null && WorkContext.getWorkResource().exist(jTemplate.getPath())) {
//不处理外部路径,保存到设计器才处理
String path = jTemplate.getPath();
if (attr.getXmlSavedHook() == null && !Paths.get(path).isAbsolute() && WorkContext.getWorkResource().exist(path)) {
attr.setXmlSavedHook(new StrategyConfigsAttrSavedHook(jTemplate.getPath(), attr));
}
return attr;

2
designer-base/src/main/java/com/fr/design/formula/FormulaPane.java

@ -58,7 +58,7 @@ import com.fr.stable.EncodeConstants;
import com.fr.stable.EssentialUtils;
import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils;
import com.fr.stable.script.CRAddress;
import com.fr.parser.CRAddress;
import com.fr.stable.script.ColumnRowRange;
import com.fr.stable.script.Expression;
import com.fr.stable.script.Node;

9
designer-base/src/main/java/com/fr/design/fun/DefaultValueAdjustProvider.java

@ -1,5 +1,6 @@
package com.fr.design.fun;
import com.fr.base.Utils;
import com.fr.base.chart.BaseChartCollection;
import com.fr.chartx.attr.ChartProvider;
import com.fr.general.FRFont;
@ -53,4 +54,12 @@ public interface DefaultValueAdjustProvider extends Selectable {
*/
Font transformFontByResolution(FRFont font, int resolution);
/**
* 修改设计可用字体默认列表
* @return
*/
default String[] getAvailableFontFamilyNames4Report() {
return Utils.getAvailableFontFamilyNames4Report();
}
}

9
designer-base/src/main/java/com/fr/design/gui/ispinner/UISpinner.java

@ -312,6 +312,15 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver
componentInitListeners();
}
/**
* 设置最大值
* @param maxValue 最大值
*/
public void setMaxValue(double maxValue) {
this.maxValue = maxValue;
textField.setMaxValue(maxValue);
}
private void componentInitListeners() {
preButton.addActionListener(new ActionListener() {
@Override

3
designer-base/src/main/java/com/fr/design/gui/style/ComponentTitleStylePane.java

@ -12,6 +12,7 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.utils.DesignUtils;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.form.ui.LayoutBorderStyle;
import com.fr.form.ui.WidgetTitle;
@ -90,7 +91,7 @@ public class ComponentTitleStylePane extends AbstractBorderPackerPane {
textContentPane = new TinyFormulaPane();
fontFamilyComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
fontFamilyComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
FRFont frFont = DEFAULT_TITLE_PACKER.getFrFont();
if (frFont != null) {
String fontFamily = frFont.getFamily();

3
designer-base/src/main/java/com/fr/design/gui/style/FRFontPane.java

@ -18,6 +18,7 @@ import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.ComparatorUtils;
import com.fr.general.DefaultValues;
@ -246,7 +247,7 @@ public class FRFontPane extends AbstractBasicStylePane implements GlobalNameObse
protected void initComponents() {
fontSizeStyleComboBox = new UIComboBox(fontSizeStyles);
fontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
fontNameComboBox.setPreferredSize(new Dimension(144, 20));
fontSizeComboBox = new UIComboBox(getFontSizes());
fontSizeComboBox.setEditable(true);

5
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java

@ -17,6 +17,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.mobile.MobileBookMarkStyle;
import com.fr.form.ui.mobile.impl.SidebarMobileBookMarkStyle;
@ -161,7 +162,7 @@ public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<Mo
normalBorderWidthComBox.setSelectedLineStyle(DEFAULT_STYLE.getBorderLineStyle());
normalBorderColorBox = new ColorSelectBox(COLUMN_WIDTH);
normalBorderColorBox.setSelectObject(DEFAULT_STYLE.getBorderColor());
normalFontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
normalFontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
normalFontNameComboBox.setSelectedItem(DEFAULT_STYLE.getSelectedFontFamily());
normalFontSizeComboBox = new UIComboBox(FRFontPane.FONT_SIZES);
normalFontSizeComboBox.setSelectedItem(DEFAULT_STYLE.getFontSize());
@ -248,7 +249,7 @@ public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<Mo
selectedBorderWidthComBox.setSelectedLineStyle(DEFAULT_STYLE.getSelectedBorderLineStyle());
selectedBorderColorBox = new ColorSelectBox(COLUMN_WIDTH);
selectedBorderColorBox.setSelectObject(DEFAULT_STYLE.getSelectedBorderColor());
selectedFontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
selectedFontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
selectedFontNameComboBox.setSelectedItem(DEFAULT_STYLE.getSelectedFontFamily());
selectedFontSizeComboBox = new UIComboBox(FRFontPane.FONT_SIZES);
selectedFontSizeComboBox.setSelectedItem(DEFAULT_STYLE.getSelectedFontSize());

21
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/topparam/MobileTopParamPane.java

@ -11,16 +11,21 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.form.ui.mobile.impl.MobileTopParamStyle;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class MobileTopParamPane extends BasicBeanPane<MobileTopParamStyle> {
private UICheckBox autoCommitCheckBox;
private UISpinner maxDirectShowCountSpinner;
private UILabel showCountTextField;
private static final int MAX_VALUE = 4;
private static final int MIN_VALUE = 0;
private static final int MAX_VALUE_AUTO = 3;
private static final int MIN_VALUE = 1;
private static final int DEFAULT_DIERTA = 1;
private static final int DEFAULT_VALUE = 0;
private static final int GAP = 2;
@ -44,6 +49,20 @@ public class MobileTopParamPane extends BasicBeanPane<MobileTopParamStyle> {
JPanel paraPane = TableLayoutHelper.createCommonTableLayoutPane(components, rowSize, columnSize, GAP);
panel.add(paraPane);
this.add(panel, BorderLayout.CENTER);
autoCommitCheckBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (!autoCommitCheckBox.isSelected()) {
maxDirectShowCountSpinner.setMaxValue(MAX_VALUE_AUTO);
if (maxDirectShowCountSpinner.getValue() >= MAX_VALUE) {
maxDirectShowCountSpinner.setValue(MAX_VALUE_AUTO);
}
} else {
maxDirectShowCountSpinner.setMaxValue(MAX_VALUE);
}
}
});
}
@Override

3
designer-base/src/main/java/com/fr/design/mainframe/mobile/utils/FontConfigPane.java

@ -5,6 +5,7 @@ import com.fr.base.Utils;
import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.utils.DesignUtils;
import com.fr.general.FRFont;
import javax.swing.*;
@ -35,7 +36,7 @@ public class FontConfigPane extends JPanel {
private void init() {
this.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0));
fontFamily = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
fontFamily = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
Vector<Integer> integerList = new Vector<>();
for (int i = 1; i < 100; i++) {
integerList.add(i);

3
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartFontPane.java

@ -13,6 +13,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
import com.fr.general.GeneralUtils;
@ -52,7 +53,7 @@ public class ChartFontPane extends BasicPane {
}
private void initState() {
fontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
fontSizeComboBox = new UIComboBox(FONT_SIZES);
bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"));
italic = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"));

3
designer-base/src/main/java/com/fr/design/mainframe/widget/MobileTabFontConfPane.java

@ -5,6 +5,7 @@ import com.fr.base.Utils;
import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.utils.DesignUtils;
import com.fr.general.FRFont;
import javax.swing.Icon;
@ -38,7 +39,7 @@ public class MobileTabFontConfPane extends JPanel {
private void init() {
this.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 0));
fontFamily = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
fontFamily = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
Vector<Integer> integerList = new Vector<Integer>();
for (int i = 1; i < 100; i++) {
integerList.add(i);

3
designer-base/src/main/java/com/fr/design/style/FontFamilyPane.java

@ -3,6 +3,7 @@ package com.fr.design.style;
import com.fr.base.Utils;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
@ -26,7 +27,7 @@ public class FontFamilyPane extends JPanel {
familyField = new UITextField();
familyField.setEditable(false);
familyList = new JList(Utils.getAvailableFontFamilyNames4Report());
familyList = new JList(DesignUtils.getAvailableFontFamilyNames4Report());
familyList.setVisibleRowCount(4);
familyList.addListSelectionListener(listener);

13
designer-base/src/main/java/com/fr/design/utils/DesignUtils.java

@ -2,6 +2,7 @@ package com.fr.design.utils;
import com.fr.base.FeedBackInfo;
import com.fr.base.ServerConfig;
import com.fr.base.Utils;
import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
@ -481,4 +482,16 @@ public class DesignUtils {
return null;
}
/**
* 获取设计器可用字体
* @return
*/
public static String[] getAvailableFontFamilyNames4Report() {
DefaultValueAdjustProvider valueAdjust = DesignUtils.getValueAdjust();
if (valueAdjust != null) {
return valueAdjust.getAvailableFontFamilyNames4Report();
}
return Utils.getAvailableFontFamilyNames4Report();
}
}

47
designer-base/src/main/java/com/fr/design/versioncheck/VersionCheckUtils.java

@ -70,6 +70,7 @@ public class VersionCheckUtils {
private static final String GROUP = "group";
private static final String BI = "bi";
private static final String BIPREFIX = "com.finebi";
private static final String DEVELOP_BRANCH_MARK = "#";
private static final Set<String> pluginsNeedIgnore = new HashSet<>();
static {
pluginsNeedIgnore.addAll(Arrays.asList(
@ -88,7 +89,23 @@ public class VersionCheckUtils {
public static boolean versionCheck(String envName) {
return checkLocalAndRemoteJartime(envName) && checkLocalAndRemotePlugin().size() == 0;
if (needCheckConsistency(envName)) {
return checkLocalAndRemoteJartime(envName) && checkLocalAndRemotePlugin().size() == 0;
}
return true;
}
/**
* 判断是否需要检查Jartime和插件的一致性
*
* @param selectedEnvName 当前工作目录名称
* @return
*/
private static boolean needCheckConsistency(String selectedEnvName) {
DesignerEnvManager envManager = DesignerEnvManager.getEnvManager();
DesignerWorkspaceInfo selectedEnv = envManager.getWorkspaceInfo(selectedEnvName);
// 当前工作目录为远程工作目录时,需要检查
return selectedEnv.getType() == DesignerWorkspaceType.Remote;
}
public static boolean versionCheck(DesignerWorkspaceInfo selectedEnv) {
@ -139,21 +156,17 @@ public class VersionCheckUtils {
}
public static boolean checkLocalAndRemoteJartime(DesignerWorkspaceInfo selectedEnv) {
//是否需要做服务校验
if (needCheckBranch(selectedEnv)) {
String localBranch;
String remoteBranch = getRemoteBranch(selectedEnv);
localBranch = GeneralUtils.readFullBuildNO();
//通过是否包含#来避免当前版本为非安装版本(主要是内部开发版本)
if (localBranch.contains("#") && ComparatorUtils.equals(localBranch, remoteBranch)) {
//说明版本一致,仅做日志记录
FineLoggerFactory.getLogger().info("Remote Designer version consistency");
return true;
} else {
return false;
}
String localBranch;
String remoteBranch = getRemoteBranch(selectedEnv);
localBranch = GeneralUtils.readFullBuildNO();
// 通过是否包含"#"来避免当前版本为非安装版本(主要是内部开发版本)
if (localBranch.contains(DEVELOP_BRANCH_MARK) && ComparatorUtils.equals(localBranch, remoteBranch)) {
//说明版本一致,仅做日志记录
FineLoggerFactory.getLogger().info("Remote Designer version consistency");
return true;
} else {
return false;
}
return true;
}
public static List<String> getNoExistServiceDescription(String envName) {
@ -267,10 +280,6 @@ public class VersionCheckUtils {
return df.format(jarDate);
}
private static boolean needCheckBranch(DesignerWorkspaceInfo selectedEnv) {
return selectedEnv.getType() == DesignerWorkspaceType.Remote;
}
public static JSONArray checkLocalAndRemotePlugin() {
JSONArray differentPlugins = new JSONArray();
JSONArray remotePlugins = FRContext.getCommonOperator().getPluginStatus();

3
designer-chart/src/main/java/com/fr/design/chart/axis/ChartAlertValuePane.java

@ -18,6 +18,7 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.AlphaPane;
import com.fr.design.style.FRFontPane;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
@ -114,7 +115,7 @@ public class ChartAlertValuePane extends BasicBeanPane<ChartAlertValue> {
fontNameBox.setPreferredSize(new Dimension(80,20));
fontNameBox.addItem("SimSun"); // TODO 这边字体中没有在列表内
String[] names = Utils.getAvailableFontFamilyNames4Report();
String[] names = DesignUtils.getAvailableFontFamilyNames4Report();
for(int i = 0; i < names.length; i++) {
fontNameBox.addItem(names[i]);
}

3
designer-chart/src/main/java/com/fr/design/chart/series/SeriesCondition/DataLabelStylePane.java

@ -9,6 +9,7 @@ import com.fr.chart.base.TextAttr;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane;
import com.fr.design.utils.DesignUtils;
import com.fr.general.FRFont;
import com.fr.design.style.FRFontPane;
@ -36,7 +37,7 @@ public class DataLabelStylePane extends BasicPane {
private void initPane(boolean isSurpportFontColor) {
this.setLayout(FRGUIPaneFactory.createBoxFlowLayout());
this.add(nameBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report()));
this.add(nameBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report()));
nameBox.setPreferredSize(new Dimension(80, 20));
String[] styles = {

3
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

@ -14,6 +14,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
import com.fr.general.GeneralUtils;
@ -190,7 +191,7 @@ public class ChartTextAttrPane extends BasicPane {
}
protected void initState() {
fontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
fontSizeComboBox = new UIComboBox(getFontSizeComboBoxModel());
bold = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"));
italic = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"));

3
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java

@ -17,6 +17,7 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
import com.fr.general.GeneralUtils;
@ -99,7 +100,7 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
alertText.setPreferredSize(new Dimension(TEXT_WD, HT));
fontSize = new UIComboBox(FRFontPane.FONT_SIZES);
fontName = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
fontName = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
fontColor = new ColorSelectBox(100);
}

3
designer-chart/src/main/java/com/fr/van/chart/wordcloud/designer/style/VanChartWordCloudSeriesPane.java

@ -14,6 +14,7 @@ import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.backgroundpane.ImageBackgroundQuickPane;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
import com.fr.general.IOUtils;
@ -94,7 +95,7 @@ public class VanChartWordCloudSeriesPane extends VanChartColorValueSeriesPane {
double[] northC = {f, e};
double[] northR = {p, p};
fontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
defineFontSize = new UIButtonGroup(new String[]{AUTO_FONT_SIZE, CUSTOM_FONT_SIZE});
Component[][] northComps = new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Font")), fontNameComboBox},

3
designer-form/src/main/java/com/fr/design/gui/xpane/CardTagLayoutBorderPane.java

@ -12,6 +12,7 @@ import com.fr.design.gui.style.FRFontPane;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.LayoutBorderStyle;
@ -32,7 +33,7 @@ public class CardTagLayoutBorderPane extends LayoutBorderPane {
protected UIScrollPane initRightBottomPane(){
this.setFontSizeComboBox(new UIComboBox(FRFontPane.FONT_SIZES));
this.setFontNameComboBox(new UIComboBox(Utils.getAvailableFontFamilyNames4Report()));
this.setFontNameComboBox(new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report()));
JPanel fontSizeTypePane = new JPanel(new BorderLayout(10,0));
fontSizeTypePane.add(this.getFontSizeComboBox(), BorderLayout.CENTER);
fontSizeTypePane.add(this.getFontNameComboBox(), BorderLayout.EAST);

3
designer-form/src/main/java/com/fr/design/gui/xpane/LayoutBorderPane.java

@ -33,6 +33,7 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.mainframe.JForm;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.LayoutBorderStyle;
import com.fr.form.ui.WidgetTitle;
@ -437,7 +438,7 @@ public class LayoutBorderPane extends BasicPane {
protected UIScrollPane initRightBottomPane(){
formulaPane = new TinyFormulaPane();
fontSizeComboBox = new UIComboBox(FRFontPane.FONT_SIZES);
fontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
fontNameComboBox.setPreferredSize(new Dimension(160, 30));
JPanel fontSizeTypePane = new JPanel(new BorderLayout(10,0));
fontSizeTypePane.add(fontSizeComboBox, BorderLayout.CENTER);

3
designer-realize/src/main/java/com/fr/design/actions/cell/style/ReportFontNameAction.java

@ -3,6 +3,7 @@
*/
package com.fr.design.actions.cell.style;
import com.fr.design.utils.DesignUtils;
import com.fr.stable.os.OperatingSystem;
import java.awt.Dimension;
@ -80,7 +81,7 @@ public class ReportFontNameAction extends AbstractStyleAction {
public JComponent createToolBarComponent() {
Object object = this.getValue(UIComboBox.class.getName());
if (object == null || !(object instanceof UIComboBox)) {
UIComboBox itemComponent = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
UIComboBox itemComponent = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
this.putValue(UIComboBox.class.getName(), itemComponent);
//设置最佳宽度.
itemComponent.setPreferredSize(new Dimension(

24
designer-realize/src/main/java/com/fr/design/actions/replace/action/setting/CellGroupType.java

@ -246,4 +246,28 @@ public enum CellGroupType {
DSColumn column = (DSColumn) cellElement.getValue();
column.setGrouper(grouper);
}
/**
* 是否修改过
*
* @param info 存储信息的数据结构
* @param inputStr 用户输入的第一级下拉框内容
* @param extraStr 用户输入的第二级下拉框内容
* @return 修改过返回true
*/
public boolean isEverChanged(Info info, String inputStr, String extraStr) {
return !isNeed(getCellElementFromInfo(info), inputStr, extraStr);
}
/**
* 从Info中获取CellElement
* 能到这一步肯定是单元格数据列类型
*
* @param info 存储查找替换信息的数据结构
* @return CellElement
*/
public CellElement getCellElementFromInfo(Info info) {
CellElement cellElement = (CellElement) info.getContent().getReplaceObject();
return cellElement;
}
}

16
designer-realize/src/main/java/com/fr/design/actions/replace/action/setting/SettingController.java

@ -156,6 +156,15 @@ public enum SettingController implements ShowValue {
type.replace(info, firstStr, secondStr);
}
}
@Override
public boolean isEverChanged(Info info, String inputStr, String extraStr) {
CellGroupType type = CellGroupType.match(inputStr);
if (type != null) {
return type.isEverChanged(info, inputStr, extraStr);
}
return false;
}
},
/**
* 单元格-数据列
@ -224,6 +233,13 @@ public enum SettingController implements ShowValue {
dsColumn.setColumn(TableDataColumn.createColumn(secondStr));
}
@Override
public boolean isEverChanged(Info info, String inputStr, String extraStr) {
CellElement cellElement = (CellElement) info.getContent().getReplaceObject();
DSColumn dsColumn = (DSColumn) cellElement.getValue();
return !isNeed(dsColumn, inputStr, extraStr);
}
},
/**
* 数据源-数据连接

3
designer-realize/src/main/java/com/fr/design/cell/editor/RichTextToolBar.java

@ -21,6 +21,7 @@ import com.fr.design.mainframe.DesignerContext;
import com.fr.design.report.RichTextEditingPane;
import com.fr.design.style.color.UIToolbarColorButton;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.DesignUtils;
import com.fr.general.FRFont;
import com.fr.log.FineLoggerFactory;
import com.fr.report.cell.cellattr.core.RichTextConverter;
@ -104,7 +105,7 @@ public class RichTextToolBar extends BasicPane {
}
private void initAllButton() {
fontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
fontNameComboBox = new UIComboBox(DesignUtils.getAvailableFontFamilyNames4Report());
fontNameComboBox.setPreferredSize(new Dimension(144, 20));
fontSizeComboBox = new UIComboBox(FRFontPane.getFontSizes());
colorSelectPane = new UIToolbarColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/foreground.png"));

2
designer-realize/src/main/java/com/fr/grid/GridUI.java

@ -51,7 +51,7 @@ import com.fr.stable.AssistUtils;
import com.fr.stable.ColumnRow;
import com.fr.stable.Constants;
import com.fr.stable.GraphDrawHelper;
import com.fr.stable.script.CalculatorUtils;
import com.fr.script.CalculatorUtils;
import com.fr.stable.unit.FU;
import com.fr.stable.unit.UNIT;
import com.fr.third.antlr.ANTLRException;

Loading…
Cancel
Save