Browse Source

Merge branch 'release/10.0' of https://code.fineres.com/scm/~qinghui.liu/design into release/10.0

feature/big-screen
Qinghui.Liu 4 years ago
parent
commit
d79271e9c3
  1. 7
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
  2. 18
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java
  3. 25
      designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java
  4. 106
      designer-base/src/main/java/com/fr/design/gui/ipasswordfield/UIPasswordFieldWithFixedLength.java
  5. 1
      designer-base/src/main/java/com/fr/design/module/DesignModuleFactory.java
  6. 20
      designer-base/src/main/java/com/fr/design/style/color/NewColorSelectBox.java
  7. 21
      designer-base/src/main/java/com/fr/env/RemoteEnvPane.java
  8. BIN
      designer-base/src/main/resources/com/fr/design/images/reportcolumns/col_ja_JP.png
  9. BIN
      designer-base/src/main/resources/com/fr/design/images/reportcolumns/col_ko_KR.png
  10. 0
      designer-base/src/main/resources/com/fr/design/images/reportcolumns/col_zh.png
  11. BIN
      designer-base/src/main/resources/com/fr/design/images/reportcolumns/col_zh_TW.png
  12. BIN
      designer-base/src/main/resources/com/fr/design/images/reportcolumns/row_ja_JP.png
  13. BIN
      designer-base/src/main/resources/com/fr/design/images/reportcolumns/row_ko_KR.png
  14. 0
      designer-base/src/main/resources/com/fr/design/images/reportcolumns/row_zh.png
  15. BIN
      designer-base/src/main/resources/com/fr/design/images/reportcolumns/row_zh_TW.png
  16. 5
      designer-chart/src/main/java/com/fr/design/chart/AutoChartTypePane.java
  17. 5
      designer-chart/src/main/java/com/fr/design/chart/ChartIcon.java
  18. 18
      designer-chart/src/main/java/com/fr/design/chart/auto/AutoTypeCalculate.java
  19. 121
      designer-chart/src/main/java/com/fr/design/chartx/component/AbstractCustomFieldComboBoxPane.java
  20. 12
      designer-chart/src/main/java/com/fr/design/chartx/component/SeriesValueFieldComboBoxPane.java
  21. 69
      designer-chart/src/main/java/com/fr/design/chartx/data/DataLayoutHelper.java
  22. 15
      designer-chart/src/main/java/com/fr/design/chartx/data/map/AbstractAreaLngLatPane.java
  23. 1
      designer-chart/src/main/java/com/fr/design/chartx/data/map/MapChartDataPane.java
  24. 15
      designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractCellDataFieldsPane.java
  25. 15
      designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java
  26. 7
      designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MapDataSetFieldsPane.java
  27. 2
      designer-chart/src/main/java/com/fr/design/chartx/single/CellDataPane.java
  28. 30
      designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java
  29. 22
      designer-chart/src/main/java/com/fr/design/chartx/single/SingleDataPane.java
  30. 12
      designer-chart/src/main/java/com/fr/extended/chart/ExtendedCustomFieldComboBoxPane.java
  31. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java
  32. 4
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLineMapTooltipConditionPane.java
  33. 14
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/other/VanChartGanttConditionPane.java
  34. 7
      designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/series/VanChartGanttSeriesPane.java
  35. 36
      designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapPlotTooltipNoCheckPane.java
  36. 8
      designer-form/src/main/java/com/fr/design/designer/beans/models/AddingModel.java
  37. 6
      designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java
  38. 3
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardAddButton.java
  39. 2
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java
  40. 3
      designer-form/src/main/java/com/fr/design/form/util/FormDesignerUtils.java
  41. 29
      designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java
  42. 8
      designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java
  43. 13
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TabMobileWidgetDefinePane.java
  44. 203
      designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java
  45. 3
      designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java
  46. 3
      designer-realize/src/main/java/com/fr/design/parameter/ParameterDefinitePane.java
  47. 3
      designer-realize/src/main/java/com/fr/start/DesignerJavaRuntime.java

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

@ -50,6 +50,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
@ -74,7 +75,7 @@ public abstract class DesignTableDataManager {
private static java.util.Map<String, String> dsNameChangedMap = new HashMap<String, String>();
private static List<ChangeListener> globalDsListeners = new ArrayList<>();
private static Map<String, List<ChangeListener>> dsListenersMap = new HashMap<String, List<ChangeListener>>();
private static Map<String, List<ChangeListener>> dsListenersMap = new ConcurrentHashMap<>();
public static String NO_PARAMETER = "no_paramater_pane";
@ -96,8 +97,8 @@ public abstract class DesignTableDataManager {
*/
private static void fireDsChanged() {
fireDsChanged(globalDsListeners);
for (Entry<String, List<ChangeListener>> listenerEntry : dsListenersMap.entrySet()) {
List<ChangeListener> dsListeners = listenerEntry.getValue();
for (Iterator<Entry<String, List<ChangeListener>>> entryIterator = dsListenersMap.entrySet().iterator(); entryIterator.hasNext();) {
List<ChangeListener> dsListeners = entryIterator.next().getValue();
fireDsChanged(dsListeners);
}
}

18
designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

@ -8,7 +8,7 @@ import com.fr.design.border.UITitledBorder;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ipasswordfield.UIPassWordField;
import com.fr.design.gui.ipasswordfield.UIPasswordFieldWithFixedLength;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.ilable.ActionLabel;
import com.fr.design.layout.FRGUIPaneFactory;
@ -24,8 +24,18 @@ import com.fr.general.ComparatorUtils;
import com.fr.stable.StringUtils;
import javax.swing.*;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
@ -108,7 +118,7 @@ public class JDBCDefPane extends JPanel {
urlTextField = new UITextField(15);
userNameTextField = new UITextField(15);
userNameTextField.setName(USER_NAME);
passwordTextField = new UIPassWordField(15);
passwordTextField = new UIPasswordFieldWithFixedLength(15);
dbtypeButton = new UIButton(".");
dbtypeButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Click_Get_Default_URL"));
dbtypeButton.addActionListener(dbtypeButtonActionListener);

25
designer-base/src/main/java/com/fr/design/file/MutilTempalteTabPane.java

@ -17,14 +17,31 @@ import com.fr.file.FILE;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.Constants;
import com.fr.stable.ProductConstants;
import com.fr.third.javax.annotation.Nonnull;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.lock.TplOperator;
import javax.swing.*;
import javax.swing.BorderFactory;
import javax.swing.ButtonModel;
import javax.swing.Icon;
import javax.swing.JComponent;
import javax.swing.JMenu;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.SwingConstants;
import javax.swing.plaf.basic.BasicMenuItemUI;
import java.awt.*;
import java.awt.AWTEvent;
import java.awt.AlphaComposite;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GradientPaint;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.event.AWTEventListener;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -171,6 +188,8 @@ public class MutilTempalteTabPane extends JComponent {
private UIMenuItem initCloseOther() {
UIMenuItem closeOther = new UIMenuItem(Toolkit.i18nText("Fine-Design_Basic_FS_Close_Other_Templates"));
// Yvan: 英文下文本显示不全,后续发现如果将模板名设置的比较短,其它语言也会出现显示不全的问题,所以设置一下文本水平居中
closeOther.setHorizontalAlignment(SwingConstants.CENTER);
setListDownItemPreferredSize(closeOther);
closeOther.addActionListener(new ActionListener() {
@Override

106
designer-base/src/main/java/com/fr/design/gui/ipasswordfield/UIPasswordFieldWithFixedLength.java

@ -0,0 +1,106 @@
package com.fr.design.gui.ipasswordfield;
import com.fr.stable.StringUtils;
import org.jetbrains.annotations.NotNull;
import javax.swing.text.Document;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
/**
* @author Yvan
* @version 10.0
* Created by Yvan on 2020-08-11
* 有固定长度的"*"回显的密码框避免泄露密码长度
*/
public class UIPasswordFieldWithFixedLength extends UIPassWordField {
/**
* 展示密码为固定8位长度的特殊字符"*"组成
*/
private static final String DISPLAY_PASSWORD = "********";
/**
* 实际密码
*/
private String realPassword;
/**
* 用于判断是否清空密码
*/
private boolean clearPassword;
public UIPasswordFieldWithFixedLength() {
this(null, null, 0);
}
public UIPasswordFieldWithFixedLength(String text) {
this(null, text, 0);
}
public UIPasswordFieldWithFixedLength(int columns) {
this(null, null, columns);
}
public UIPasswordFieldWithFixedLength(String text, int columns) {
this(null, text, columns);
}
public UIPasswordFieldWithFixedLength(Document doc, String txt, int columns) {
super(doc, txt, columns);
initRealPassword(txt);
}
/**
* 为realPassword赋初值并添加一个鼠标单击事件
*/
public void initRealPassword(String text) {
this.realPassword = text == null ? StringUtils.EMPTY : text;
this.clearPassword = true;
addShowFixedLengthPasswordListener();
}
/**
* 当鼠标点击密码框第一次做出键入动作时清空显示密码与实际密码用户需要重新输入密码
*/
private void addShowFixedLengthPasswordListener() {
this.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
UIPasswordFieldWithFixedLength.this.clearPassword = true;
}
});
this.addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {
if (clearPassword) {
UIPasswordFieldWithFixedLength.this.setText(StringUtils.EMPTY);
UIPasswordFieldWithFixedLength.this.clearPassword = false;
UIPasswordFieldWithFixedLength.this.updateUI();
}
}
});
}
@Override
public void setText(@NotNull String t) {
this.realPassword = t;
// 看到代码中有些场景是将密码置为空字符串的,所以在这里加个判断
if (StringUtils.isEmpty(t)) {
super.setText(t);
} else {
super.setText(DISPLAY_PASSWORD);
}
}
@Override
public char[] getPassword() {
//如果用户刚清空密码框,并输入了新密码,则返回输入内容,否则返回realPassword
String text = new String(super.getPassword());
if (!StringUtils.isEmpty(text) && StringUtils.isEmpty(realPassword)) {
return text.toCharArray();
}
return realPassword.toCharArray();
}
}

1
designer-base/src/main/java/com/fr/design/module/DesignModuleFactory.java

@ -146,6 +146,7 @@ public class DesignModuleFactory {
try {
return (ParameterDesignerProvider) instance.formParaDesigner.newInstance();
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
FineLoggerFactory.getLogger().error("error in form para designer");
}
}

20
designer-base/src/main/java/com/fr/design/style/color/NewColorSelectBox.java

@ -30,23 +30,27 @@ public class NewColorSelectBox extends AbstractSelectBox<Color> implements UIObs
iniListener();
}
private void iniListener(){
protected void iniListener(){
if(shouldResponseChangeListener()){
this.addSelectChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
if(uiObserverListener == null){
return;
}
if (globalNameListener != null && shouldResponseNameListener()){
globalNameListener.setGlobalName(newColorSelectBoxName);
}
uiObserverListener.doChange();
attributeChange();
}
});
}
}
protected void attributeChange() {
if(uiObserverListener == null){
return;
}
if (globalNameListener != null && shouldResponseNameListener()){
globalNameListener.setGlobalName(newColorSelectBoxName);
}
uiObserverListener.doChange();
}
/**
* 初始化下拉面板
* @param preferredWidth 面板大小

21
designer-base/src/main/java/com/fr/env/RemoteEnvPane.java vendored

@ -13,6 +13,7 @@ import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ipasswordfield.UIPassWordField;
import com.fr.design.gui.ipasswordfield.UIPasswordFieldWithFixedLength;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
@ -26,7 +27,17 @@ import com.fr.workspace.WorkContext;
import com.fr.workspace.connect.WorkspaceConnectionInfo;
import com.fr.workspace.engine.exception.WorkspaceAuthException;
import javax.swing.*;
import javax.swing.BorderFactory;
import javax.swing.BoxLayout;
import javax.swing.JDialog;
import javax.swing.JFileChooser;
import javax.swing.JPanel;
import javax.swing.JTextPane;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import javax.swing.SwingWorker;
import javax.swing.ToolTipManager;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
@ -96,7 +107,7 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
/**
* 密码
*/
private UIPassWordField passwordInput = new UIPassWordField();
private UIPassWordField passwordInput = new UIPasswordFieldWithFixedLength();
/**
* 是否记住密码
*/
@ -108,7 +119,7 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
/**
* https密钥
*/
private UIPassWordField certSecretKeyInput = new UIPassWordField();
private UIPassWordField certSecretKeyInput = new UIPasswordFieldWithFixedLength();
/**
* 选择证书文件按钮
*/
@ -460,7 +471,9 @@ public class RemoteEnvPane extends BasicBeanPane<RemoteDesignerWorkspaceInfo> {
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage() , e);
}
textField.setText(name);
if (StringUtils.isEmpty(textField.getText())) {
textField.setText(name);
}
}
}.execute();
}

BIN
designer-base/src/main/resources/com/fr/design/images/reportcolumns/col_ja_JP.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
designer-base/src/main/resources/com/fr/design/images/reportcolumns/col_ko_KR.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

0
designer-base/src/main/resources/com/fr/design/images/reportcolumns/col.png → designer-base/src/main/resources/com/fr/design/images/reportcolumns/col_zh.png

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
designer-base/src/main/resources/com/fr/design/images/reportcolumns/col_zh_TW.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
designer-base/src/main/resources/com/fr/design/images/reportcolumns/row_ja_JP.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
designer-base/src/main/resources/com/fr/design/images/reportcolumns/row_ko_KR.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

0
designer-base/src/main/resources/com/fr/design/images/reportcolumns/row.png → designer-base/src/main/resources/com/fr/design/images/reportcolumns/row_zh.png

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
designer-base/src/main/resources/com/fr/design/images/reportcolumns/row_zh_TW.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

5
designer-chart/src/main/java/com/fr/design/chart/AutoChartTypePane.java

@ -63,6 +63,8 @@ public class AutoChartTypePane extends ChartWizardPane implements CallbackEvent
private AutoProgressBar connectionBar;
private SwingWorker worker;
private static final String MESSAGE = Toolkit.i18nText("Fine-Design_Chart_Auto_No_Match");
public AutoChartTypePane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
initButtonGroup();
@ -226,6 +228,9 @@ public class AutoChartTypePane extends ChartWizardPane implements CallbackEvent
chartResultModel.addElement(autoChartIcon);
}
chartViewList.setSelectedIndex(0);
} else {
FineJOptionPane.showMessageDialog(AutoChartTypePane.this, MESSAGE,
Toolkit.i18nText("Fine-Design_Basic_Message"), JOptionPane.INFORMATION_MESSAGE, UIManager.getIcon("OptionPane.informationIcon"));
}
} catch (Exception e) {
if (!(e instanceof CancellationException)) {

5
designer-chart/src/main/java/com/fr/design/chart/ChartIcon.java

@ -1,12 +1,12 @@
package com.fr.design.chart;
import com.fr.base.ScreenResolution;
import com.fr.base.chart.BaseChartPainter;
import com.fr.base.chart.chartdata.CallbackEvent;
import com.fr.base.chart.result.WebChartIDInfo;
import com.fr.chart.chartattr.ChartCollection;
import com.fr.chartx.attr.ChartProvider;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.script.Calculator;
import com.fr.stable.xml.XMLPrintWriter;
import com.fr.stable.xml.XMLable;
@ -79,7 +79,8 @@ public class ChartIcon implements Icon, XMLable {
BaseChartPainter chartPainter = getChartPainter();
int resolution = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getJTemplateResolution();
//插入图表的宽度是固定的,resolution直接获取屏幕分辨率,resolution现在只会影响到老图表
int resolution = ScreenResolution.getScreenResolution();
Graphics2D g2d = (Graphics2D) g;
Paint oldPaint = g2d.getPaint();

18
designer-chart/src/main/java/com/fr/design/chart/auto/AutoTypeCalculate.java

@ -102,22 +102,22 @@ public class AutoTypeCalculate {
}
private static boolean isNumberData(List<String> values) {
for (String value : values) {
if (!isNumberData(value)) {
return false;
for (Pattern pattern : dataPatterns) {
if (isNumberData(values, pattern)) {
return true;
}
}
return true;
return false;
}
private static boolean isNumberData(String value) {
for (Pattern pattern : dataPatterns) {
private static boolean isNumberData(List<String> values, Pattern pattern) {
for (String value : values) {
Matcher matcher = pattern.matcher(value);
if (matcher.matches()) {
return true;
if (!matcher.matches()) {
return false;
}
}
return false;
return true;
}
private static List<ColumnInfo> calculateField(String tableName, List<String> columns) {

121
designer-chart/src/main/java/com/fr/design/chartx/component/AbstractCustomFieldComboBoxPane.java

@ -1,19 +1,18 @@
package com.fr.design.chartx.component;
import com.fr.data.util.function.AbstractDataFunction;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chartx.component.correlation.AbstractCorrelationPane;
import com.fr.design.chartx.component.correlation.CalculateComboBoxEditorComponent;
import com.fr.design.chartx.component.correlation.FieldEditorComponentWrapper;
import com.fr.design.chartx.component.correlation.UIComboBoxEditorComponent;
import com.fr.design.chartx.component.correlation.UITextFieldEditorComponent;
import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icombobox.UIComboBox;
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.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.CalculateComboBox;
import com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper;
import com.fr.extended.chart.UIComboBoxWithNone;
@ -22,19 +21,25 @@ import com.fr.stable.StringUtils;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.util.ArrayList;
import java.util.List;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.ArrayList;
import java.util.List;
/**
* Created by shine on 2018/9/12.
* 系列名使用字段名or字段值的抽象的pane 支持多种属性结构的存取
*/
public abstract class AbstractCustomFieldComboBoxPane<T> extends UIComboBoxPane<T> {
public abstract class AbstractCustomFieldComboBoxPane<T> extends BasicBeanPane<T> {
private UIButtonGroup<Boolean> nameOrValue;
private JPanel cardPane;
private CardLayout cardLayout;
private AbstractUseFieldValuePane useFieldValuePane;
@ -42,73 +47,43 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends UIComboBoxPane<
private List<String> fieldList = new ArrayList<String>();
@Override
protected void initLayout() {
this.setLayout(new BorderLayout(0, 6));
JPanel northPane = new JPanel(new BorderLayout());
northPane.add(jcb, BorderLayout.CENTER);
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Series_Name_From"));
label.setPreferredSize(new Dimension(ChartDataPane.LABEL_WIDTH, 20));
northPane.add(label, BorderLayout.WEST);
this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER);
}
public AbstractCustomFieldComboBoxPane() {
@Override
protected List<FurtherBasicBeanPane<? extends T>> initPaneList() {
useFieldValuePane = createUseFieldValuePane();
customFieldNamePane = createCustomFieldNamePane();
List<FurtherBasicBeanPane<? extends T>> list = new ArrayList<FurtherBasicBeanPane<? extends T>>();
list.add(useFieldValuePane);
list.add(paneWrapper());
return list;
}
private FurtherBasicBeanPane<? extends T> paneWrapper() {
FurtherBasicBeanPane pane = new FurtherBasicBeanPane() {
nameOrValue = new UIButtonGroup<Boolean>(
new String[]{useFieldValuePane.title4PopupWindow(), customFieldNamePane.title4PopupWindow()},
new Boolean[]{false, true});
nameOrValue.setSelectedItem(false);
nameOrValue.addChangeListener(new ChangeListener() {
@Override
public String title4PopupWindow() {
return Toolkit.i18nText("Fine-Design_Chart_Enable_Field_Name");
public void stateChanged(ChangeEvent e) {
checkCardPane();
}
});
JPanel northPane = DataLayoutHelper.createDataLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Series_Name_From"), nameOrValue);
@Override
public boolean accept(Object ob) {
return false;
}
@Override
public void reset() {
}
cardLayout = new CardLayout();
cardPane = new JPanel(cardLayout);
cardPane.add(useFieldValuePane, useFieldValuePane.title4PopupWindow());
cardPane.add(customFieldNamePane, customFieldNamePane.title4PopupWindow());
@Override
public void populateBean(Object ob) {
}
@Override
public Object updateBean() {
return null;
}
};
pane.setLayout(new BorderLayout(0, 6));
pane.add(customFieldNamePane, BorderLayout.CENTER);
return pane;
this.setLayout(new BorderLayout(0, 6));
this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER);
}
protected abstract AbstractUseFieldValuePane createUseFieldValuePane();
protected abstract AbstractCustomFieldNamePane createCustomFieldNamePane();
@Override
protected String title4PopupWindow() {
return StringUtils.EMPTY;
}
protected boolean valueComboBoxHasNone() {
return false;
}
public void checkBoxUse(boolean hasUse) {
jcb.setEnabled(hasUse);
nameOrValue.setEnabled(hasUse);
useFieldValuePane.checkBoxUse(hasUse);
}
@ -122,6 +97,19 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends UIComboBoxPane<
fieldList = columnNameList;
}
private void checkCardPane() {
cardLayout.show(cardPane, nameOrValue.getSelectedItem() ? customFieldNamePane.title4PopupWindow() : useFieldValuePane.title4PopupWindow());
}
protected void populateNameOrValue(boolean b) {
nameOrValue.setSelectedItem(b);
checkCardPane();
}
protected boolean updateNameOrValue() {
return nameOrValue.getSelectedItem();
}
protected void populateCustomFieldNamePane(T t) {
customFieldNamePane.populateBean(t);
}
@ -138,6 +126,16 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends UIComboBoxPane<
useFieldValuePane.updateBean(t);
}
@Override
public T updateBean() {
return null;
}
@Override
protected String title4PopupWindow() {
return null;
}
protected abstract class AbstractUseFieldValuePane extends FurtherBasicBeanPane<T> {
private UIComboBox series;
private UIComboBox value;
@ -169,11 +167,7 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends UIComboBoxPane<
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Summary_Method"), SwingConstants.LEFT), function},
};
double p = TableLayout.PREFERRED;
double[] columnSize = {78, 122};
double[] rowSize = {p, p, p};
JPanel panel = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
JPanel panel = DataLayoutHelper.createDataLayoutPane(components);
this.setLayout(new BorderLayout(0, 6));
this.add(panel, BorderLayout.CENTER);
@ -258,5 +252,10 @@ public abstract class AbstractCustomFieldComboBoxPane<T> extends UIComboBoxPane<
protected Object[] createLine() {
return new String[]{StringUtils.EMPTY, StringUtils.EMPTY, Toolkit.i18nText("Fine-Design_Chart_Use_None")};
}
@Override
protected String title4PopupWindow() {
return Toolkit.i18nText("Fine-Design_Chart_Enable_Field_Name");
}
}
}

12
designer-chart/src/main/java/com/fr/design/chartx/component/SeriesValueFieldComboBoxPane.java

@ -27,23 +27,21 @@ public class SeriesValueFieldComboBoxPane extends AbstractCustomFieldComboBoxPan
@Override
public void populateBean(SeriesValueCorrelationDefinition ob) {
populateNameOrValue(ob.isCustomFieldValue());
if (ob.isCustomFieldValue()) {
populateCustomFieldNamePane(ob);
jcb.setSelectedIndex(1);
} else {
populateUseFieldValuePane(ob);
jcb.setSelectedIndex(0);
}
}
@Override
public void updateBean(SeriesValueCorrelationDefinition ob) {
if (jcb.getSelectedIndex() == 0) {
ob.setCustomFieldValue(false);
updateUseFieldValuePane(ob);
} else {
ob.setCustomFieldValue(true);
ob.setCustomFieldValue(updateNameOrValue());
if (ob.isCustomFieldValue()) {
updateCustomFieldNamePane(ob);
} else {
updateUseFieldValuePane(ob);
}
}

69
designer-chart/src/main/java/com/fr/design/chartx/data/DataLayoutHelper.java

@ -0,0 +1,69 @@
package com.fr.design.chartx.data;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.Component;
import java.util.Arrays;
/**
* @author shine
* @version 10.0
* Created by shine on 2020/7/22
*/
public class DataLayoutHelper {
public static int WIDTH = 150;
public static int LABEL_HEIGHT = 20;
public static int LABEL_WIDTH = 65;
public static int LEFT_GAP = 15;
public static int RIGHT_GAP = 10;
public static void setWIDTH(int WIDTH) {
DataLayoutHelper.WIDTH = WIDTH;
}
public static void setLabelHeight(int labelHeight) {
LABEL_HEIGHT = labelHeight;
}
public static void setLabelWidth(int labelWidth) {
LABEL_WIDTH = labelWidth;
}
public static void setLeftGap(int leftGap) {
LEFT_GAP = leftGap;
}
public static void setRightGap(int rightGap) {
RIGHT_GAP = rightGap;
}
public static JPanel createDataLayoutPane(Component[][] components) {
int len = components.length;
double p = TableLayout.PREFERRED;
double[] columnSize = {DataLayoutHelper.LABEL_WIDTH, DataLayoutHelper.WIDTH};
double[] rowSize = new double[len];
Arrays.fill(rowSize, p);
return TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
}
public static JPanel createDataLayoutPane(String label, Component component) {
Component[][] components = new Component[][]{
new Component[]{new UILabel(label, SwingConstants.LEFT), component}
};
return createDataLayoutPane(components);
}
public static void addNormalBorder(JComponent component) {
component.setBorder(BorderFactory.createEmptyBorder(0, DataLayoutHelper.LEFT_GAP, 0, DataLayoutHelper.RIGHT_GAP));
}
}

15
designer-chart/src/main/java/com/fr/design/chartx/data/map/AbstractAreaLngLatPane.java

@ -1,18 +1,15 @@
package com.fr.design.chartx.data.map;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.gui.ibutton.UIButtonGroup;
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.mainframe.chart.gui.ChartDataPane;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.util.Arrays;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
@ -67,8 +64,10 @@ public abstract class AbstractAreaLngLatPane extends JPanel {
locationType.setSelectedIndex(0);
JPanel northPane = DataLayoutHelper.createDataLayoutPane(Toolkit.i18nText("FR-Plugin_Design_Geographic_Location"), locationType);
this.setLayout(new BorderLayout(0, 6));
this.add(locationType, BorderLayout.NORTH);
this.add(northPane, BorderLayout.NORTH);
this.add(centerPane, BorderLayout.CENTER);
}
@ -103,12 +102,8 @@ public abstract class AbstractAreaLngLatPane extends JPanel {
for (int i = 0; i < len; i++) {
components[i] = new Component[]{new UILabel(labels[i], SwingConstants.LEFT), fieldComponents[i]};
}
double p = TableLayout.PREFERRED;
double[] columnSize = {ChartDataPane.LABEL_WIDTH, 122};
double[] rowSize = new double[len];
Arrays.fill(rowSize, p);
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 0, 6);
return DataLayoutHelper.createDataLayoutPane(components);
}
}

1
designer-chart/src/main/java/com/fr/design/chartx/data/map/MapChartDataPane.java

@ -38,6 +38,7 @@ public class MapChartDataPane extends AbstractChartDataPane<MapChartDataDefiniti
VanChartMapPlot mapPlot = this.getVanChart().getPlot();
mapType = mapPlot == null ? mapType : mapPlot.getMapType();
}
AreaMapDataSetFieldsPane areaMapDataSetFieldsPane;
PointMapDataSetFieldsPane pointMapDataSetFieldsPane;
LineMapDataSetFieldsPane lineMapDataSetFieldsPane;

15
designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractCellDataFieldsPane.java

@ -3,17 +3,13 @@ package com.fr.design.chartx.fields;
import com.fr.chartx.data.field.AbstractColumnFieldCollection;
import com.fr.chartx.data.field.ColumnField;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.formula.TinyFormulaPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.util.Arrays;
import java.awt.BorderLayout;
import java.awt.Component;
@ -46,8 +42,6 @@ public abstract class AbstractCellDataFieldsPane<T extends AbstractColumnFieldCo
if (south != null) {
this.add(south, BorderLayout.SOUTH);
}
this.setBorder(BorderFactory.createEmptyBorder(0, 24, 0, 15));
}
protected JPanel createCenterPane() {
@ -65,12 +59,7 @@ public abstract class AbstractCellDataFieldsPane<T extends AbstractColumnFieldCo
components[i] = new Component[]{new UILabel(labels[i], SwingConstants.LEFT), formulaPanes[i]};
}
double p = TableLayout.PREFERRED;
double[] columnSize = {ChartDataPane.LABEL_WIDTH, 122};
double[] rowSize = new double[len];
Arrays.fill(rowSize, p);
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 0, 6);
return DataLayoutHelper.createDataLayoutPane(components);
}

15
designer-chart/src/main/java/com/fr/design/chartx/fields/AbstractDataSetFieldsPane.java

@ -4,25 +4,21 @@ import com.fr.chartx.data.field.AbstractColumnFieldCollection;
import com.fr.chartx.data.field.ColumnField;
import com.fr.data.util.function.AbstractDataFunction;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.CalculateComboBox;
import com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper;
import com.fr.general.GeneralUtils;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.util.Arrays;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.util.List;
import static com.fr.design.mainframe.chart.gui.data.table.DataPaneHelper.refreshBoxItems;
@ -49,7 +45,6 @@ public abstract class AbstractDataSetFieldsPane<T extends AbstractColumnFieldCol
protected void initComponents() {
this.setLayout(new BorderLayout(0, 6));
this.setBorder(BorderFactory.createEmptyBorder(6, 24, 0, 15));
JPanel north = createNorthPane(),
center = createCenterPane(),
@ -86,12 +81,8 @@ public abstract class AbstractDataSetFieldsPane<T extends AbstractColumnFieldCol
for (int i = 0; i < len; i++) {
components[i] = new Component[]{new UILabel(labels[i], SwingConstants.LEFT), fieldComponents[i]};
}
double p = TableLayout.PREFERRED;
double[] columnSize = {ChartDataPane.LABEL_WIDTH, 122};
double[] rowSize = new double[len];
Arrays.fill(rowSize, p);
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 0, 6);
return DataLayoutHelper.createDataLayoutPane(components);
}
protected JPanel createSouthPane() {

7
designer-chart/src/main/java/com/fr/design/chartx/fields/diff/MapDataSetFieldsPane.java

@ -5,23 +5,24 @@ import com.fr.base.Utils;
import com.fr.chartx.TwoTuple;
import com.fr.chartx.data.field.diff.ColumnFieldCollectionWithSeriesValue;
import com.fr.design.chartx.component.MapAreaMatchPane;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionListener;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.plugin.chart.map.data.MapMatchResult;
import com.fr.plugin.chart.map.VanChartMapPlot;
import com.fr.plugin.chart.map.data.MapMatchResult;
import com.fr.plugin.chart.map.server.ChartGEOJSONHelper;
import com.fr.plugin.chart.vanchart.VanChart;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.tree.DefaultMutableTreeNode;
import java.util.Set;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Set;
/**
* @author Bjorn
@ -53,7 +54,7 @@ public abstract class MapDataSetFieldsPane<T extends ColumnFieldCollectionWithSe
public JPanel createAreaPanel(final UIComboBox areaBox) {
JPanel areaPanel = new JPanel(new BorderLayout(10, 0));
areaBox.setPreferredSize(new Dimension(91, 20));
areaBox.setPreferredSize(new Dimension(DataLayoutHelper.WIDTH - 10 - 20, DataLayoutHelper.LABEL_HEIGHT));
areaPanel.add(areaBox, BorderLayout.WEST);
UIButton uiButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/config.png"));
uiButton.addActionListener(new ActionListener() {

2
designer-chart/src/main/java/com/fr/design/chartx/single/CellDataPane.java

@ -2,6 +2,7 @@ package com.fr.design.chartx.single;
import com.fr.chartx.data.CellDataDefinition;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.i18n.Toolkit;
@ -23,6 +24,7 @@ public class CellDataPane extends FurtherBasicBeanPane<CellDataDefinition> {
this.setLayout(new BorderLayout());
this.add(cellDataFieldsPane, BorderLayout.CENTER);
DataLayoutHelper.addNormalBorder(this);
}
@Override

30
designer-chart/src/main/java/com/fr/design/chartx/single/DataSetPane.java

@ -3,25 +3,20 @@ package com.fr.design.chartx.single;
import com.fr.chartx.data.DataSetDefinition;
import com.fr.data.impl.NameTableData;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.chartx.fields.AbstractDataSetFieldsPane;
import com.fr.design.data.tabledata.wrapper.TableDataWrapper;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.chart.gui.ChartDataPane;
import com.fr.design.mainframe.chart.gui.data.DatabaseTableDataPane;
import com.fr.design.utils.gui.UIComponentUtils;
import java.util.List;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.util.List;
/**
* Created by shine on 2019/5/21.
*/
public class DataSetPane extends FurtherBasicBeanPane<DataSetDefinition> {
private static final int TABLE_DATA_LABEL_LINE_WRAP_WIDTH = 65;
private static final int TABLE_DATA_PANE_WIDTH = 246;
private DatabaseTableDataPane tableDataPane;
@ -32,24 +27,27 @@ public class DataSetPane extends FurtherBasicBeanPane<DataSetDefinition> {
}
private void initComps(AbstractDataSetFieldsPane dataSetFieldsPane) {
UILabel label = new BoldFontTextLabel(Toolkit.i18nText("Fine-Design_Chart_Table_Data"));
UIComponentUtils.setLineWrap(label, TABLE_DATA_LABEL_LINE_WRAP_WIDTH);
UIComponentUtils.setPreferedWidth(label, ChartDataPane.LABEL_WIDTH);
tableDataPane = new DatabaseTableDataPane(label) {
tableDataPane = new DatabaseTableDataPane(null) {
@Override
protected void userEvent() {
refreshBoxListAndTableName();
checkBoxUse();
}
@Override
protected void setBorder() {
}
};
tableDataPane.setPreferredSize(new Dimension(TABLE_DATA_PANE_WIDTH, tableDataPane.getPreferredSize().height));
this.dataSetFieldsPane = dataSetFieldsPane;
this.setLayout(new BorderLayout());
this.add(tableDataPane, BorderLayout.NORTH);
JPanel northPane = DataLayoutHelper.createDataLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Table_Data"), tableDataPane);
this.setLayout(new BorderLayout(0, 6));
this.add(northPane, BorderLayout.NORTH);
this.add(dataSetFieldsPane, BorderLayout.CENTER);
DataLayoutHelper.addNormalBorder(this);
checkBoxUse();
}

22
designer-chart/src/main/java/com/fr/design/chartx/single/SingleDataPane.java

@ -3,28 +3,22 @@ package com.fr.design.chartx.single;
import com.fr.chartx.data.AbstractDataDefinition;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.chartx.data.DataLayoutHelper;
import com.fr.design.chartx.fields.AbstractCellDataFieldsPane;
import com.fr.design.chartx.fields.AbstractDataSetFieldsPane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.gui.frpane.UIComboBoxPane;
import com.fr.design.gui.ilable.BoldFontTextLabel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.utils.gui.UIComponentUtils;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.util.ArrayList;
import java.util.List;
import java.awt.BorderLayout;
/**
* Created by shine on 2019/5/21.
*/
public class SingleDataPane extends BasicBeanPane<AbstractDataDefinition> {
private static final int TABLE_DATA_LABEL_LINE_WIDTH = 81;
private UIComboBoxPane<AbstractDataDefinition> comboBoxPane;
private DataSetPane dataSetPane;
@ -50,18 +44,12 @@ public class SingleDataPane extends BasicBeanPane<AbstractDataDefinition> {
}
protected void initLayout() {
this.setLayout(new BorderLayout(LayoutConstants.HGAP_LARGE, 6));
JPanel northPane = new JPanel(new BorderLayout(LayoutConstants.HGAP_LARGE, 0));
this.setLayout(new BorderLayout(0, 6));
JPanel northPane = DataLayoutHelper.createDataLayoutPane(Toolkit.i18nText("Fine-Design_Chart_Data_Source"), jcb);
DataLayoutHelper.addNormalBorder(northPane);
UILabel label = new BoldFontTextLabel(Toolkit.i18nText("Fine-Design_Chart_Data_Source"));
UIComponentUtils.setPreferedWidth(label, TABLE_DATA_LABEL_LINE_WIDTH);
northPane.add(label,BorderLayout.WEST);
northPane.add(jcb, BorderLayout.CENTER);
northPane.setBorder(BorderFactory.createEmptyBorder(5,24,0,15));
this.add(northPane, BorderLayout.NORTH);
this.add(cardPane, BorderLayout.CENTER);
}
@Override

12
designer-chart/src/main/java/com/fr/extended/chart/ExtendedCustomFieldComboBoxPane.java

@ -27,21 +27,19 @@ public class ExtendedCustomFieldComboBoxPane extends AbstractCustomFieldComboBox
public void populateBean(AbstractDataConfig ob) {
if (ob.isCustomName()) {
populateCustomFieldNamePane(ob);
jcb.setSelectedIndex(1);
} else {
populateUseFieldValuePane(ob);
jcb.setSelectedIndex(0);
}
populateNameOrValue(ob.isCustomName());
}
@Override
public void updateBean(AbstractDataConfig ob) {
if (jcb.getSelectedIndex() == 0) {
ob.setCustomName(false);
updateUseFieldValuePane(ob);
} else {
ob.setCustomName(true);
ob.setCustomName(updateNameOrValue());
if (ob.isCustomName()) {
updateCustomFieldNamePane(ob);
} else {
updateUseFieldValuePane(ob);
}
}

2
designer-chart/src/main/java/com/fr/van/chart/designer/other/VanChartInteractivePane.java

@ -29,6 +29,7 @@ import com.fr.plugin.chart.base.VanChartAttrMarker;
import com.fr.plugin.chart.base.VanChartConstants;
import com.fr.plugin.chart.base.VanChartTools;
import com.fr.plugin.chart.base.VanChartZoom;
import com.fr.plugin.chart.gantt.attr.AttrGanttLabel;
import com.fr.plugin.chart.map.line.condition.AttrLineEffect;
import com.fr.plugin.chart.scatter.attr.ScatterAttrLabel;
import com.fr.plugin.chart.vanchart.VanChart;
@ -436,6 +437,7 @@ public class VanChartInteractivePane extends AbstractVanChartScrollPane<Chart> {
conditionAttr.remove(AttrEffect.class);
conditionAttr.remove(AttrLineEffect.class);
conditionAttr.remove(AttrFloatColor.class);
conditionAttr.remove(AttrGanttLabel.class);
VanChartAttrMarker attrMarker = conditionAttr.getExisted(VanChartAttrMarker.class);
if (attrMarker != null && !attrMarker.isCommon()) {

4
designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLineMapTooltipConditionPane.java

@ -4,7 +4,7 @@ package com.fr.van.chart.designer.other.condition.item;
import com.fr.chart.chartattr.Plot;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.van.chart.designer.style.tooltip.VanChartPlotTooltipPane;
import com.fr.van.chart.map.line.VanChartLineMapPlotTooltipPane;
import com.fr.van.chart.map.line.VanChartLineMapPlotTooltipNoCheckPane;
/**
* Created by hufan on 2016/12/23.
@ -16,6 +16,6 @@ public class VanChartLineMapTooltipConditionPane extends VanChartTooltipConditio
}
protected VanChartPlotTooltipPane createTooltipContentsPane() {
return new VanChartLineMapPlotTooltipPane(getPlot(), null);
return new VanChartLineMapPlotTooltipNoCheckPane(getPlot(), null);
}
}

14
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/other/VanChartGanttConditionPane.java

@ -12,6 +12,7 @@ import com.fr.plugin.chart.gantt.attr.AttrGanttLabel;
import com.fr.plugin.chart.gantt.attr.AttrGanttTooltip;
import com.fr.plugin.chart.gantt.attr.AttrGanttTooltipContent;
import com.fr.plugin.chart.type.ConditionKeyType;
import com.fr.van.chart.designer.PlotFactory;
import com.fr.van.chart.designer.other.condition.item.VanChartLabelConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartSeriesColorConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartTooltipConditionPane;
@ -40,16 +41,18 @@ public class VanChartGanttConditionPane extends DataSeriesConditionPane {
protected void addBasicAction() {
classPaneMap.put(AttrBackground.class, new VanChartSeriesColorConditionPane(this));
classPaneMap.put(AttrAlpha.class, new LabelAlphaPane(this));
classPaneMap.put(AttrGanttLabel.class, new VanChartLabelConditionPane(this, plot));
classPaneMap.put(AttrGanttTooltip.class, new VanChartTooltipConditionPane(this, plot){
if (!PlotFactory.largeDataModel(plot)) {
classPaneMap.put(AttrGanttLabel.class, new VanChartLabelConditionPane(this, plot));
}
classPaneMap.put(AttrGanttTooltip.class, new VanChartTooltipConditionPane(this, plot) {
@Override
protected VanChartPlotTooltipPane createTooltipContentsPane() {
return new VanChartPlotTooltipNoCheckPane(getPlot(), null){
return new VanChartPlotTooltipNoCheckPane(getPlot(), null) {
@Override
protected AttrTooltip getAttrTooltip() {
AttrGanttTooltip attrGanttTooltip = new AttrGanttTooltip();
((AttrGanttTooltipContent)attrGanttTooltip.getContent()).getDurationFormat().setEnable(true);
((AttrGanttTooltipContent) attrGanttTooltip.getContent()).getDurationFormat().setEnable(true);
return attrGanttTooltip;
}
};
@ -65,7 +68,7 @@ public class VanChartGanttConditionPane extends DataSeriesConditionPane {
@Override
protected ChartConditionPane createListConditionPane() {
return new ChartConditionPane(){
return new ChartConditionPane() {
@Override
protected ConditionKeyType[] conditionKeyTypes() {
return ConditionKeyType.Gantt_CONDITION_KEY_TYPES;
@ -75,6 +78,7 @@ public class VanChartGanttConditionPane extends DataSeriesConditionPane {
/**
* 返回图表class对象
*
* @return class对象
*/
public Class<? extends Plot> class4Correspond() {

7
designer-chart/src/main/java/com/fr/van/chart/gantt/designer/style/series/VanChartGanttSeriesPane.java

@ -44,7 +44,8 @@ public class VanChartGanttSeriesPane extends VanChartAbstractPlotSeriesPane {
Component[][] components = new Component[][]{
new Component[]{createGanntStylePane()},
new Component[]{createLinkLinePane()},
new Component[]{createMarkerPane()}
new Component[]{createMarkerPane()},
new Component[]{createLargeDataModelPane()}
};
contentPane = TableLayoutHelper.createTableLayoutPane(components, row, col);
@ -58,6 +59,10 @@ public class VanChartGanttSeriesPane extends VanChartAbstractPlotSeriesPane {
return ganntStylePane;
}
protected void checkCompsEnabledWithLarge(Plot plot) {
}
private JPanel createLinkLinePane(){
lineWidth = new LineComboBox(CoreConstants.STRIKE_LINE_STYLE_ARRAY_4_CHART);
colorSelect = new ColorSelectBoxWithOutTransparent(100);

36
designer-chart/src/main/java/com/fr/van/chart/map/line/VanChartLineMapPlotTooltipNoCheckPane.java

@ -0,0 +1,36 @@
package com.fr.van.chart.map.line;
import com.fr.chart.chartattr.Plot;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.i18n.Toolkit;
import com.fr.plugin.chart.base.AttrTooltip;
import com.fr.van.chart.designer.style.VanChartStylePane;
import java.awt.BorderLayout;
/**
* @author Bjorn
* @version 10.0
* Created by Bjorn on 2020-08-20
*/
public class VanChartLineMapPlotTooltipNoCheckPane extends VanChartLineMapPlotTooltipPane {
public VanChartLineMapPlotTooltipNoCheckPane(Plot plot, VanChartStylePane parent) {
super(plot, parent);
}
protected void addComponents(Plot plot) {
isTooltipShow = new UICheckBox(Toolkit.i18nText("Fine-Design_Chart_Use_Tooltip"));
tooltipPane = createTooltipPane(plot);
this.setLayout(new BorderLayout());
this.add(tooltipPane, BorderLayout.CENTER);
}
@Override
public void populate(AttrTooltip attr) {
super.populate(attr);
isTooltipShow.setSelected(true);
tooltipPane.setEnabled(isTooltipShow.isSelected());
}
}

8
designer-form/src/main/java/com/fr/design/designer/beans/models/AddingModel.java

@ -133,13 +133,13 @@ public class AddingModel {
Rectangle rect = ComponentUtils.getRelativeBounds(container);
if (!ComparatorUtils.equals(container.getOuterLayout(), container.getBackupParent())) {
added = container.getLayoutAdapter().addBean(creator,
x + designer.getArea().getHorizontalValue(),
y + designer.getArea().getVerticalValue());
x + designer.getHorizontalScaleValue(),
y + designer.getVerticalScaleValue() );
return added;
}
added = container.getLayoutAdapter().addBean(creator,
x + designer.getArea().getHorizontalValue() - rect.x,
y + designer.getArea().getVerticalValue() - rect.y);
x + designer.getHorizontalScaleValue() - rect.x,
y + designer.getVerticalScaleValue() - rect.y);
return added;
}
}

6
designer-form/src/main/java/com/fr/design/designer/creator/XWAbsoluteLayout.java

@ -433,7 +433,11 @@ public class XWAbsoluteLayout extends XLayoutContainer {
@Override
public XLayoutContainer getTopLayout() {
XLayoutContainer xTopLayout = XCreatorUtils.getParentXLayoutContainer(this).getTopLayout();
XLayoutContainer parentXLayoutContainer = XCreatorUtils.getParentXLayoutContainer(this);
if (parentXLayoutContainer == null) {
return this;
}
XLayoutContainer xTopLayout = parentXLayoutContainer.getTopLayout();
if (xTopLayout != null && !xTopLayout.isEditable()) {
return xTopLayout;
} else {

3
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XCardAddButton.java

@ -86,7 +86,6 @@ public class XCardAddButton extends XButton {
@Override
public void respondClick(EditingMouseListener editingMouseListener, MouseEvent e){
FormDesigner designer = editingMouseListener.getDesigner();
designer.fireTargetModified();
// addbutton对应的XWCardLayout和XWCardTagLayout暂未存入到xml中,重新打开之后先根据父子层获取
if(cardLayout == null && tagLayout ==null ){
@ -112,6 +111,8 @@ public class XCardAddButton extends XButton {
showNewTab(editingMouseListener,index);
tagLayout.setTabsAndAdjust();
LayoutUtils.layoutRootContainer(designer.getRootComponent());
designer.fireTargetModified();
}
@Override

2
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java

@ -143,7 +143,7 @@ public class XWCardTagLayout extends XWHorizontalBoxLayout {
fitLayout.setInitialBackground(layout.getTemplateStyle().getTabDefaultBackground());
fitLayout.setCustomStyle(true);
}
tabFitLayout.setxCardSwitchButton((XCardSwitchButton)this.getComponent(0));
tabFitLayout.setxCardSwitchButton((XCardSwitchButton)this.getComponent(index));
tabFitLayout.checkButonType();
tabFitLayout.setBackupParent(cardLayout);
cardLayout.add(tabFitLayout, widgetName);

3
designer-form/src/main/java/com/fr/design/form/util/FormDesignerUtils.java

@ -17,6 +17,9 @@ public class FormDesignerUtils {
* @return
*/
public static boolean isAppRelayout(FormDesigner designer) {
if (!designer.getRootComponent().acceptType(WFitLayout.class)) {
return false;
}
return ((WFitLayout) designer.getRootComponent().toData()).isAppRelayout();
}

29
designer-form/src/main/java/com/fr/design/mainframe/EditingMouseListener.java

@ -11,7 +11,13 @@ import com.fr.design.designer.beans.location.Direction;
import com.fr.design.designer.beans.location.Location;
import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.beans.models.StateModel;
import com.fr.design.designer.creator.*;
import com.fr.design.designer.creator.XChartEditor;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XEditorHolder;
import com.fr.design.designer.creator.XElementCase;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.cardlayout.XCardSwitchButton;
import com.fr.design.designer.creator.cardlayout.XWCardLayout;
import com.fr.design.form.util.XCreatorConstants;
@ -22,14 +28,20 @@ import com.fr.design.icon.IconPathConstants;
import com.fr.design.utils.ComponentUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.design.utils.gui.LayoutUtils;
import com.fr.share.ShareConstants;
import com.fr.stable.Constants;
import com.fr.stable.StringUtils;
import javax.swing.*;
import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JPopupMenu;
import javax.swing.JWindow;
import javax.swing.SwingUtilities;
import javax.swing.event.MouseInputAdapter;
import java.awt.*;
import java.awt.Color;
import java.awt.Container;
import java.awt.Cursor;
import java.awt.Rectangle;
import java.awt.event.MouseEvent;
/**
@ -165,10 +177,13 @@ public class EditingMouseListener extends MouseInputAdapter {
if (designer.isDrawLineMode()) {
designer.updateDrawLineMode(e);
} else {
int relativeX = Math.max(0, designer.getRelativeX(e.getX()));
int relativeY = Math.max(0, designer.getRelativeY(e.getY()));
if (selectionModel.hasSelectionComponent()
&& selectionModel.getSelection().getRelativeBounds().contains(
designer.getArea().getHorizontalValue() + e.getX(),
designer.getArea().getVerticalValue() + e.getY())) {
designer.getHorizontalScaleValue() + relativeX,
designer.getVerticalScaleValue() + relativeY)) {
lastPressEvent = e;
lastXCreator = selectionModel.getSelection().getSelectedCreator();
} else {

8
designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java

@ -409,8 +409,8 @@ public class FormDesignerUI extends ComponentUI {
clipg = g.create(
-designer.getHorizontalScaleValue(),
-designer.getVerticalScaleValue() + designer.getParaHeight(),
(int) ((parent.getSize().width + designer.getArea().getHorizontalValue()) / designer.getScale()),
(int) ((parent.getSize().height + designer.getArea().getVerticalValue()) / designer.getScale()));
parent.getSize().width + designer.getHorizontalScaleValue(),
parent.getSize().height + designer.getVerticalScaleValue());
designer.paintContent(clipg);
paintWatermark((Graphics2D) clipg);
@ -435,8 +435,8 @@ public class FormDesignerUI extends ComponentUI {
Graphics clipg1;
clipg1 = g.create(-designer.getHorizontalScaleValue(),
-designer.getVerticalScaleValue(),
(int) ((parent.getSize().width + designer.getArea().getHorizontalValue()) / designer.getScale()),
(int) ((designer.getParaHeight() + designer.getArea().getVerticalValue()) / designer.getScale()));
parent.getSize().width + designer.getHorizontalScaleValue(),
designer.getParaHeight() + designer.getVerticalScaleValue());
designer.paintPara(clipg1);
clipg1.dispose();

13
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/TabMobileWidgetDefinePane.java

@ -19,6 +19,7 @@ import com.fr.design.widget.ui.designer.mobile.component.MobileAdvanceInnerPane;
import com.fr.design.widget.ui.designer.mobile.component.MobileBookMarkUsePane;
import com.fr.design.widget.ui.designer.mobile.component.MobileComponentMarginPane;
import com.fr.design.widget.ui.designer.mobile.component.MobileComponentLayoutIntervalPane;
import com.fr.design.widget.ui.designer.mobile.component.MobileTabCommonSettingPane;
import com.fr.form.ui.container.cardlayout.WCardTagLayout;
import com.fr.general.cardtag.mobile.MobileTemplateStyle;
@ -34,6 +35,7 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane {
private MobileComponentMarginPane marginPane;
private MobileComponentLayoutIntervalPane intervalPane;
private MobileBookMarkUsePane mobileBookMarkUsePane;
private MobileTabCommonSettingPane mobileTabCommonSettingPane;
public TabMobileWidgetDefinePane(XCreator xCreator) {
this.xCreator = xCreator;
@ -73,6 +75,8 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane {
mobileBookMarkUsePane = new MobileBookMarkUsePane();
innerAdvancePane.add(mobileBookMarkUsePane, BorderLayout.CENTER);
}
mobileTabCommonSettingPane = new MobileTabCommonSettingPane();
innerAdvancePane.add(mobileTabCommonSettingPane, BorderLayout.SOUTH);
innerAdvancePane.add(marginPane, BorderLayout.NORTH);
UIExpandablePane advancePane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 280, 20, innerAdvancePane);
UIExpandablePane layoutPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Layout"), 280, 20, intervalPane);
@ -88,7 +92,8 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane {
@Override
public void populate(FormDesigner designer) {
WCardTagLayout wCardTagLayout = (WCardTagLayout) xCreator.toData();
templateStyleEditor.setValue((wCardTagLayout).getMobileTemplateStyle());
MobileTemplateStyle mobileTemplateStyle = wCardTagLayout.getMobileTemplateStyle();
templateStyleEditor.setValue(mobileTemplateStyle);
// 数据 populate 完成后,再设置监听
this.bindListeners2Widgets();
this.addAttributeChangeListener(changeListener);
@ -101,6 +106,9 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane {
if (mobileBookMarkUsePane != null) {
mobileBookMarkUsePane.populate(xCreator);
}
if (mobileTabCommonSettingPane != null) {
mobileTabCommonSettingPane.populate(mobileTemplateStyle);
}
}
@Override
@ -117,5 +125,8 @@ public class TabMobileWidgetDefinePane extends MobileWidgetDefinePane {
if (mobileBookMarkUsePane != null) {
mobileBookMarkUsePane.update(xCreator);
}
if (mobileTabCommonSettingPane != null) {
mobileTabCommonSettingPane.update(wCardTagLayout.getMobileTemplateStyle());
}
}
}

203
designer-form/src/main/java/com/fr/design/widget/ui/designer/mobile/component/MobileTabCommonSettingPane.java

@ -0,0 +1,203 @@
package com.fr.design.widget.ui.designer.mobile.component;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.designer.beans.events.DesignerEvent;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.ModeButtonGroup;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.general.cardtag.mobile.MobileTemplateStyle;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.JComponent;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
public class MobileTabCommonSettingPane extends BasicPane {
private UICheckBox showTabTitleCheck;
private UICheckBox tabSlideCheck;
private UICheckBox showTabDotIndicatorCheck;
private ModeButtonGroup<Integer> buttonGroup;
private NewColorSelectBox initDotColorBox;
private NewColorSelectBox selectDotColorBox;
public MobileTabCommonSettingPane() {
initComponent();
}
private void initComponent() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.showTabTitleCheck = new UICheckBox(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Tab_Show_Title"), true) {
@Override
protected void initListener() {
this.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
attributeChange();
}
});
}
};
this.tabSlideCheck = new UICheckBox(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Tab_Slide"), true) {
@Override
protected void initListener() {
this.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
attributeChange();
}
});
}
};
this.showTabDotIndicatorCheck = new UICheckBox(
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Tab_Show_Indicator"), true) {
@Override
protected void initListener() {
this.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
attributeChange();
}
});
}
};
UILabel label = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Tab_Show_Indicator_type"));
JPanel dotIndicatorShowTypePane = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane();
addIndicatorShowTypeButton(dotIndicatorShowTypePane);
UILabel initColorLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Init_Fill"));
UILabel selectColor = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Select_Fill"));
initDotColorBox = new NewColorSelectBox(0){
@Override
protected void iniListener() {
}
@Override
public void mouseClicked(MouseEvent e) {
super.mouseClicked(e);
this.attributeChange();
}
};
selectDotColorBox = new NewColorSelectBox(0){
@Override
protected void iniListener() {
}
@Override
public void mouseClicked(MouseEvent e) {
super.mouseClicked(e);
this.attributeChange();
}
};
JPanel initDotColorPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{initColorLabel, initDotColorBox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM);
JPanel selectDotColorPane = TableLayoutHelper.createGapTableLayoutPane(new Component[][]{new Component[]{selectColor, selectDotColorBox}}, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_L1, LayoutConstants.VGAP_MEDIUM);
double[] rowSize = {TableLayout.PREFERRED, TableLayout.PREFERRED, TableLayout.PREFERRED};
double[] columnSize = {TableLayout.FILL};
int[][] rowCount = {{1}, {1}, {1}};
double[] verticalGaps = {10, 10, 10};
double[] dotSettingColumnSize = {TableLayout.PREFERRED, TableLayout.FILL};
Component[][] components = new Component[][]{
new Component[]{this.showTabTitleCheck},
new Component[]{this.tabSlideCheck},
new Component[]{this.showTabDotIndicatorCheck}
};
JPanel tabBaseConfigPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount,
IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1);
tabBaseConfigPane.setBorder(BorderFactory.createEmptyBorder(0, 0, IntervalConstants.INTERVAL_L1, 0));
JPanel dotIndicatorSettingPanel = TableLayoutHelper.createDiffVGapTableLayoutPane(new JComponent[][]{
{label, dotIndicatorShowTypePane},
{initColorLabel, initDotColorPane},
{selectColor, selectDotColorPane}}, rowSize, dotSettingColumnSize, 0, verticalGaps);
dotIndicatorSettingPanel.setBorder(
BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L2, IntervalConstants.INTERVAL_L1, 0)
);
final JPanel jPanel = FRGUIPaneFactory.createBorderLayout_S_Pane();
jPanel.add(tabBaseConfigPane, BorderLayout.NORTH);
jPanel.add(dotIndicatorSettingPanel, BorderLayout.CENTER);
this.add(jPanel, BorderLayout.CENTER);
showTabDotIndicatorCheck.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
dotIndicatorSettingPanel.setVisible(showTabDotIndicatorCheck.isSelected());
}
});
}
public void populate(MobileTemplateStyle mobileTemplateStyle) {
this.showTabTitleCheck.setSelected(mobileTemplateStyle.isShowTabTitle());
this.showTabDotIndicatorCheck.setSelected(mobileTemplateStyle.isShowDotIndicator());
this.tabSlideCheck.setSelected(mobileTemplateStyle.canSlide());
Color initDotColor = mobileTemplateStyle.getIndicatorInitialColor();
Color selectDotColor = mobileTemplateStyle.getIndicatorSelectColor();
int dotIndicatorShowType = mobileTemplateStyle.getDotIndicatorShowType();
this.populateColorBox(initDotColorBox, initDotColor, MobileTemplateStyle.DEFAULT_INITIAL_DOT_COLOR);
this.populateColorBox(selectDotColorBox, selectDotColor, MobileTemplateStyle.DEFAULT_SELECT_DOT_COLOR);
if (dotIndicatorShowType != buttonGroup.getCurrentSelected()) {
this.buttonGroup.setSelectButton(dotIndicatorShowType);
}
}
public void update(MobileTemplateStyle mobileTemplateStyle) {
mobileTemplateStyle.setShowTabTitle(showTabTitleCheck.isSelected());
mobileTemplateStyle.setShowDotIndicator(showTabDotIndicatorCheck.isSelected());
mobileTemplateStyle.setCanSlide(tabSlideCheck.isSelected());
mobileTemplateStyle.setIndicatorInitialColor(initDotColorBox.getSelectObject());
mobileTemplateStyle.setIndicatorSelectColor(selectDotColorBox.getSelectObject());
mobileTemplateStyle.setDotIndicatorShowType(buttonGroup.getCurrentSelected());
WidgetPropertyPane.getInstance().getEditingFormDesigner().getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED);
}
@Override
protected String title4PopupWindow() {
return "MobileTabCommonSettingPane";
}
private void addIndicatorShowTypeButton(JPanel dotIndicatorShowTypePane) {
UIRadioButton holderPlaceButton = new UIRadioButton(Toolkit.i18nText("Fine-Design_Mobile_Tab_Holder_Place"));
holderPlaceButton.setSelected(true);
UIRadioButton floatButton = new UIRadioButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Tab_Float"));
dotIndicatorShowTypePane.add(holderPlaceButton);
dotIndicatorShowTypePane.add(floatButton);
dotIndicatorShowTypePane.setBorder(
BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L1, 0, 0)
);
buttonGroup = new ModeButtonGroup<>();
buttonGroup.put(MobileTemplateStyle.TYPE_PLACEHOLDER_DOT_INDICATOR, holderPlaceButton);
buttonGroup.put(MobileTemplateStyle.TYPE_FLOAT_DOT_INDICATOR, floatButton);
}
private void populateColorBox(NewColorSelectBox colorBox, Color color, Color defaultColor) {
if (color == null) {
color = defaultColor;
}
if (color != colorBox.getSelectObject()) {
colorBox.setSelectObject(color);
}
}
}

3
designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentComposite.java

@ -119,7 +119,8 @@ public class ReportComponentComposite extends JComponent implements RemoveListen
templateStateList.add(null);
}
centerCardPane.editingComponet.setSelection(centerCardPane.editingComponet.getDefaultSelectElement());
jSliderContainer = JFormSliderPane.getInstance();
// Yvan: REPORT-37950 普通报表-多sheet-报表块缩放失效
//jSliderContainer = JFormSliderPane.getInstance();
}
if (centerCardPane.editingComponet.elementCasePane == null) {

3
designer-realize/src/main/java/com/fr/design/parameter/ParameterDefinitePane.java

@ -95,7 +95,8 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
setComponentBg(this);
paraDesignEditor = DesignModuleFactory.getFormParaDesigner();
if (paraDesignEditor == null) {
return;
// 为空时 设置默认值
paraDesignEditor = new FormParaDesigner();
}
paraDesignEditor.initWidgetToolbarPane();

3
designer-realize/src/main/java/com/fr/start/DesignerJavaRuntime.java

@ -44,6 +44,7 @@ public class DesignerJavaRuntime extends AbstractJavaRuntime {
private static final String DOCK_NAME_OPTIONS = "-Xdock:name=" + FineDesigner.class.getSimpleName();
private static final String WIN_VM_OPTIONS_PATH = StableUtils.pathJoin(BIN_HOME, "designer.vmoptions");
private static final String[] DEBUG_OPTIONS = new String[]{"-Dfile.encoding=UTF-8", "-Xmx2048m"};
private static final String WIN_SERVER_PATH = "../server/lib";
static {
try {
@ -110,7 +111,7 @@ public class DesignerJavaRuntime extends AbstractJavaRuntime {
if (isInstallVersion()) {
String[] options = super.getJvmOptions();
// win下环境变量 存在错误的设置会导致问题 直接读vmoptions
if (SupportOSImpl.VM_OPTIONS_ADAPTER.support()) {
if (SupportOSImpl.VM_OPTIONS_ADAPTER.support() && !getClassPath().contains(WIN_SERVER_PATH)) {
List<String> optionList = new ArrayList<>();
try (BufferedReader reader = new BufferedReader(new FileReader(new File(WIN_VM_OPTIONS_PATH)))) {
String option = null;

Loading…
Cancel
Save