Browse Source

Merge branch 'final/11.0' of ssh://code.fineres.com:7999/~fanglei/design into final/11.0

* 'final/11.0' of ssh://code.fineres.com:7999/~fanglei/design:
  REPORT-68127 【专题】jdk11的设计器用bat脚本启动失败,exe启动正常
  REPORT-68062 单元格数据列高级设置-格式设置不生效
new-design
方磊 3 years ago
parent
commit
e538a18d39
  1. 19
      designer-base/src/main/java/com/fr/design/startup/Install4jStartupNotificationProvider.java
  2. 63
      designer-realize/src/main/java/com/fr/design/dscolumn/DSColumnAdvancedPane.java

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

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

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

@ -1,16 +1,14 @@
package com.fr.design.dscolumn; package com.fr.design.dscolumn;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.data.util.SortOrder;
import com.fr.design.border.UITitledBorder; import com.fr.design.border.UITitledBorder;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.DesignTableDataManager;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.formula.CustomVariableResolver; import com.fr.design.formula.CustomVariableResolver;
import com.fr.design.formula.FormulaFactory; import com.fr.design.formula.FormulaFactory;
import com.fr.design.formula.SortFormulaPane;
import com.fr.design.formula.UIFormula; 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.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.icombobox.UIComboBox; 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.DSColumn;
import com.fr.report.cell.cellattr.core.group.SelectCount; import com.fr.report.cell.cellattr.core.group.SelectCount;
import javax.swing.*; import javax.swing.BorderFactory;
import java.awt.*; 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.ActionEvent;
import java.awt.event.ActionListener; 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.BOTTOM;
import static com.fr.report.cell.cellattr.core.group.FilterTypeEnum.SPECIFY; 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() { protected void initLayout() {
JComponent[][] components = new JComponent[][]{{typeComboBox, textField, roundingBox}}; JComponent[][] components = new JComponent[][] { {typeComboBox, textField, roundingBox} };
double[] rowSize = new double[]{TableLayout.FILL}; double[] rowSize = new double[] { TableLayout.FILL };
double[] columnSize = {TableLayout.PREFERRED, 200, TableLayout.PREFERRED}; double[] columnSize = {TableLayout.PREFERRED, 200, TableLayout.PREFERRED};
JPanel settingPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 4, 0); 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() { private void checkButtonEnabled() {
if (useMultiplyNumCheckBox.isSelected()) { if (useMultiplyNumCheckBox.isSelected()) {
multiNumSpinner.setEnabled(true); multiNumSpinner.setEnabled(true);

Loading…
Cancel
Save