Browse Source

Pull request #4771: REPORT-54349 设计器打开模板的启动画面显示中文

Merge in DESIGN/design from ~HADES/design:bugfix/10.0 to bugfix/10.0

* commit '25098619e436695d680741b1b0a37442a4acc93b':
  REPORT-54349 设计器打开模板的启动画面显示中文
  REPORT-54349 设计器打开模板的启动画面显示中文
bugfix/10.0
Hades 3 years ago
parent
commit
eb8419b740
  1. 15
      designer-base/src/main/java/com/fr/design/mainframe/OpenLoadingPane.java
  2. BIN
      designer-base/src/main/resources/com/fr/design/images/mainframe/openloading.png

15
designer-base/src/main/java/com/fr/design/mainframe/OpenLoadingPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.general.IOUtils;
import java.awt.Color;
import java.awt.Component;
@ -17,9 +18,13 @@ import javax.swing.JPanel;
*/
public class OpenLoadingPane extends JPanel {
private static final ImageIcon LOADING_ICON = new ImageIcon(IOUtils.readImage("/com/fr/design/images/mainframe/loading.gif"));
private static final ImageIcon LOADING_ICON = new ImageIcon(IOUtils.readImage("/com/fr/design/images/mainframe/openloading.png"));
private static final Color TIP_COLOR = new Color(108, 174, 235);
private static final int Y_GAP = 50;
private static final int X_GAP = 10;
private UILabel loadingLabel;
private UILabel tipLabel;
public OpenLoadingPane() {
@ -47,7 +52,12 @@ public class OpenLoadingPane extends JPanel {
int loadingLabelHeight = loadingLabel.getPreferredSize().height;
int loadingLabelX = (width - loadingLabelWidth) / 2;
int loadingLabelY = (height - loadingLabelHeight) / 2;
int tipLabelWidth = tipLabel.getPreferredSize().width;
int tipLabelHeight = tipLabel.getPreferredSize().height;
int tipLabelX = (width - tipLabelWidth) / 2 + X_GAP;
int tipLabelY = loadingLabelY + loadingLabelHeight - Y_GAP;
loadingLabel.setBounds(loadingLabelX, loadingLabelY, loadingLabelWidth, loadingLabelHeight);
tipLabel.setBounds(tipLabelX, tipLabelY, tipLabelWidth, tipLabelHeight);
}
@Override
@ -56,7 +66,10 @@ public class OpenLoadingPane extends JPanel {
});
setBackground(Color.WHITE);
loadingLabel = new UILabel(LOADING_ICON);
tipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Open_Template_Loading"));
tipLabel.setForeground(TIP_COLOR);
add(loadingLabel);
add(tipLabel);
}
}

BIN
designer-base/src/main/resources/com/fr/design/images/mainframe/openloading.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Loading…
Cancel
Save