Browse Source

Pull request #4713: REPORT-54277 消息推送-消息中心-看不到推送的消息

Merge in DESIGN/design from ~PENGDA/design:final/10.0 to final/10.0

* commit '23d630e74bf23b54022d304763d33117f2c71040':
  REPORT-54277 消息推送-消息中心-看不到推送的消息
  REPORT-54277 消息推送-消息中心-看不到推送的消息
  REPORT-54277 消息推送-消息中心-看不到推送的消息
final/10.0
Kara 4 years ago
parent
commit
5ed8948039
  1. 6
      designer-base/src/main/java/com/fr/design/notification/NotificationCenter.java
  2. 18
      designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java
  3. 4
      designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java

6
designer-base/src/main/java/com/fr/design/notification/NotificationCenter.java

@ -26,12 +26,12 @@ public class NotificationCenter {
}
public void removeNotification(int index){
notifications.remove(index);
NotificationCenterPane.getNotificationCenterPane().refreshButton();
notifications.remove(index);
NotificationCenterPane.getNotificationCenterPane().refreshButton();
}
public Notification getNotification(int index){
return notifications.get(index);
return notifications.get(index);
}
public void clearAllNotifications(){

18
designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterDialog.java

@ -2,7 +2,6 @@ package com.fr.design.notification.ui;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.notification.Notification;
import com.fr.design.notification.NotificationCenter;
import java.awt.BorderLayout;
@ -26,9 +25,8 @@ public class NotificationCenterDialog extends JDialog {
private UILabel deleteLabel;
private static final int NOTIFICATIONCOUNT = 5;
private static NotificationCenterDialog instance;
private NotificationCenterDialog(Frame parent) {
public NotificationCenterDialog(Frame parent) {
super(parent);
setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Notification"));
setResizable(false);
@ -42,13 +40,6 @@ public class NotificationCenterDialog extends JDialog {
initComponents();
}
public static NotificationCenterDialog getInstance() {
if (instance == null) {
instance = new NotificationCenterDialog(DesignerContext.getDesignerFrame());
}
return instance;
}
private void initComponents() {
centerPanel = FRGUIPaneFactory.createNColumnGridInnerContainer_S_Pane(1);
addNotification();
@ -89,14 +80,15 @@ public class NotificationCenterDialog extends JDialog {
return deleteLabel;
}
public void showDialog() {
this.setVisible(true);
}
public void hideDialog() {
this.dispose();
}
public void showDialog() {
this.setVisible(true);
}
public void addNotification() {
notificationNeedShow.clear();

4
designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java

@ -4,6 +4,7 @@ import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.notification.NotificationCenter;
import com.fr.general.IOUtils;
import java.awt.BorderLayout;
@ -27,7 +28,8 @@ public class NotificationCenterPane extends BasicPane {
notificationCenterButton.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
NotificationCenterDialog.getInstance().showDialog();
NotificationCenterDialog notificationCenterDialog = new NotificationCenterDialog(DesignerContext.getDesignerFrame());
notificationCenterDialog.showDialog();
}
});
this.setBackground(UIConstants.TEMPLATE_TAB_PANE_BACKGROUND);

Loading…
Cancel
Save