@ -3,6 +3,7 @@ package com.fr.design.dialog;
import com.fr.concurrent.NamedThreadFactory ;
import com.fr.design.gui.ilable.UILabel ;
import com.fr.design.i18n.DesignSizeI18nManager ;
import com.fr.design.i18n.Toolkit ;
import com.fr.design.layout.FRGUIPaneFactory ;
import com.fr.design.mainframe.DesignerContext ;
@ -10,6 +11,7 @@ import com.fr.design.notification.Notification;
import com.fr.design.notification.NotificationCenter ;
import com.fr.module.ModuleContext ;
import com.fr.stable.StringUtils ;
import java.awt.BorderLayout ;
import java.awt.Color ;
import java.awt.Dimension ;
@ -40,9 +42,17 @@ public class NotificationDialog extends JDialog {
private UILabel messageText ;
private NotificationDialogAction notificationDialogAction ;
private ScheduledExecutorService TIMER ;
private Dimension dialogSize = new Dimension ( 230 , 95 ) ;
public NotificationDialog ( Frame owner , String title , boolean isModal , int messageType , String message , NotificationDialogAction action ) {
this ( owner , title , isModal , messageType , message , action , null ) ;
}
public NotificationDialog ( Frame owner , String title , boolean isModal , int messageType , String message , NotificationDialogAction action , Dimension dimension ) {
super ( owner ) ;
if ( dimension ! = null ) {
this . dialogSize = dimension ;
}
setTitle ( title ) ;
initComponents ( StringUtils . EMPTY , messageType , message , isModal , action ) ;
}
@ -77,7 +87,7 @@ public class NotificationDialog extends JDialog {
JScrollPane jScrollPane = new JScrollPane ( messageText , ScrollPaneConstants . VERTICAL_SCROLLBAR_AS_NEEDED , ScrollPaneConstants . HORIZONTAL_SCROLLBAR_NEVER ) ;
jScrollPane . setBorder ( BorderFactory . createEmptyBorder ( ) ) ;
centerPanel . add ( jScrollPane , BorderLayout . CENTER ) ;
centerPanel . setPreferredSize ( new Dimension ( 230 , 95 ) ) ;
centerPanel . setPreferredSize ( dialogSize ) ;
body . add ( centerPanel , BorderLayout . CENTER ) ;
//查看详情