|
|
@ -519,7 +519,10 @@ public class EditToolBar extends BasicPane { |
|
|
|
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())); |
|
|
|
|
|
|
|
|
|
|
|
JavaScriptResourceInfo.PathNode pathNode = JavaScriptResourceInfo.PathNode.create(JavaScriptResourceInfo.Type.WIDGET, ((Button) widget).getText()); |
|
|
|
|
|
|
|
JavaScriptResourceInfo javaScriptResourceInfo = new JavaScriptResourceInfo().addFirstPathNode(pathNode); |
|
|
|
|
|
|
|
javaScriptPane.setResourceInfo(javaScriptResourceInfo); |
|
|
|
|
|
|
|
|
|
|
|
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)); |
|
|
@ -541,6 +544,7 @@ public class EditToolBar extends BasicPane { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 更新 |
|
|
|
* 更新 |
|
|
|
|
|
|
|
* |
|
|
|
* @param widget 对应组件 |
|
|
|
* @param widget 对应组件 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public void populate(Widget widget) { |
|
|
|
public void populate(Widget widget) { |
|
|
@ -572,7 +576,7 @@ public class EditToolBar extends BasicPane { |
|
|
|
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; |
|
|
|
this.pdf.setSelected(export.isPdfAvailable()); |
|
|
|
this.pdf.setSelected(export.isPdfAvailable()); |
|
|
@ -581,9 +585,10 @@ public class EditToolBar extends BasicPane { |
|
|
|
this.excelS.setSelected(export.isExcelSAvailable()); |
|
|
|
this.excelS.setSelected(export.isExcelSAvailable()); |
|
|
|
this.word.setSelected(export.isWordAvailable()); |
|
|
|
this.word.setSelected(export.isWordAvailable()); |
|
|
|
this.image.setSelected(export.isImageAvailable()); |
|
|
|
this.image.setSelected(export.isImageAvailable()); |
|
|
|
if(exportToolBarProviders != null){ |
|
|
|
if (exportToolBarProviders != null) { |
|
|
|
for(int i=0; i<exportToolBarProviders.length; i++){ |
|
|
|
for (int i = 0; i < exportToolBarProviders.length; i++) { |
|
|
|
exportToolBarProviders[i].populate();; |
|
|
|
exportToolBarProviders[i].populate(); |
|
|
|
|
|
|
|
; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -694,7 +699,10 @@ 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())); |
|
|
|
|
|
|
|
|
|
|
|
JavaScriptResourceInfo.PathNode pathNode = JavaScriptResourceInfo.PathNode.create(JavaScriptResourceInfo.Type.CUSTOM_BUTTON, ((Button) widget).getText()); |
|
|
|
|
|
|
|
JavaScriptResourceInfo javaScriptResourceInfo = new JavaScriptResourceInfo().addFirstPathNode(pathNode); |
|
|
|
|
|
|
|
javaScriptPane.setResourceInfo(javaScriptResourceInfo); |
|
|
|
|
|
|
|
|
|
|
|
customToolBarButton.setJSImpl(this.javaScriptPane.updateBean()); |
|
|
|
customToolBarButton.setJSImpl(this.javaScriptPane.updateBean()); |
|
|
|
} |
|
|
|
} |
|
|
|