@ -38,6 +38,7 @@ import com.fr.report.web.button.write.AppendColumnRow;
import com.fr.report.web.button.write.Submit ;
import com.fr.stable.ArrayUtils ;
import com.fr.stable.StringUtils ;
import com.fr.write.JavaScriptResourceInfo ;
import javax.swing.BorderFactory ;
import javax.swing.Box ;
@ -322,6 +323,7 @@ public class EditToolBar extends BasicPane {
/ * *
* 动作
*
* @param e 事件
* /
public void actionPerformed ( ActionEvent e ) {
@ -455,7 +457,7 @@ public class EditToolBar extends BasicPane {
export . add ( word ) ;
export . add ( Box . createVerticalStrut ( 2 ) ) ;
export . add ( image ) ;
for ( int i = 0 ; i < ArrayUtils . getLength ( exportToolBarProviders ) ; i + + ) {
for ( int i = 0 ; i < ArrayUtils . getLength ( exportToolBarProviders ) ; i + + ) {
export = exportToolBarProviders [ i ] . updateCenterPane ( export ) ;
}
@ -514,9 +516,11 @@ public class EditToolBar extends BasicPane {
if ( ! ( widget instanceof CustomToolBarButton ) ) {
return ;
}
if ( javaScriptPane = = null | | ( ( CustomToolBarButton ) widget ) . getJSImpl ( ) = = null ) {
if ( javaScriptPane = = null | | ( ( CustomToolBarButton ) widget ) . getJSImpl ( ) = = null ) {
javaScriptPane = JavaScriptActionPane . createDefault ( ) ;
}
javaScriptPane . setResourceInfo ( new JavaScriptResourceInfo ( JavaScriptResourceInfo . Type . WIDGET , ( ( Button ) widget ) . getText ( ) ) ) ;
javaScriptPane . setPreferredSize ( new Dimension ( 750 , 500 ) ) ;
BasicDialog dialog = javaScriptPane . showWindow ( SwingUtilities . getWindowAncestor ( ButtonPane . this ) ) ;
dialog . addDialogActionListener ( new DialogActionAdapter ( ) {
@ -563,7 +567,7 @@ public class EditToolBar extends BasicPane {
}
}
private void populateAppendColumnRow ( ) {
private void populateAppendColumnRow ( ) {
card . show ( centerPane , "appendcount" ) ;
count . setValue ( ( ( AppendColumnRow ) widget ) . getCount ( ) ) ;
}
@ -584,7 +588,7 @@ public class EditToolBar extends BasicPane {
}
}
private void populateEmail ( ) {
private void populateEmail ( ) {
card . show ( centerPane , EMAIL ) ;
Email email = ( Email ) widget ;
this . customConsignee . setSelected ( email . isCustomConsignee ( ) ) ;
@ -592,7 +596,7 @@ public class EditToolBar extends BasicPane {
this . consigneeByRole . setSelected ( email . isConsigneeByRole ( ) ) ;
}
private void populateCustomToolBarButton ( ) {
private void populateCustomToolBarButton ( ) {
card . show ( centerPane , "custom" ) ;
CustomToolBarButton customToolBarButton = ( CustomToolBarButton ) widget ;
if ( customToolBarButton . getJSImpl ( ) ! = null ) {
@ -600,7 +604,7 @@ public class EditToolBar extends BasicPane {
}
}
private void populateSubmit ( ) {
private void populateSubmit ( ) {
card . show ( centerPane , "submit" ) ;
Submit submit = ( ( Submit ) widget ) ;
this . isVerify . setSelected ( submit . isVerify ( ) ) ;
@ -611,7 +615,7 @@ public class EditToolBar extends BasicPane {
this . isCurSheet . setSelected ( submit . isOnlySubmitSelect ( ) ) ;
}
private void populateDefault ( ) {
private void populateDefault ( ) {
Button button = ( Button ) widget ;
this . icon . setSelected ( button . isShowIcon ( ) ) ;
this . text . setSelected ( button . isShowText ( ) ) ;
@ -648,21 +652,21 @@ public class EditToolBar extends BasicPane {
return widget ;
}
private void updateDefault ( ) {
private void updateDefault ( ) {
( ( Button ) widget ) . setShowIcon ( this . icon . isSelected ( ) ) ;
( ( Button ) widget ) . setShowText ( this . text . isSelected ( ) ) ;
( ( Button ) widget ) . setText ( this . nameField . getText ( ) ) ;
( ( Button ) widget ) . setIconName ( this . iconPane . update ( ) ) ;
}
private void updateSubmit ( ) {
private void updateSubmit ( ) {
Submit submit = ( ( Submit ) widget ) ;
submit . setVerify ( this . isVerify . isSelected ( ) ) ;
submit . setFailVerifySubmit ( this . failSubmit . isSelected ( ) ) ;
submit . setOnlySubmitSelect ( this . isCurSheet . isSelected ( ) ) ;
}
private void updateExport ( ) {
private void updateExport ( ) {
Export export = ( Export ) widget ;
export . setPdfAvailable ( this . pdf . isSelected ( ) ) ;
export . setExcelPAvailable ( this . excelP . isSelected ( ) ) ;
@ -670,14 +674,15 @@ public class EditToolBar extends BasicPane {
export . setExcelSAvailable ( this . excelS . isSelected ( ) ) ;
export . setWordAvailable ( this . word . isSelected ( ) ) ;
export . setImageAvailable ( this . image . isSelected ( ) ) ;
if ( exportToolBarProviders ! = null ) {
for ( int i = 0 ; i < exportToolBarProviders . length ; i + + ) {
exportToolBarProviders [ i ] . update ( ) ; ;
if ( exportToolBarProviders ! = null ) {
for ( int i = 0 ; i < exportToolBarProviders . length ; i + + ) {
exportToolBarProviders [ i ] . update ( ) ;
;
}
}
}
private void updateEmail ( ) {
private void updateEmail ( ) {
Email email = ( ( Email ) widget ) ;
email . setCustomConsignee ( this . customConsignee . isSelected ( ) ) ;
email . setConsigneeByDepartment ( this . consigneeByDepartment . isSelected ( ) ) ;
@ -689,6 +694,8 @@ public class EditToolBar extends BasicPane {
if ( customToolBarButton . getJSImpl ( ) = = null ) {
this . javaScriptPane = JavaScriptActionPane . createDefault ( ) ;
}
javaScriptPane . setResourceInfo ( new JavaScriptResourceInfo ( JavaScriptResourceInfo . Type . CUSTOM_BUTTON , ( ( Button ) widget ) . getText ( ) ) ) ;
customToolBarButton . setJSImpl ( this . javaScriptPane . updateBean ( ) ) ;
}
}