|
|
@ -1,35 +1,29 @@ |
|
|
|
package com.fr.design.mainframe; |
|
|
|
package com.fr.design.utils; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
import com.fr.general.IOUtils; |
|
|
|
import com.fr.general.IOUtils; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.ImageIcon; |
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
import java.awt.Color; |
|
|
|
import java.awt.Color; |
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Component; |
|
|
|
import java.awt.Container; |
|
|
|
import java.awt.Container; |
|
|
|
import java.awt.Dimension; |
|
|
|
import java.awt.Dimension; |
|
|
|
import java.awt.LayoutManager; |
|
|
|
import java.awt.LayoutManager; |
|
|
|
import javax.swing.ImageIcon; |
|
|
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @author hades |
|
|
|
|
|
|
|
* @version 10.0 |
|
|
|
|
|
|
|
* Created by hades on 2021/4/9 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public class OpenLoadingPane extends JPanel { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final ImageIcon LOADING_ICON = new ImageIcon(IOUtils.readImage("/com/fr/design/images/mainframe/openloading.png")); |
|
|
|
public class LoadingUtils { |
|
|
|
|
|
|
|
private static final ImageIcon LOADING_ICON = new ImageIcon(IOUtils.readImage("/com/fr/design/images/mainframe/loading.png")); |
|
|
|
private static final Color TIP_COLOR = new Color(108, 174, 235); |
|
|
|
private static final Color TIP_COLOR = new Color(108, 174, 235); |
|
|
|
private static final int Y_GAP = 50; |
|
|
|
private static final int Y_GAP = 50; |
|
|
|
private static final int X_GAP = 10; |
|
|
|
private static final int X_GAP = 10; |
|
|
|
|
|
|
|
|
|
|
|
private UILabel loadingLabel; |
|
|
|
public static JPanel createLoadingPane() { |
|
|
|
private UILabel tipLabel; |
|
|
|
JPanel jPanel = new JPanel(); |
|
|
|
|
|
|
|
UILabel loadingLabel = new UILabel(LOADING_ICON); |
|
|
|
public OpenLoadingPane() { |
|
|
|
UILabel tipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Loading")); |
|
|
|
|
|
|
|
tipLabel.setForeground(TIP_COLOR); |
|
|
|
setLayout(new LayoutManager() { |
|
|
|
jPanel.setLayout(new LayoutManager() { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void removeLayoutComponent(Component comp) { |
|
|
|
public void removeLayoutComponent(Component comp) { |
|
|
|
} |
|
|
|
} |
|
|
@ -64,12 +58,10 @@ public class OpenLoadingPane extends JPanel { |
|
|
|
public void addLayoutComponent(String name, Component comp) { |
|
|
|
public void addLayoutComponent(String name, Component comp) { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
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); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jPanel.setBackground(Color.WHITE); |
|
|
|
|
|
|
|
jPanel.add(loadingLabel); |
|
|
|
|
|
|
|
jPanel.add(tipLabel); |
|
|
|
|
|
|
|
return jPanel; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |