|
|
@ -7,6 +7,7 @@ import com.fr.design.dialog.BasicDialog; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.dialog.DialogActionAdapter; |
|
|
|
import com.fr.design.dialog.DialogActionAdapter; |
|
|
|
import com.fr.design.fun.ExportToolBarProvider; |
|
|
|
import com.fr.design.fun.ExportToolBarProvider; |
|
|
|
|
|
|
|
import com.fr.design.fun.ExtraButtonToolBarProvider; |
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.icheckbox.UICheckBox; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
@ -199,7 +200,7 @@ public class EditToolBar extends BasicPane { |
|
|
|
toolBarButton.setWidget(widget); |
|
|
|
toolBarButton.setWidget(widget); |
|
|
|
if (widget instanceof Button) { |
|
|
|
if (widget instanceof Button) { |
|
|
|
String iconname = ((Button) widget).getIconName(); |
|
|
|
String iconname = ((Button) widget).getIconName(); |
|
|
|
if (!StringUtils.isBlank(iconname)) { |
|
|
|
if (StringUtils.isNotBlank(iconname)) { |
|
|
|
Image iimage = WidgetManager.getProviderInstance().getIconManager().getIconImage(iconname); |
|
|
|
Image iimage = WidgetManager.getProviderInstance().getIconManager().getIconImage(iconname); |
|
|
|
toolBarButton.setIcon(new ImageIcon(iimage)); |
|
|
|
toolBarButton.setIcon(new ImageIcon(iimage)); |
|
|
|
} |
|
|
|
} |
|
|
@ -326,7 +327,7 @@ public class EditToolBar extends BasicPane { |
|
|
|
private IconDefinePane iconPane; |
|
|
|
private IconDefinePane iconPane; |
|
|
|
private UIButton button; |
|
|
|
private UIButton button; |
|
|
|
private JavaScriptActionPane javaScriptPane; |
|
|
|
private JavaScriptActionPane javaScriptPane; |
|
|
|
private ExportToolBarProvider[] exportToolBarProviders; |
|
|
|
private ExportToolBarProvider[] exportToolBarProviders; |
|
|
|
|
|
|
|
|
|
|
|
private ChangeListener changeListener = new ChangeListener() { |
|
|
|
private ChangeListener changeListener = new ChangeListener() { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
|
public void stateChanged(ChangeEvent e) { |
|
|
@ -386,6 +387,11 @@ public class EditToolBar extends BasicPane { |
|
|
|
centerPane.add(getCpane(), "appendcount"); |
|
|
|
centerPane.add(getCpane(), "appendcount"); |
|
|
|
centerPane.add(getSubmitPane(), "submit"); |
|
|
|
centerPane.add(getSubmitPane(), "submit"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set<ExtraButtonToolBarProvider> extraButtonSet = ExtraDesignClassManager.getInstance().getArray(ExtraButtonToolBarProvider.XML_TAG); |
|
|
|
|
|
|
|
for (ExtraButtonToolBarProvider provider : extraButtonSet) { |
|
|
|
|
|
|
|
provider.updateCenterPane(centerPane); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.add(centerPane, BorderLayout.CENTER); |
|
|
|
this.add(centerPane, BorderLayout.CENTER); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -479,7 +485,6 @@ public class EditToolBar extends BasicPane { |
|
|
|
return submitPane; |
|
|
|
return submitPane; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
protected String title4PopupWindow() { |
|
|
|
protected String title4PopupWindow() { |
|
|
|
return "Button"; |
|
|
|
return "Button"; |
|
|
@ -528,13 +533,18 @@ public class EditToolBar extends BasicPane { |
|
|
|
} else if (widget instanceof CustomToolBarButton) { |
|
|
|
} else if (widget instanceof CustomToolBarButton) { |
|
|
|
populateCustomToolBarButton(); |
|
|
|
populateCustomToolBarButton(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Set<ExtraButtonToolBarProvider> extraButtonSet = ExtraDesignClassManager.getInstance().getArray(ExtraButtonToolBarProvider.XML_TAG); |
|
|
|
|
|
|
|
for (ExtraButtonToolBarProvider provider : extraButtonSet) { |
|
|
|
|
|
|
|
provider.populate(widget, card, centerPane); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void populateAppendColumnRow(){ |
|
|
|
private void populateAppendColumnRow(){ |
|
|
|
card.show(centerPane, "appendcount"); |
|
|
|
card.show(centerPane, "appendcount"); |
|
|
|
count.setValue(((AppendColumnRow) widget).getCount()); |
|
|
|
count.setValue(((AppendColumnRow) widget).getCount()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void populateExport(){ |
|
|
|
private void populateExport(){ |
|
|
|
card.show(centerPane, "export"); |
|
|
|
card.show(centerPane, "export"); |
|
|
|
Export export = (Export) widget; |
|
|
|
Export export = (Export) widget; |
|
|
@ -550,7 +560,7 @@ public class EditToolBar extends BasicPane { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void populateCustomToolBarButton(){ |
|
|
|
private void populateCustomToolBarButton(){ |
|
|
|
card.show(centerPane, "custom"); |
|
|
|
card.show(centerPane, "custom"); |
|
|
|
CustomToolBarButton customToolBarButton = (CustomToolBarButton) widget; |
|
|
|
CustomToolBarButton customToolBarButton = (CustomToolBarButton) widget; |
|
|
@ -558,7 +568,7 @@ public class EditToolBar extends BasicPane { |
|
|
|
this.javaScriptPane.populateBean(customToolBarButton.getJSImpl()); |
|
|
|
this.javaScriptPane.populateBean(customToolBarButton.getJSImpl()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void populateSubmit(){ |
|
|
|
private void populateSubmit(){ |
|
|
|
card.show(centerPane, "submit"); |
|
|
|
card.show(centerPane, "submit"); |
|
|
|
Submit submit = ((Submit) widget); |
|
|
|
Submit submit = ((Submit) widget); |
|
|
@ -566,13 +576,13 @@ public class EditToolBar extends BasicPane { |
|
|
|
this.failSubmit.setSelected(submit.isFailVerifySubmit()); |
|
|
|
this.failSubmit.setSelected(submit.isFailVerifySubmit()); |
|
|
|
this.isCurSheet.setSelected(submit.isOnlySubmitSelect()); |
|
|
|
this.isCurSheet.setSelected(submit.isOnlySubmitSelect()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void populatePDFPrint(){ |
|
|
|
private void populatePDFPrint(){ |
|
|
|
card.show(centerPane, "pdfprint"); |
|
|
|
card.show(centerPane, "pdfprint"); |
|
|
|
PDFPrint pdfPrint = (PDFPrint) widget; |
|
|
|
PDFPrint pdfPrint = (PDFPrint) widget; |
|
|
|
this.isPopup.setSelected(pdfPrint.isPopup()); |
|
|
|
this.isPopup.setSelected(pdfPrint.isPopup()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void populatePrint(){ |
|
|
|
private void populatePrint(){ |
|
|
|
card.show(centerPane, "print"); |
|
|
|
card.show(centerPane, "print"); |
|
|
|
Print print = (Print) widget; |
|
|
|
Print print = (Print) widget; |
|
|
@ -581,7 +591,7 @@ public class EditToolBar extends BasicPane { |
|
|
|
this.flashPrint.setSelected(print.isFlashPrint()); |
|
|
|
this.flashPrint.setSelected(print.isFlashPrint()); |
|
|
|
this.serverPrint.setSelected(print.isServerPrint()); |
|
|
|
this.serverPrint.setSelected(print.isServerPrint()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void populateDefault(){ |
|
|
|
private void populateDefault(){ |
|
|
|
Button button = (Button) widget; |
|
|
|
Button button = (Button) widget; |
|
|
|
this.icon.setSelected(button.isShowIcon()); |
|
|
|
this.icon.setSelected(button.isShowIcon()); |
|
|
@ -592,7 +602,7 @@ public class EditToolBar extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 更新 |
|
|
|
* 更新 |
|
|
|
* |
|
|
|
* |
|
|
|
* @return 对应组件 |
|
|
|
* @return 对应组件 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public Widget update() { |
|
|
|
public Widget update() { |
|
|
@ -613,23 +623,29 @@ public class EditToolBar extends BasicPane { |
|
|
|
if (widget instanceof Button) { |
|
|
|
if (widget instanceof Button) { |
|
|
|
updateDefault(); |
|
|
|
updateDefault(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set<ExtraButtonToolBarProvider> extraButtonSet = ExtraDesignClassManager.getInstance().getArray(ExtraButtonToolBarProvider.XML_TAG); |
|
|
|
|
|
|
|
for (ExtraButtonToolBarProvider provider : extraButtonSet) { |
|
|
|
|
|
|
|
provider.update(widget); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
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 updatePrint(){ |
|
|
|
private void updatePrint(){ |
|
|
|
Print print = (Print) widget; |
|
|
|
Print print = (Print) widget; |
|
|
|
print.setAppletPrint(this.appletPrint.isSelected()); |
|
|
|
print.setAppletPrint(this.appletPrint.isSelected()); |
|
|
@ -637,7 +653,7 @@ public class EditToolBar extends BasicPane { |
|
|
|
print.setPDFPrint(this.pdfPrint.isSelected()); |
|
|
|
print.setPDFPrint(this.pdfPrint.isSelected()); |
|
|
|
print.setServerPrint(this.serverPrint.isSelected()); |
|
|
|
print.setServerPrint(this.serverPrint.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()); |
|
|
|