|
|
|
@ -34,13 +34,12 @@ import com.fr.report.web.button.Export;
|
|
|
|
|
import com.fr.report.web.button.PDFPrint; |
|
|
|
|
import com.fr.report.web.button.Print; |
|
|
|
|
import com.fr.report.web.button.write.AppendColumnRow; |
|
|
|
|
import com.fr.report.web.button.write.ExcelImport; |
|
|
|
|
import com.fr.report.web.button.write.Submit; |
|
|
|
|
import com.fr.stable.ArrayUtils; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
|
import javax.swing.event.ChangeListener; |
|
|
|
|
import javax.swing.event.ListSelectionEvent; |
|
|
|
|
import javax.swing.event.ListSelectionListener; |
|
|
|
|
import java.awt.*; |
|
|
|
@ -295,6 +294,7 @@ public class EditToolBar extends BasicPane {
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 动作 |
|
|
|
|
* |
|
|
|
|
* @param e 事件 |
|
|
|
|
*/ |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
@ -320,7 +320,8 @@ public class EditToolBar extends BasicPane {
|
|
|
|
|
private CardLayout card; |
|
|
|
|
private JPanel centerPane; |
|
|
|
|
private UICheckBox icon, text, pdf, excelP, excelO, excelS, image, word, |
|
|
|
|
flashPrint, pdfPrint, appletPrint, serverPrint, isPopup, isVerify, failSubmit, isCurSheet; |
|
|
|
|
flashPrint, pdfPrint, appletPrint, serverPrint, isPopup, isVerify, failSubmit, |
|
|
|
|
isCurSheet, excelImClean, excelImCover, excelImAppend, excelImCust; |
|
|
|
|
private UIBasicSpinner count; |
|
|
|
|
private Widget widget; |
|
|
|
|
private UITextField nameField; |
|
|
|
@ -381,6 +382,7 @@ public class EditToolBar extends BasicPane {
|
|
|
|
|
centerPane.setLayout(card); |
|
|
|
|
centerPane.add("custom", getCustomPane()); |
|
|
|
|
centerPane.add("export", getExport()); |
|
|
|
|
centerPane.add("import", getImport()); |
|
|
|
|
centerPane.add("print", getPrint()); |
|
|
|
|
centerPane.add("none", none); |
|
|
|
|
centerPane.add("pdfprint", getPdfPrintSetting()); |
|
|
|
@ -435,6 +437,24 @@ public class EditToolBar extends BasicPane {
|
|
|
|
|
return export; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel getImport() { |
|
|
|
|
JPanel excelImport = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); |
|
|
|
|
excelImClean = new UICheckBox(Inter.getLocText("FR-Engine_Excel_Import_Clean")); |
|
|
|
|
excelImCover = new UICheckBox(Inter.getLocText("FR-Engine_Excel_Import_Cover")); |
|
|
|
|
excelImAppend = new UICheckBox(Inter.getLocText("FR-Engine_Excel_Import_Append")); |
|
|
|
|
excelImCust = new UICheckBox(Inter.getLocText("FR-Engine-Utils-Import_Excel_Data_Customized")); |
|
|
|
|
excelImport.add(excelImCover); |
|
|
|
|
excelImport.add(Box.createVerticalStrut(2)); |
|
|
|
|
excelImport.add(excelImClean); |
|
|
|
|
excelImport.add(Box.createVerticalStrut(2)); |
|
|
|
|
excelImport.add(excelImAppend); |
|
|
|
|
excelImport.add(Box.createVerticalStrut(2)); |
|
|
|
|
excelImport.add(excelImCust); |
|
|
|
|
|
|
|
|
|
excelImport.setBorder(GUICoreUtils.createTitledBorder(Inter.getLocText(new String[]{"Form-Button", "Property", "Set"}), null)); |
|
|
|
|
return excelImport; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private JPanel getPrint() { |
|
|
|
|
JPanel print = FRGUIPaneFactory.createY_AXISBoxInnerContainer_L_Pane(); |
|
|
|
|
// print.setLayout(new BoxLayout(print, BoxLayout.Y_AXIS));
|
|
|
|
@ -513,6 +533,7 @@ public class EditToolBar extends BasicPane {
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 更新 |
|
|
|
|
* |
|
|
|
|
* @param widget 对应组件 |
|
|
|
|
*/ |
|
|
|
|
public void populate(Widget widget) { |
|
|
|
@ -533,6 +554,8 @@ public class EditToolBar extends BasicPane {
|
|
|
|
|
populateSubmit(); |
|
|
|
|
} else if (widget instanceof CustomToolBarButton) { |
|
|
|
|
populateCustomToolBarButton(); |
|
|
|
|
} else if (widget instanceof ExcelImport) { |
|
|
|
|
populateImport(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Set<ExtraButtonToolBarProvider> extraButtonSet = ExtraDesignClassManager.getInstance().getArray(ExtraButtonToolBarProvider.XML_TAG); |
|
|
|
@ -557,11 +580,21 @@ public class EditToolBar extends BasicPane {
|
|
|
|
|
this.image.setSelected(export.isImageAvailable()); |
|
|
|
|
if (exportToolBarProviders != null) { |
|
|
|
|
for (int i = 0; i < exportToolBarProviders.length; i++) { |
|
|
|
|
exportToolBarProviders[i].populate();; |
|
|
|
|
exportToolBarProviders[i].populate(); |
|
|
|
|
; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void populateImport() { |
|
|
|
|
card.show(centerPane, "import"); |
|
|
|
|
ExcelImport export = (ExcelImport) widget; |
|
|
|
|
this.excelImCover.setSelected(export.isExcelCoverAvailable()); |
|
|
|
|
this.excelImClean.setSelected(export.isExcelCleanAvailable()); |
|
|
|
|
this.excelImAppend.setSelected(export.isExcelAppendAvailable()); |
|
|
|
|
this.excelImCust.setSelected(export.isExcelCustAvailable()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void populateCustomToolBarButton() { |
|
|
|
|
card.show(centerPane, "custom"); |
|
|
|
|
CustomToolBarButton customToolBarButton = (CustomToolBarButton) widget; |
|
|
|
@ -623,6 +656,8 @@ public class EditToolBar extends BasicPane {
|
|
|
|
|
updateSubmit(); |
|
|
|
|
} else if (widget instanceof CustomToolBarButton) { |
|
|
|
|
((CustomToolBarButton) widget).setJSImpl(this.javaScriptPane.updateBean()); |
|
|
|
|
} else if (widget instanceof ExcelImport) { |
|
|
|
|
updateImport(); |
|
|
|
|
} |
|
|
|
|
if (widget instanceof Button) { |
|
|
|
|
updateDefault(); |
|
|
|
@ -668,10 +703,18 @@ public class EditToolBar extends BasicPane {
|
|
|
|
|
export.setImageAvailable(this.image.isSelected()); |
|
|
|
|
if (exportToolBarProviders != null) { |
|
|
|
|
for (int i = 0; i < exportToolBarProviders.length; i++) { |
|
|
|
|
exportToolBarProviders[i].update();; |
|
|
|
|
exportToolBarProviders[i].update(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void updateImport() { |
|
|
|
|
ExcelImport excelImport = (ExcelImport) widget; |
|
|
|
|
excelImport.setExcelCleanAvailable(this.excelImClean.isSelected()); |
|
|
|
|
excelImport.setExcelCoverAvailable(this.excelImCover.isSelected()); |
|
|
|
|
excelImport.setExcelAppendAvailable(this.excelImAppend.isSelected()); |
|
|
|
|
excelImport.setExcelCustAvailable(this.excelImCust.isSelected()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |