|
|
|
@ -6,7 +6,6 @@ package com.fr.design.mainframe.bbs;
|
|
|
|
|
import com.fr.base.FRContext; |
|
|
|
|
import com.fr.concurrent.NamedThreadFactory; |
|
|
|
|
import com.fr.design.DesignerEnvManager; |
|
|
|
|
import com.fr.design.constants.UIConstants; |
|
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
|
import com.fr.design.upm.event.CertificateEvent; |
|
|
|
@ -17,9 +16,11 @@ import com.fr.general.DateUtils;
|
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
import javax.swing.BorderFactory; |
|
|
|
|
import javax.swing.UIManager; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Color; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.Insets; |
|
|
|
|
import java.text.ParseException; |
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
|
import java.util.Calendar; |
|
|
|
@ -33,15 +34,6 @@ import java.util.concurrent.Executors;
|
|
|
|
|
* @date: 2015-3-5-上午11:19:50 |
|
|
|
|
*/ |
|
|
|
|
public class UserInfoPane extends BasicPane { |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 默认未登录颜色 |
|
|
|
|
*/ |
|
|
|
|
private static final Color UN_LOGIN_BACKGROUND = UIConstants.DESIGNER_LOGIN_BACKGROUND; |
|
|
|
|
private static final Color LOGIN_BACKGROUND = new Color(184, 220, 242); |
|
|
|
|
private static final int WIDTH = 104; |
|
|
|
|
private static final int HEIGHT = 24; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 登录成功 |
|
|
|
|
*/ |
|
|
|
@ -70,10 +62,12 @@ public class UserInfoPane extends BasicPane {
|
|
|
|
|
* 构造函数 |
|
|
|
|
*/ |
|
|
|
|
private UserInfoPane() { |
|
|
|
|
this.setPreferredSize(new Dimension(WIDTH, HEIGHT)); |
|
|
|
|
this.setPreferredSize(new Dimension(UIManager.getInt("North.userinfoLabel.width"), UIManager.getInt("North.userinfoLabel.height"))); |
|
|
|
|
this.setLayout(new BorderLayout()); |
|
|
|
|
|
|
|
|
|
this.userInfoLabel = new UserInfoLabel(this); |
|
|
|
|
Insets insets = UIManager.getInsets("North.userinfoLabel.borderMargins"); |
|
|
|
|
this.userInfoLabel.setBorder(BorderFactory.createEmptyBorder(insets.top, insets.left, insets.bottom, insets.right)); |
|
|
|
|
|
|
|
|
|
this.markUnSignIn(); |
|
|
|
|
autoPushLoginDialog(); |
|
|
|
@ -108,9 +102,9 @@ public class UserInfoPane extends BasicPane {
|
|
|
|
|
*/ |
|
|
|
|
public void markUnSignIn() { |
|
|
|
|
this.userInfoLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Login_Onclick")); |
|
|
|
|
this.userInfoLabel.setForeground(Color.WHITE); |
|
|
|
|
this.userInfoLabel.setForeground(UIManager.getColor("color.text.white")); |
|
|
|
|
this.userInfoLabel.setOpaque(true); |
|
|
|
|
this.userInfoLabel.setBackground(UN_LOGIN_BACKGROUND); |
|
|
|
|
this.userInfoLabel.setBackground(UIManager.getColor("color.brand.normal")); |
|
|
|
|
this.userInfoLabel.resetUserName(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -121,10 +115,8 @@ public class UserInfoPane extends BasicPane {
|
|
|
|
|
*/ |
|
|
|
|
public void markSignIn(String userName) { |
|
|
|
|
this.userInfoLabel.setText(userName); |
|
|
|
|
this.userInfoLabel.setForeground(Color.BLACK); |
|
|
|
|
this.userInfoLabel.setUserName(userName); |
|
|
|
|
this.userInfoLabel.setOpaque(true); |
|
|
|
|
this.userInfoLabel.setBackground(LOGIN_BACKGROUND); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|