Browse Source

Merge pull request #8244 in DESIGN/design from release/11.0 to final/11.0

* commit '51558d540d72d6673c1f3149cc9d61d722d31efc':
  REPORT-67833 富文本-颜色设置:选择主题色后最近使用的颜色处不会更新,需要多次点击
  REPORT-67954 远程设计时数据集面板数据连接空白的问题 提交11
  REPORT-67329 填报-web端预览-10升级11,透明的纸张背景变成了白色
  无JIRA项目 对Install4j方法的调用全部改用反射实现,避免出现引用异常
  REPORT-67224 填报-web端再计算-服务器配置填报行背景色报错
  REPORT-65140 报表块图表块在设计器上改变大小的时候,保存在 xml 里面的 elementcaseEdito 的尺寸依然是初始尺寸
  REPORT-66771 FR11老决策报表-参数面板控件坐标超过960且设计画布里可以看到该控件时,老预览下看不到该控件,新预览下可以看到 1、在修改布局的时候,同时修改参数面板的width
  REPORT-67092 交互视觉修改
  REPORT-66690 tab块名称不允许重复
new-design
superman 3 years ago
parent
commit
5968103606
  1. 14
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java
  2. 2
      designer-base/src/main/java/com/fr/design/gui/style/ReportBackgroundSpecialPane.java
  3. 9
      designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java
  4. 42
      designer-base/src/main/java/com/fr/design/startup/Install4jStartupNotificationProvider.java
  5. 4
      designer-base/src/main/java/com/fr/design/style/color/ColorCell.java
  6. 13
      designer-base/src/main/java/com/fr/design/style/color/NewColorSelectBox.java
  7. 7
      designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java
  8. 12
      designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java
  9. 4
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardTagLayout.java
  10. 1
      designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java
  11. 3
      designer-realize/src/main/java/com/fr/design/webattr/WriteWebSettingPane.java

14
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java

@ -10,11 +10,10 @@ import com.fr.design.editlock.EditLockUtils;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UILockButton;
import com.fr.file.ConnectionConfig;
import com.fr.general.ComparatorUtils;
import com.fr.report.LockItem;
import com.fr.stable.StringUtils;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.connection.DBConnectAuth;
import com.fr.report.LockItem;
import javax.swing.SwingUtilities;
import java.awt.Dimension;
@ -96,6 +95,7 @@ public class ConnectionComboBoxPanel extends ItemEditableComboBoxPanel {
continue;
}
Connection connection = mgr.getConnection(conName);
// nameList依赖items方法初始化,父类ItemEditableComboBoxPanel里异步执行item方法
filterConnection(connection, conName, nameList);
}
@ -140,12 +140,10 @@ public class ConnectionComboBoxPanel extends ItemEditableComboBoxPanel {
} else {
String s = DesignerEnvManager.getEnvManager().getRecentSelectedConnection();
if (StringUtils.isNotBlank(s)) {
for (int i = 0; i < this.getConnectionSize(); i++) {
String t = this.getConnection(i);
if (ComparatorUtils.equals(s, t)) {
this.setSelectedItem(s);
break;
}
// 之前的写法有多线程问题,nameList异步尚未初始化完成的时候,这里可能无法匹配设置数据连接名称,导致DBTableDataPane打开后连接面板空白
// 这里的需求无非是设置上一次使用的数据连接,做个简单检查这个连接是否存在即可,存在就设置
if (ConnectionConfig.getInstance().getConnection(s) != null) {
this.setSelectedItem(s);
}
}
// alex:如果这个ComboBox还是没有选中,那么选中第一个

2
designer-base/src/main/java/com/fr/design/gui/style/ReportBackgroundSpecialPane.java

@ -29,7 +29,7 @@ public class ReportBackgroundSpecialPane extends BackgroundPane {
protected BackgroundQuickPane[] supportKindsOfBackgroundUI() {
NullBackgroundQuickPane nullBackgroundPane = new NullBackgroundQuickPane();
ColorBackgroundQuickPane colorBackgroundPane = new ColorBackgroundQuickPane();
ColorBackgroundQuickPane colorBackgroundPane = new ColorBackgroundQuickPane(true);
colorBackgroundPane.registerChangeListener(new UIObserverListener() {
@Override
public void doChange() {

9
designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ColorBackgroundQuickPane.java

@ -16,10 +16,9 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane {
private NewColorSelectBox colorSelectBox;
public ColorBackgroundQuickPane() {
public ColorBackgroundQuickPane(boolean supportTransparent) {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
colorSelectBox = new NewColorSelectBox(100) {
colorSelectBox = new NewColorSelectBox(100, supportTransparent) {
@Override
public boolean shouldResponseChangeListener() {
// ColorBackgroundQuickPane注册监听器ChangeListenerImpl的逻辑不能丢,因为里面有修改字段backgroundChange的逻辑.
@ -33,6 +32,10 @@ public class ColorBackgroundQuickPane extends BackgroundQuickPane {
this.add(colorSelectBox, BorderLayout.NORTH);
}
public ColorBackgroundQuickPane() {
this(false);
}
public void populateBean(Background background) {
ColorBackground colorBackgroud = (ColorBackground) background;
populateColor(colorBackgroud.getColor());

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

@ -1,6 +1,10 @@
package com.fr.design.startup;
import com.install4j.api.launcher.StartupNotification;
import com.fr.invoke.Reflect;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
/**
* @author Starryi
@ -18,18 +22,30 @@ public class Install4jStartupNotificationProvider implements FineStartupNotifica
@Override
public void registerStartupListener(Listener listener) {
boolean supported = false;
try {
supported = Class.forName("com.install4j.api.launcher.StartupNotification") != null;
} catch (Throwable ignored) {}
if (supported) {
StartupNotification.registerStartupListener(new StartupNotification.Listener() {
@Override
public void startupPerformed(String parameters) {
listener.startupPerformed(parameters);
}
});
Class<?> StartupNotificationListenerClass = Reflect.on("com.install4j.api.launcher.StartupNotification$Listener").type();
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);
}
private static class ListenerHandler implements InvocationHandler {
private final Listener listener;
public ListenerHandler(Listener listener) {
this.listener = listener;
}
@Override
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
if (args[0] instanceof String) {
String parameters = (String) args[0];
listener.startupPerformed(parameters);
}
return null;
}
}
}

4
designer-base/src/main/java/com/fr/design/style/color/ColorCell.java

@ -100,11 +100,13 @@ public class ColorCell extends JComponent implements ColorSelectable {
if (e == null || e.getID() == MouseEvent.MOUSE_RELEASED) {
colorSelectable.setColor(this.getColor());
colorSelectable.colorSetted(this);
// 先添加最近使用
if (this.getColor() != null) {
int rgb = this.getColor().getRGB();
DesignerEnvManager.getEnvManager().getColorConfigManager().addToColorQueue(new Color(rgb));
}
// 这边会获取到最近使用颜色并更新 添加逻辑需要放到前面 否则不会及时更新
colorSelectable.colorSetted(this);
}
if (e != null) {

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

@ -20,13 +20,20 @@ public class NewColorSelectBox extends AbstractSelectBox<Color> implements UIObs
private static final long serialVersionUID = 2782150678943960557L;
private Color color;
private NewColorSelectPane colorPane = new NewColorSelectPane(false);
private NewColorSelectPane colorPane;
private UIObserverListener uiObserverListener;
private String newColorSelectBoxName = "";
private GlobalNameListener globalNameListener = null;
private boolean supportTransparent;
public NewColorSelectBox(int preferredWidth) {
initBox(preferredWidth);
this(preferredWidth, false);
}
public NewColorSelectBox(int preferredWidth, boolean supportTransparent) {
this.colorPane = new NewColorSelectPane(supportTransparent);
this.supportTransparent = supportTransparent;
initBox(preferredWidth);
iniListener();
}
@ -58,7 +65,7 @@ public class NewColorSelectBox extends AbstractSelectBox<Color> implements UIObs
*/
public JPanel initWindowPane(double preferredWidth) {
// 下拉的时候重新生成面板,以刷新最近使用颜色
colorPane = new NewColorSelectPane(false);
colorPane = new NewColorSelectPane(this.supportTransparent);
colorPane.setColor(this.getSelectObject());
colorPane.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {

7
designer-form/src/main/java/com/fr/design/designer/creator/XWFitLayout.java

@ -764,6 +764,7 @@ public class XWFitLayout extends XLayoutContainer {
creator.setBackupBound(creator.getBounds());
}
}
LayoutUtils.layoutContainer(this);
}
private Rectangle recalculateWidgetBounds(Rectangle rec, int[] hors, int[] veris) {
@ -831,11 +832,7 @@ public class XWFitLayout extends XLayoutContainer {
this.remove(oldCreator);
this.add(newCreator);
dealDirections(newCreator, false);
//对于新增的绝对布局的组件,需要更新下内部组件的大小
if (newCreator.acceptType(XWAbsoluteLayout.class)){
((XWAbsoluteLayout) newCreator).updateBoundsWidget();
newCreator.setBackupBound(newCreator.getBounds());
}
this.updateBoundsWidget();
isRefreshing = false;
LayoutUtils.layoutContainer(this);
}

12
designer-form/src/main/java/com/fr/design/designer/creator/XWParameterLayout.java

@ -270,4 +270,16 @@ public class XWParameterLayout extends XWAbsoluteLayout {
public boolean isTopable() {
return false;
}
/**
* 修改form布局的宽度时需要同时修改表单参数界面的布局的宽度
* */
@Override
public void doLayout() {
layout();
if (data != null && data instanceof WParameterLayout) {
((WParameterLayout) data).setDesignWidth(getWidth());
}
}
}

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

@ -8,6 +8,7 @@ import com.fr.base.ScreenResolution;
import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.LayoutAdapter;
import com.fr.design.designer.beans.adapters.layout.FRWCardTagLayoutAdapter;
import com.fr.design.designer.beans.models.ModelUtil;
import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XCreatorUtils;
@ -136,6 +137,9 @@ public class XWCardTagLayout extends XWHorizontalBoxLayout {
WTabFitLayout fitLayout = new WTabFitLayout(widgetName, tabFitIndex, currentCard);
fitLayout.setTabNameIndex(getTabNameIndex());
XWTabFitLayout tabFitLayout = new XWTabFitLayout(fitLayout, new Dimension());
FormDesigner formDesigner = WidgetPropertyPane.getInstance().getEditingFormDesigner();
ModelUtil.renameWidgetName(formDesigner.getTarget(), tabFitLayout);
WCardTagLayout layout = (WCardTagLayout) this.toData();
if(!ComparatorUtils.equals(layout.getTemplateStyle().getStyle(), DefaultTemplateStyle.DEFAULT_TEMPLATE_STYLE)){

1
designer-form/src/main/java/com/fr/design/widget/ui/designer/layout/FRFitLayoutDefinePane.java

@ -71,6 +71,7 @@ public class FRFitLayoutDefinePane extends AbstractFRLayoutDefinePane<WFitLayout
280, 20,
createLayoutPane()
);
layoutExpandablePane.setBorder(BorderFactory.createEmptyBorder(0,0,10,0));
this.add(layoutExpandablePane, BorderLayout.NORTH);
JPanel advancePane = createAdvancePane();

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

@ -4,6 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.gui.core.WidgetOption;
import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UINoThemeColorButton;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
@ -44,7 +45,7 @@ public class WriteWebSettingPane extends WebSettingPane<WebWrite> {
protected JPanel createOtherSetPane() {
colorBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set_Background_Of_Current_Row") + ":");
colorBox.setSelected(true);
colorButton = new UIColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/background.png"));
colorButton = new UINoThemeColorButton(BaseUtils.readIcon("/com/fr/design/images/gui/color/background.png"));
colorBox.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
colorButton.setEnabled(colorBox.isSelected());

Loading…
Cancel
Save