@ -3,17 +3,24 @@ package com.fr.design.mainframe;
import com.fr.base.BaseUtils ;
import com.fr.base.BaseUtils ;
import com.fr.design.dialog.BasicPane ;
import com.fr.design.dialog.BasicPane ;
import com.fr.design.gui.ibutton.UIHeadGroup ;
import com.fr.design.gui.ibutton.UIHeadGroup ;
import com.fr.design.gui.ilable.UILabel ;
import com.fr.design.i18n.Toolkit ;
import com.fr.design.layout.FRGUIPaneFactory ;
import com.fr.design.layout.FRGUIPaneFactory ;
import com.fr.design.mainframe.reuse.ComponentReuseNotificationInfo ;
import com.fr.design.mainframe.reuse.ComponentReuseNotificationInfo ;
import com.fr.design.mainframe.share.collect.ComponentCollector ;
import com.fr.design.mainframe.share.collect.ComponentCollector ;
import com.fr.design.mainframe.share.ui.local.LocalWidgetRepoPane ;
import com.fr.design.mainframe.share.ui.local.LocalWidgetRepoPane ;
import com.fr.design.mainframe.share.ui.online.OnlineWidgetRepoPane ;
import com.fr.design.mainframe.share.ui.online.OnlineWidgetRepoPane ;
import javax.swing.BorderFactory ;
import javax.swing.Icon ;
import javax.swing.Icon ;
import javax.swing.JPanel ;
import javax.swing.JPanel ;
import javax.swing.JScrollPane ;
import javax.swing.JScrollPane ;
import javax.swing.SwingConstants ;
import java.awt.BorderLayout ;
import java.awt.BorderLayout ;
import java.awt.CardLayout ;
import java.awt.CardLayout ;
import java.awt.Color ;
import java.awt.Dimension ;
import java.awt.FlowLayout ;
import java.util.ArrayList ;
import java.util.ArrayList ;
import java.util.List ;
import java.util.List ;
@ -30,6 +37,8 @@ public class FormWidgetDetailPane extends FormDockView{
private UIHeadGroup headGroup ;
private UIHeadGroup headGroup ;
private List < BasicPane > paneList ;
private List < BasicPane > paneList ;
private boolean isEmptyPane = false ;
public static FormWidgetDetailPane getInstance ( ) {
public static FormWidgetDetailPane getInstance ( ) {
if ( HOLDER . singleton = = null ) {
if ( HOLDER . singleton = = null ) {
HOLDER . singleton = new FormWidgetDetailPane ( ) ;
HOLDER . singleton = new FormWidgetDetailPane ( ) ;
@ -53,7 +62,7 @@ public class FormWidgetDetailPane extends FormDockView{
}
}
public String getViewTitle ( ) {
public String getViewTitle ( ) {
return com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Form_Widget_Tree_And_Table" ) ;
return Toolkit . i18nText ( "Fine-Design_Form_Widget_Tree_And_Table" ) ;
}
}
@Override
@Override
@ -65,6 +74,9 @@ public class FormWidgetDetailPane extends FormDockView{
* 初始化
* 初始化
* /
* /
public void refreshDockingView ( ) {
public void refreshDockingView ( ) {
if ( isEmptyPane ) {
return ;
}
FormDesigner designer = this . getEditingFormDesigner ( ) ;
FormDesigner designer = this . getEditingFormDesigner ( ) ;
removeAll ( ) ;
removeAll ( ) ;
if ( designer = = null ) {
if ( designer = = null ) {
@ -95,6 +107,10 @@ public class FormWidgetDetailPane extends FormDockView{
this . add ( centerPane , BorderLayout . CENTER ) ;
this . add ( centerPane , BorderLayout . CENTER ) ;
}
}
public void resetEmptyPane ( ) {
this . isEmptyPane = false ;
}
/ * *
/ * *
* 清除数据
* 清除数据
@ -105,6 +121,30 @@ public class FormWidgetDetailPane extends FormDockView{
this . add ( psp , BorderLayout . CENTER ) ;
this . add ( psp , BorderLayout . CENTER ) ;
}
}
public void switch2Empty ( ) {
isEmptyPane = true ;
this . removeAll ( ) ;
JPanel panel = FRGUIPaneFactory . createVerticalFlowLayout_Pane ( true , FlowLayout . LEADING , 0 , 5 ) ;
UILabel imagePanel = new UILabel ( BaseUtils . readIcon ( "/com/fr/base/images/share/version_not_match.png" ) ) ;
imagePanel . setPreferredSize ( new Dimension ( 240 , 96 ) ) ;
imagePanel . setHorizontalAlignment ( SwingConstants . CENTER ) ;
panel . add ( imagePanel ) ;
UILabel uiLabel1 = tipLabel ( Toolkit . i18nText ( "Fine-Design_Share_Version_Not_Match_Tip1" ) ) ;
UILabel uiLabel2 = tipLabel ( Toolkit . i18nText ( "Fine-Design_Share_Version_Not_Match_Tip2" ) ) ;
panel . add ( uiLabel1 ) ;
panel . add ( uiLabel2 ) ;
panel . setBorder ( BorderFactory . createEmptyBorder ( 240 , 0 , 0 , 0 ) ) ;
this . add ( panel , BorderLayout . CENTER ) ;
}
private UILabel tipLabel ( String text ) {
UILabel tipLabel = new UILabel ( text ) ;
tipLabel . setHorizontalAlignment ( SwingConstants . CENTER ) ;
tipLabel . setPreferredSize ( new Dimension ( 240 , 20 ) ) ;
tipLabel . setForeground ( Color . decode ( "#8F8F92" ) ) ;
return tipLabel ;
}
public void enterWidgetLib ( ) {
public void enterWidgetLib ( ) {
ComponentReuseNotifyUtil . enterWidgetLibExtraAction ( ) ;
ComponentReuseNotifyUtil . enterWidgetLibExtraAction ( ) ;