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