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