@ -24,6 +24,7 @@ public class OnlineWidgetTabPane extends JPanel {
private static final String COMPONENT = com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Share" ) ;
private static final String COMPONENT = com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Share" ) ;
private static final String COMPONENT_PACKAGE = com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Share_Package" ) ;
private static final String COMPONENT_PACKAGE = com . fr . design . i18n . Toolkit . i18nText ( "Fine-Design_Share_Package" ) ;
private static final String COMPONENT_EMBED = "COMPONENT_EMBED" ;
private static final String COMPONENT_EMBED = "COMPONENT_EMBED" ;
private UITabGroup headGroup ;
private CardLayout cardLayout ;
private CardLayout cardLayout ;
private JPanel centerPane ;
private JPanel centerPane ;
private boolean packagePaneCreated = false ;
private boolean packagePaneCreated = false ;
@ -43,7 +44,7 @@ public class OnlineWidgetTabPane extends JPanel {
this . centerPane . add ( new OnlineWidgetShowPane ( sharableWidgets ) , COMPONENT ) ;
this . centerPane . add ( new OnlineWidgetShowPane ( sharableWidgets ) , COMPONENT ) ;
this . centerPane . add ( embedFilterShowPane = new OnlineEmbedFilterShowPane ( new OnlineWidgetShowPane ( sharableWidgets , OnlineWidgetSortType . SALES ) ) , COMPONENT_EMBED ) ;
this . centerPane . add ( embedFilterShowPane = new OnlineEmbedFilterShowPane ( new OnlineWidgetShowPane ( sharableWidgets , OnlineWidgetSortType . SALES ) ) , COMPONENT_EMBED ) ;
//延迟组件包面板的初始化,防止组件面板里组件的缩略图和组件包面板里组件的缩略图一起加载
//延迟组件包面板的初始化,防止组件面板里组件的缩略图和组件包面板里组件的缩略图一起加载
UITabGroup headGroup = new UITabGroup ( new String [ ] { COMPONENT , COMPONENT_PACKAGE } ) {
this . headGroup = new UITabGroup ( new String [ ] { COMPONENT , COMPONENT_PACKAGE } ) {
public void tabChanged ( int newSelectedIndex ) {
public void tabChanged ( int newSelectedIndex ) {
for ( TabChangeListener changeListener : tabChangeListeners ) {
for ( TabChangeListener changeListener : tabChangeListeners ) {
changeListener . tabChange ( newSelectedIndex ) ;
changeListener . tabChange ( newSelectedIndex ) ;
@ -63,7 +64,7 @@ public class OnlineWidgetTabPane extends JPanel {
}
}
} ;
} ;
headGroup . setSelectedIndex ( 0 ) ;
this . headGroup . setSelectedIndex ( 0 ) ;
this . centerPane . setBorder ( BorderFactory . createEmptyBorder ( 10 , 0 , 0 , 0 ) ) ;
this . centerPane . setBorder ( BorderFactory . createEmptyBorder ( 10 , 0 , 0 , 0 ) ) ;
JPanel jPanel = FRGUIPaneFactory . createBorderLayout_S_Pane ( ) ;
JPanel jPanel = FRGUIPaneFactory . createBorderLayout_S_Pane ( ) ;
jPanel . setBorder ( BorderFactory . createEmptyBorder ( 0 , 10 , 0 , 10 ) ) ;
jPanel . setBorder ( BorderFactory . createEmptyBorder ( 0 , 10 , 0 , 10 ) ) ;
@ -84,6 +85,7 @@ public class OnlineWidgetTabPane extends JPanel {
}
}
}
}
public void refreshPane ( ) {
public void refreshPane ( ) {
this . headGroup . setSelectedIndex ( 0 ) ;
this . cardLayout . show ( centerPane , ComponentShareUtil . needShowEmbedFilterPane ( ) ? COMPONENT_EMBED : COMPONENT ) ;
this . cardLayout . show ( centerPane , ComponentShareUtil . needShowEmbedFilterPane ( ) ? COMPONENT_EMBED : COMPONENT ) ;
}
}