Browse Source

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

* commit '3758545817cc81e5105061aa508960d646ca2d4e':
  REPORT-68062 单元格数据列高级设置-格式设置不生效
  REPORT-68062 单元格数据列高级设置-格式设置不生效
  REPORT-68555 【视觉验收】新建画布/加载动画
feature/x
superman 3 years ago
parent
commit
fa8ed24916
  1. 40
      designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java
  2. 1
      designer-realize/src/main/java/com/fr/grid/Grid.java

40
designer-base/src/main/java/com/fr/design/gui/iprogressbar/ProgressDialog.java

@ -5,7 +5,6 @@ import com.fr.design.dialog.UIDialog;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.os.impl.SupportOSImpl; import com.fr.design.os.impl.SupportOSImpl;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.stable.os.support.OSBasedAction; import com.fr.stable.os.support.OSBasedAction;
import com.fr.stable.os.support.OSSupportCenter; import com.fr.stable.os.support.OSSupportCenter;
@ -23,9 +22,15 @@ import java.awt.Frame;
* 加载进度弹窗 * 加载进度弹窗
*/ */
public class ProgressDialog extends UIDialog { public class ProgressDialog extends UIDialog {
private JProgressBar progressBar; protected static final FRFont font = DesignUtils
.getDefaultGUIFont()
.applySize(14)
.applyForeground(new ColorUIResource(333334));
protected JProgressBar progressBar;
private JDialog centerDialog; private JDialog centerDialog;
private JLabel text; protected JLabel text;
protected JPanel progressPanel;
public ProgressDialog(Frame parent) { public ProgressDialog(Frame parent) {
super(parent); super(parent);
@ -42,30 +47,37 @@ public class ProgressDialog extends UIDialog {
} }
private void initComponent(Frame parent) { private void initComponent(Frame parent) {
initProgressBar();
initProgressPanel();
initCenterDialog(parent);
}
protected void initCenterDialog(Frame parent) {
centerDialog = new JDialog(this); centerDialog = new JDialog(this);
centerDialog.setSize(new Dimension(482, 124)); centerDialog.setSize(new Dimension(482, 124));
centerDialog.setUndecorated(true); centerDialog.setUndecorated(true);
centerDialog.setLocationRelativeTo(parent); centerDialog.setLocationRelativeTo(parent);
JPanel panel = new JPanel(); centerDialog.getContentPane().add(progressPanel);
panel.setBorder(new UIProgressBorder(3, UIConstants.DEFAULT_BG_RULER, 14, 46, 47, 37, 47)); }
panel.setLayout(new BorderLayout(4, 15));
protected void initProgressBar() {
progressBar = new JProgressBar(); progressBar = new JProgressBar();
progressBar.setUI(new ModernUIProgressBarUI()); progressBar.setUI(new ModernUIProgressBarUI());
progressBar.setBorderPainted(false); progressBar.setBorderPainted(false);
progressBar.setOpaque(false); progressBar.setOpaque(false);
progressBar.setBorder(null); progressBar.setBorder(null);
progressBar.setMaximum(1000); progressBar.setMaximum(1000);
panel.add(progressBar, BorderLayout.CENTER); }
protected void initProgressPanel() {
progressPanel = new JPanel();
progressPanel.setBorder(new UIProgressBorder(3, UIConstants.DEFAULT_BG_RULER, 14, 46, 47, 37, 47));
progressPanel.setLayout(new BorderLayout(4, 15));
progressPanel.add(progressBar, BorderLayout.CENTER);
text = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Loading_Project"), JLabel.CENTER); text = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Loading_Project"), JLabel.CENTER);
FRFont font = DesignUtils
.getDefaultGUIFont()
.applySize(14)
.applyForeground(new ColorUIResource(333334));
text.setFont(font); text.setFont(font);
panel.add(text, BorderLayout.SOUTH); progressPanel.add(text, BorderLayout.SOUTH);
panel.setVisible(true); progressPanel.setVisible(true);
centerDialog.getContentPane().add(panel);
} }
@Override @Override

1
designer-realize/src/main/java/com/fr/grid/Grid.java

@ -1095,6 +1095,7 @@ public class Grid extends BaseGridComponent {
TemplateCellElement cellElement = (TemplateCellElement) newValue; TemplateCellElement cellElement = (TemplateCellElement) newValue;
editingCellElement.setValue(cellElement.getValue()); editingCellElement.setValue(cellElement.getValue());
editingCellElement.setCellExpandAttr(cellElement.getCellExpandAttr()); editingCellElement.setCellExpandAttr(cellElement.getCellExpandAttr());
editingCellElement.setStyle(cellElement.getStyle());
return true; return true;
} else if (newValue instanceof CellImage) { } else if (newValue instanceof CellImage) {
CellImage cellImage = (CellImage) newValue; CellImage cellImage = (CellImage) newValue;

Loading…
Cancel
Save