Browse Source

Merge pull request #8323 in DESIGN/design from release/11.0 to feature/x

* commit 'c48d23f984ecc8a7f62fdff99e0876b2f53cba57':
  REPORT-68175 release合并final
  REPORT-68127 【专题】jdk11的设计器用bat脚本启动失败,exe启动正常
  REPORT-68062 单元格数据列高级设置-格式设置不生效
  CHART-21969 fix: fvs.cpt屏蔽场景地图新建入口
  REPORT-68061 单元格元素-数据设置-自定义分组设置无法点击确定
  REPORT-68161 填报-模板web属性-切换设置时,编辑行背景设置的点击逻辑确认
  REPORT-68127 【专题】jdk11的设计器用bat脚本启动失败,exe启动正常
  REPORT-68062 单元格数据列高级设置-格式设置不生效
  CHART-22972 HyperlinkProvider接口对图表超链不起作用
  CHART-23227 钻取点地图&钻取区域地图切换类型,预览无法展示
  REPORT-68161 填报-模板web属性-切换设置时,编辑行背景设置的点击逻辑确认
  REPORT-68175 FR11决策报表-绝对布局frm,鼠标在body没有组件的空白区域,点击然后拖拽,会出现组件大小被拉伸且超出body范围的错乱现象,此时点回退按钮会使模板变为宽度为1的效果
feature/x
superman 3 years ago
parent
commit
09e0929ff6
  1. 21
      designer-base/src/main/java/com/fr/design/startup/Install4jStartupNotificationProvider.java
  2. 2
      designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java
  3. 7
      designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java
  4. 8
      designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java
  5. 21
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java
  6. 18
      designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java
  7. 6
      designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java
  8. 3
      designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java
  9. 63
      designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnAdvancedPane.java
  10. 1
      designer-realize/src/main/java/com/fr/design/webattr/WriteToolBarPane.java
  11. 2
      designer-realize/src/main/java/com/fr/design/webattr/WriteWebSettingPane.java
  12. 31
      designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

21
designer-base/src/main/java/com/fr/design/startup/Install4jStartupNotificationProvider.java

@ -22,14 +22,22 @@ public class Install4jStartupNotificationProvider implements FineStartupNotifica
@Override
public void registerStartupListener(Listener listener) {
Class<?> StartupNotificationListenerClass = Reflect.on("com.install4j.api.launcher.StartupNotification$Listener").type();
Class<?> StartupNotificationListenerClass = null;
try {
StartupNotificationListenerClass = Reflect.on("com.install4j.api.launcher.StartupNotification$Listener").type();
} catch (Exception ignored) {
}
if (StartupNotificationListenerClass == null) {
return;
}
ListenerHandler mHandler = new ListenerHandler(listener);
Object listenerCallbackInstance = Proxy.newProxyInstance(this.getClass().getClassLoader(), new Class[] { StartupNotificationListenerClass }, mHandler);
Reflect.on("com.install4j.api.launcher.StartupNotification").call("registerStartupListener", listenerCallbackInstance);
try {
Reflect.on("com.install4j.api.launcher.StartupNotification").call("registerStartupListener", listenerCallbackInstance);
} catch (Exception ignored) {
}
}
private static class ListenerHandler implements InvocationHandler {
@ -48,4 +56,13 @@ public class Install4jStartupNotificationProvider implements FineStartupNotifica
return null;
}
}
public static void main(String[] args) {
Install4jStartupNotificationProvider.getInstance().registerStartupListener(new Listener() {
@Override
public void startupPerformed(String parameters) {
}
});
}
}

2
designer-chart/src/main/java/com/fr/design/ChartTypeInterfaceManager.java

@ -111,6 +111,8 @@ public class ChartTypeInterfaceManager implements ExtraChartDesignClassManagerPr
public static final String TYPE_PANE_DEFAULT_TITLE = "DEFAULT_NAME";
public static final String GEO_LAND_CHART_ID = "UGeoLandChart";
public synchronized static ChartTypeInterfaceManager getInstance() {
return classManager;

7
designer-chart/src/main/java/com/fr/design/chart/ChartTypePane.java

@ -8,11 +8,13 @@ import com.fr.chart.chartattr.ChartCollection;
import com.fr.chart.charttypes.ChartTypeManager;
import com.fr.chartx.attr.ChartProvider;
import com.fr.design.ChartTypeInterfaceManager;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.chart.info.ChartInfoCollector;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.ArrayUtils;
import com.fr.van.chart.config.DefaultStyleHelper4Van;
import javax.swing.BorderFactory;
@ -45,6 +47,11 @@ public class ChartTypePane extends ChartCommonWizardPane implements CallbackEven
DefaultListModel defaultListModel = new DefaultListModel();
mainTypeList = new JList(defaultListModel);
if (DesignModeContext.isDuchampMode()
&& ArrayUtils.contains(chartIDs, ChartTypeInterfaceManager.GEO_LAND_CHART_ID)) {
chartIDs = ArrayUtils.removeElement(chartIDs, ChartTypeInterfaceManager.GEO_LAND_CHART_ID);
}
for (int i = 0; i < chartIDs.length; i++) {
defaultListModel.insertElementAt(ChartTypeInterfaceManager.getInstance().getName(chartIDs[i]), i);
}

8
designer-chart/src/main/java/com/fr/design/mainframe/chart/ChartEditPane.java

@ -29,6 +29,7 @@ import com.fr.log.FineLoggerFactory;
import com.fr.plugin.chart.custom.VanChartCustomPlot;
import com.fr.plugin.chart.vanchart.VanChart;
import com.fr.van.chart.drillmap.designer.data.VanChartDrillMapDataPane;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
@ -148,7 +149,12 @@ public class ChartEditPane extends BasicPane implements AttributeChange, Prepare
ChartInfoCollector.getInstance().updateChartPropertyTime(collection.getSelectedChartProvider(ChartProvider.class));
selectedPane.update(collection);
for (int i = 0; i < paneList.size(); i++) {
if (paneList.get(i) instanceof VanChartDrillMapDataPane && i != tabsHeaderIconPane.getSelectedIndex()) {
paneList.get(i).populateBean(collection);
break;
}
}
if (!ComparatorUtils.equals(collection, lastCollection)) {
VanChart vanChart = collection.getSelectedChartProvider(VanChart.class);
if (vanChart != null) {

21
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypePane.java

@ -19,7 +19,6 @@ import com.fr.design.mainframe.chart.gui.item.FlexibleComboBox;
import com.fr.design.mainframe.chart.gui.item.ItemEventType;
import com.fr.design.mainframe.chart.gui.type.AbstractChartTypePane;
import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.design.mainframe.chart.mode.ChartEditMode;
import com.fr.design.module.DesignModuleFactory;
import com.fr.general.ComparatorUtils;
import com.fr.log.FineLoggerFactory;
@ -27,11 +26,6 @@ import com.fr.stable.AssistUtils;
import com.fr.stable.StringUtils;
import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.event.ActionEvent;
@ -40,6 +34,11 @@ import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
/**
* 图表 属性表, 类型选择 界面.
@ -55,6 +54,7 @@ public class ChartTypePane extends AbstractChartAttrPane {
private ActionListener autoButtonListener;
private boolean inForm;
@Override
protected JPanel createContentPane() {
initButtonListener();
@ -291,13 +291,20 @@ public class ChartTypePane extends AbstractChartAttrPane {
String plotID = entry.getKey();
if (ignore || ChartTypeManager.enabledChart(plotID)) {
if (ChartTypeManager.getInstance().isShowInDesigner(plotID)) {
cards.add(entry.getValue());
if (notGeoLandInDuchampCPT(plotID)) {
cards.add(entry.getValue());
}
}
}
}
}
public boolean notGeoLandInDuchampCPT(String plotID) {
return !(DesignModeContext.isDuchampMode()
&& ChartTypeInterfaceManager.GEO_LAND_CHART_ID.equals(plotID));
}
private void addOnePlotIDCards(int priority, String plotID) {
cards.add(allChartTypePane.get(priority).get(plotID));
}

18
designer-chart/src/main/java/com/fr/van/chart/custom/component/VanChartHyperLinkPane.java

@ -150,17 +150,19 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
//安装平台内打开插件时,添加相应按钮
Set<HyperlinkProvider> providers = ExtraDesignClassManager.getInstance().getArray(HyperlinkProvider.XML_TAG);
for (HyperlinkProvider provider : providers) {
NameableCreator nc = provider.createHyperlinkCreator();
paneMap.put(nc.getHyperlink(), nc.getUpdatePane());
}
java.util.List<UIMenuNameableCreator> list = refreshList(paneMap);
NameObjectCreator[] creators = new NameObjectCreator[list.size()];
for (int i = 0; list != null && i < list.size(); i++) {
int size = list.size();
NameObjectCreator[] creators = new NameObjectCreator[size + providers.size()];
for (int i = 0; i < size; i++) {
UIMenuNameableCreator uiMenuNameableCreator = list.get(i);
creators[i] = new NameObjectCreator(uiMenuNameableCreator.getName(), uiMenuNameableCreator.getObj().getClass(), uiMenuNameableCreator.getPaneClazz());
}
for (HyperlinkProvider provider : providers) {
NameableCreator creator = provider.createHyperlinkCreator();
if (creator != null) {
creators[size] = new NameObjectCreator(creator.menuName(), creator.getHyperlink(), creator.getUpdatePane());
size++;
}
}
refreshNameableCreator(creators);

6
designer-form/src/main/java/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java

@ -4,6 +4,7 @@ import com.fr.design.beans.GroupModel;
import com.fr.design.designer.beans.ConstraintsGroupModel;
import com.fr.design.designer.beans.HoverPainter;
import com.fr.design.designer.beans.models.DraggingModel;
import com.fr.design.designer.beans.models.StateModel;
import com.fr.design.designer.beans.painters.FRAbsoluteLayoutPainter;
import com.fr.design.designer.creator.*;
import com.fr.design.designer.properties.BoundsGroupModel;
@ -353,7 +354,10 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter {
public void dragging(DraggingModel model) {
FormDesigner designer = model.getDesigner();
MouseEvent dragEvent = model.getCurrentDragEvent();
designer.getStateModel().dragging(dragEvent);
StateModel stateModel = designer.getStateModel();
if (stateModel.dragable()) {
stateModel.dragging(dragEvent);
}
}
@Override

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

@ -224,6 +224,9 @@ public class FormDesignerUI extends ComponentUI {
}
XCreator creator = draggingModel.getCreator();
if (!creator.isSupportDrag()) {
return false;
}
int leftTopX = draggingModel.getCreatorLeftTopX();
int leftTopY = draggingModel.getCreatorLeftTopY();

63
designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnAdvancedPane.java

@ -1,16 +1,14 @@
package com.fr.design.dscolumn;
import com.fr.base.BaseFormula;
import com.fr.data.util.SortOrder;
import com.fr.design.border.UITitledBorder;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.formula.CustomVariableResolver;
import com.fr.design.formula.FormulaFactory;
import com.fr.design.formula.SortFormulaPane;
import com.fr.design.formula.UIFormula;
import com.fr.design.gui.frpane.AbstractAttrNoScrollPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox;
@ -30,11 +28,19 @@ import com.fr.report.cell.cellattr.CellExpandAttr;
import com.fr.report.cell.cellattr.core.group.DSColumn;
import com.fr.report.cell.cellattr.core.group.SelectCount;
import javax.swing.*;
import java.awt.*;
import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.SwingUtilities;
import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Arrays;
import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.BOTTOM;
import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.SPECIFY;
@ -512,11 +518,12 @@ public class DSColumnAdvancedPane extends BasicPane {
}
}
public static class FormatAttrPane extends TextFormatPane {
public static class ReLayoutTextFormatPane extends TextFormatPane {
protected void initLayout() {
JComponent[][] components = new JComponent[][]{{typeComboBox, textField, roundingBox}};
double[] rowSize = new double[]{TableLayout.FILL};
JComponent[][] components = new JComponent[][] { {typeComboBox, textField, roundingBox} };
double[] rowSize = new double[] { TableLayout.FILL };
double[] columnSize = {TableLayout.PREFERRED, 200, TableLayout.PREFERRED};
JPanel settingPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 4, 0);
@ -542,6 +549,44 @@ public class DSColumnAdvancedPane extends BasicPane {
}
}
public static class FormatAttrPane extends AbstractAttrNoScrollPane {
private TextFormatPane formatPane;
@Override
protected JPanel createContentPane() {
this.formatPane = new ReLayoutTextFormatPane();
return this.formatPane;
}
@Override
public Dimension getPreferredSize() {
if (formatPane == null) {
return super.getPreferredSize();
}
return formatPane.getPreferredSize();
}
protected void initContentPane() {
leftContentPane = createContentPane();
if (leftContentPane != null) {
leftContentPane.setBorder(BorderFactory.createEmptyBorder());
this.add(leftContentPane, BorderLayout.CENTER);
}
}
public void populate(CellElement cellElement) {
if (cellElement != null && formatPane != null) {
formatPane.populateBean(cellElement.getStyle());
}
}
public void update(CellElement cellElement) {
if (cellElement != null && formatPane != null) {
cellElement.setStyle(formatPane.update(cellElement.getStyle()));
}
}
}
private void checkButtonEnabled() {
if (useMultiplyNumCheckBox.isSelected()) {
multiNumSpinner.setEnabled(true);

1
designer-realize/src/main/java/com/fr/design/webattr/WriteToolBarPane.java

@ -161,6 +161,7 @@ public class WriteToolBarPane extends AbstractEditToolBarPane {
colorButton.setColor(webWrite.getSelectedColor());
} else {
colorBox.setSelected(false);
colorButton.setEnabled(false);
}
if (webWrite.getSheetPosition() == Constants.TOP) {

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

@ -109,6 +109,7 @@ public class WriteWebSettingPane extends WebSettingPane<WebWrite> {
protected void setDefault() {
super.setDefault();
colorBox.setSelected(false);
colorButton.setEnabled(false);
bottomRadioButton.setSelected(true);
leftRadioButton.setSelected(true);
unloadCheck.setSelected(true);
@ -126,6 +127,7 @@ public class WriteWebSettingPane extends WebSettingPane<WebWrite> {
colorButton.setColor(webWrite.getSelectedColor());
} else {
colorBox.setSelected(false);
colorButton.setEnabled(false);
}
if (webWrite.getSheetPosition() == Constants.TOP) {

31
designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellDSColumnEditor.java

@ -282,7 +282,7 @@ public class CellDSColumnEditor extends CellQuickEditor {
private void initComponents(){
dataPane = new SelectedDataColumnPane(true, true);
groupPane = new ResultSetGroupDockingPane();
initListener();
double[] rowSize = {P}, columnSize = {60, F};
UILabel uiLabel = FRWidgetFactory.createLineWrapLabel(Toolkit.i18nText("Fine-Design_Report_Filter_Conditions"));
condition = new DSColumnConditionAction();
@ -299,6 +299,35 @@ public class CellDSColumnEditor extends CellQuickEditor {
conditionPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP);
this.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
}
private void initListener() {
dataPane.setListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
dataPane.update(cellElement);
fireTargetModified();
}
}
});
groupPane.setListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
if (e == null) {
//分组-高级-自定义点确定的时候传进来null的e,但是这时候应该触发保存
groupPane.update();
fireTargetModified();
return;
}
if (e.getStateChange() == ItemEvent.DESELECTED) {
groupPane.update();
fireTargetModified();
}
}
});
}
@Override
protected AttributeChangeListener getAttributeChangeListener() {
return new AttributeChangeListener() {

Loading…
Cancel
Save