Browse Source

Merge pull request #1879 in DESIGN/design from bugfix/10.0 to feature/10.0

* commit '769687e71fb0ca6e55889961d55668d28310c10a':
  REPORT-35690 国际化-填报快捷键设置页面展示不全
  CHART-14689 切换按钮换行不限制高度
  REPORT-35688 国际化-预定义样式,显示不全
  REPORT-34954 在富文本设置中,未选中数据时直接点击上下标仍然可以同时设置(提错了,之前提到了release)
  REPORT-34878 && REPORT-34936 linux下条件属性和超链保存问题
  CHART-14689  预定义配色按钮样式修改
research/11.0
superman 4 years ago
parent
commit
5fc5230328
  1. 2
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java
  2. 51
      designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java
  3. 12
      designer-realize/src/main/java/com/fr/design/actions/report/ReportWriteAttrAction.java
  4. 5
      designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java

2
designer-base/src/main/java/com/fr/design/gui/controlpane/UIListControlPane.java

@ -219,7 +219,7 @@ public abstract class UIListControlPane extends UIControlPane implements ListCon
} }
popupEditDialog.setVisible(true); popupEditDialog.setVisible(true);
PopupDialogSaveAction osBasedAction = OSSupportCenter.getAction(PopupDialogSaveAction.class); PopupDialogSaveAction osBasedAction = OSSupportCenter.getAction(PopupDialogSaveAction.class);
osBasedAction.execute(this, popupEditDialog); osBasedAction.register(this, popupEditDialog);
} }
} }

51
designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java

@ -2,14 +2,16 @@ package com.fr.design.module;
import com.fr.base.ChartColorMatching; import com.fr.base.ChartColorMatching;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper; import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.style.ChartColorAdjustPane; import com.fr.design.mainframe.chart.gui.style.ChartColorAdjustPane;
import com.fr.design.style.background.gradient.FixedGradientBar; import com.fr.design.style.background.gradient.FixedGradientBar;
import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
@ -19,7 +21,6 @@ import java.awt.CardLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
@ -35,8 +36,7 @@ public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
private JPanel changeColorSetPane; private JPanel changeColorSetPane;
private CardLayout cardLayout; private CardLayout cardLayout;
private UIButton accButton; private UIButtonGroup groupButton;
private UIButton gradientButton;
private ChartColorAdjustPane colorAdjustPane; private ChartColorAdjustPane colorAdjustPane;
private FixedGradientBar colorGradient; private FixedGradientBar colorGradient;
@ -52,22 +52,19 @@ public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
JPanel customPane = new JPanel(FRGUIPaneFactory.createBorderLayout()); JPanel customPane = new JPanel(FRGUIPaneFactory.createBorderLayout());
JPanel buttonPane = new JPanel(); groupButton = new UIButtonGroup<>(new String[]{Toolkit.i18nText("Fine-Design_Chart_Custom_Color"), Toolkit.i18nText("Fine-Design_Chart_Gradient_Color")});
buttonPane.setLayout(new FlowLayout(FlowLayout.LEFT)); groupButton.setSelectedIndex(0);
buttonPane.add(accButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Custom_Color"))); customPane.add(groupButton, BorderLayout.NORTH);
buttonPane.add(gradientButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Gradient_Color")));
customPane.add(buttonPane, BorderLayout.NORTH);
changeColorSetPane = new JPanel(cardLayout = new CardLayout()); changeColorSetPane = new JPanel(cardLayout = new CardLayout());
changeColorSetPane.add(colorGradient = new FixedGradientBar(4, 130), "gradient"); changeColorSetPane.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
changeColorSetPane.add(colorGradient = new FixedGradientBar(4, 150), "gradient");
changeColorSetPane.add(colorAdjustPane = new ChartColorAdjustPane(), "acc"); changeColorSetPane.add(colorAdjustPane = new ChartColorAdjustPane(), "acc");
cardLayout.show(changeColorSetPane, "acc"); cardLayout.show(changeColorSetPane, "acc");
customPane.add(changeColorSetPane, BorderLayout.CENTER); customPane.add(changeColorSetPane, BorderLayout.CENTER);
accButton.setSelected(true); customPane.setPreferredSize(new Dimension(155, 300));
colorGradient.setPreferredSize(new Dimension(155, 30));
customPane.setPreferredSize(new Dimension(200, 200));
colorGradient.setPreferredSize(new Dimension(120, 30));
colorGradient.getSelectColorPointBtnP1().setColorInner(Color.WHITE); colorGradient.getSelectColorPointBtnP1().setColorInner(Color.WHITE);
colorGradient.getSelectColorPointBtnP2().setColorInner(FixedGradientBar.NEW_CHARACTER); colorGradient.getSelectColorPointBtnP2().setColorInner(FixedGradientBar.NEW_CHARACTER);
@ -84,24 +81,20 @@ public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
} }
private void initListener() { private void initListener() {
groupButton.addActionListener(new ActionListener() {
accButton.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
accButton.setSelected(true); checkCardPane();
gradientButton.setSelected(false);
cardLayout.show(changeColorSetPane, "acc");
} }
}); });
}
gradientButton.addActionListener(new ActionListener() { private void checkCardPane() {
@Override if (groupButton.getSelectedIndex() == 0) {
public void actionPerformed(ActionEvent e) { cardLayout.show(changeColorSetPane, "acc");
gradientButton.setSelected(true); } else {
accButton.setSelected(false);
cardLayout.show(changeColorSetPane, "gradient"); cardLayout.show(changeColorSetPane, "gradient");
} }
});
} }
@Override @Override
@ -117,8 +110,7 @@ public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
boolean isGradient = condition.getGradient(); boolean isGradient = condition.getGradient();
List<Color> colorList = condition.getColorList(); List<Color> colorList = condition.getColorList();
if (isGradient) { if (isGradient) {
gradientButton.setSelected(true); groupButton.setSelectedIndex(1);
accButton.setSelected(false);
cardLayout.show(changeColorSetPane, "gradient"); cardLayout.show(changeColorSetPane, "gradient");
if (colorList.size() == 2) { if (colorList.size() == 2) {
@ -127,8 +119,7 @@ public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
colorGradient.repaint(); colorGradient.repaint();
} }
} else { } else {
accButton.setSelected(true); groupButton.setSelectedIndex(0);
gradientButton.setSelected(false);
cardLayout.show(changeColorSetPane, "acc"); cardLayout.show(changeColorSetPane, "acc");
if (colorList.isEmpty()) { if (colorList.isEmpty()) {
@ -148,7 +139,7 @@ public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
List<Color> colorList = new ArrayList<Color>(); List<Color> colorList = new ArrayList<Color>();
if (gradientButton.isSelected()) { if (groupButton.getSelectedIndex() == 1) {
chartColorMatching.setGradient(true); chartColorMatching.setGradient(true);
Color start = colorGradient.getSelectColorPointBtnP1().getColorInner(); Color start = colorGradient.getSelectColorPointBtnP1().getColorInner();

12
designer-realize/src/main/java/com/fr/design/actions/report/ReportWriteAttrAction.java

@ -3,6 +3,7 @@ package com.fr.design.actions.report;
import com.fr.design.actions.ReportComponentAction; import com.fr.design.actions.ReportComponentAction;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.dialog.DialogActionListener;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.WorkSheetDesigner; import com.fr.design.mainframe.WorkSheetDesigner;
@ -11,10 +12,15 @@ import com.fr.design.webattr.ReportWriteAttrPane;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.report.worksheet.WorkSheet; import com.fr.report.worksheet.WorkSheet;
import java.awt.Dimension;
/** /**
* ReportWriteAttrAction * ReportWriteAttrAction
*/ */
public class ReportWriteAttrAction extends ReportComponentAction<WorkSheetDesigner> { public class ReportWriteAttrAction extends ReportComponentAction<WorkSheetDesigner> {
public static final Dimension WINDOW_CUSTOM_SIZE = new Dimension(720, 600);
public ReportWriteAttrAction(WorkSheetDesigner t) { public ReportWriteAttrAction(WorkSheetDesigner t) {
super(t); super(t);
this.setMenuKeySet(KeySetUtils.REPORT_WRITE); this.setMenuKeySet(KeySetUtils.REPORT_WRITE);
@ -49,7 +55,7 @@ public class ReportWriteAttrAction extends ReportComponentAction<WorkSheetDesign
} }
}; };
BasicDialog dialog = reportWritePane.showWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { DialogActionListener dialogActionListener = new DialogActionAdapter() {
@Override @Override
public void doOk() { public void doOk() {
isChange = true; isChange = true;
@ -67,7 +73,9 @@ public class ReportWriteAttrAction extends ReportComponentAction<WorkSheetDesign
public void doCancel() { public void doCancel() {
isChange = false; isChange = false;
} }
}); };
BasicDialog dialog = reportWritePane.showWindowWithCustomSize(DesignerContext.getDesignerFrame(), dialogActionListener, WINDOW_CUSTOM_SIZE);
DesignerContext.setReportWritePane(dialog); DesignerContext.setReportWritePane(dialog);
dialog.setVisible(true); dialog.setVisible(true);

5
designer-realize/src/main/java/com/fr/design/actions/server/StyleListAction.java

@ -17,6 +17,7 @@ import com.fr.transaction.WorkerCallBack;
import com.fr.transaction.WorkerFacade; import com.fr.transaction.WorkerFacade;
import javax.swing.*; import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -24,6 +25,8 @@ import java.awt.event.ActionEvent;
* StyleList Action * StyleList Action
*/ */
public class StyleListAction extends UpdateAction { public class StyleListAction extends UpdateAction {
public static final Dimension WINDOW_CUSTOM_SIZE = new Dimension(710, 600);
public StyleListAction() { public StyleListAction() {
this.setMenuKeySet(PREDEFINED_STYLES); this.setMenuKeySet(PREDEFINED_STYLES);
this.setName(getMenuKeySet().getMenuKeySetName() + "..."); this.setName(getMenuKeySet().getMenuKeySetName() + "...");
@ -40,7 +43,7 @@ public class StyleListAction extends UpdateAction {
public void actionPerformed(ActionEvent evt) { public void actionPerformed(ActionEvent evt) {
DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); DesignerFrame designerFrame = DesignerContext.getDesignerFrame();
final StyleManagerPane styleListPane = new StyleManagerPane(); final StyleManagerPane styleListPane = new StyleManagerPane();
final BasicDialog styleListDialog = styleListPane.showWindow(designerFrame); final BasicDialog styleListDialog = styleListPane.showWindowWithCustomSize(designerFrame, null, WINDOW_CUSTOM_SIZE);
styleListDialog.addDialogActionListener(new DialogActionAdapter() { styleListDialog.addDialogActionListener(new DialogActionAdapter() {
@Override @Override
public void doOk() { public void doOk() {

Loading…
Cancel
Save