Browse Source

调整格式化

master
frharry 8 years ago
parent
commit
1731abb03a
  1. 50
      designer/src/com/fr/design/webattr/EditToolBar.java
  2. 7
      designer_base/src/com/fr/design/fun/ExtraButtonToolBarProvider.java

50
designer/src/com/fr/design/webattr/EditToolBar.java

@ -387,10 +387,10 @@ public class EditToolBar extends BasicPane {
centerPane.add(getCpane(), "appendcount");
centerPane.add(getSubmitPane(), "submit");
Set<ExtraButtonToolBarProvider> extraButtonSet = ExtraDesignClassManager.getInstance().getArray(ExtraButtonToolBarProvider.XML_TAG);
for(ExtraButtonToolBarProvider provider : extraButtonSet){
provider.updateCenterPane(centerPane);
}
Set<ExtraButtonToolBarProvider> extraButtonSet = ExtraDesignClassManager.getInstance().getArray(ExtraButtonToolBarProvider.XML_TAG);
for (ExtraButtonToolBarProvider provider : extraButtonSet) {
provider.updateCenterPane(centerPane);
}
this.add(centerPane, BorderLayout.CENTER);
}
@ -534,17 +534,17 @@ public class EditToolBar extends BasicPane {
populateCustomToolBarButton();
}
Set<ExtraButtonToolBarProvider> extraButtonSet = ExtraDesignClassManager.getInstance().getArray(ExtraButtonToolBarProvider.XML_TAG);
for(ExtraButtonToolBarProvider provider : extraButtonSet){
provider.populate(widget, card, centerPane);
}
}
Set<ExtraButtonToolBarProvider> extraButtonSet = ExtraDesignClassManager.getInstance().getArray(ExtraButtonToolBarProvider.XML_TAG);
for (ExtraButtonToolBarProvider provider : extraButtonSet) {
provider.populate(widget, card, centerPane);
}
}
private void populateAppendColumnRow(){
card.show(centerPane, "appendcount");
count.setValue(((AppendColumnRow) widget).getCount());
}
private void populateExport(){
card.show(centerPane, "export");
Export export = (Export) widget;
@ -560,7 +560,7 @@ public class EditToolBar extends BasicPane {
}
}
}
private void populateCustomToolBarButton(){
card.show(centerPane, "custom");
CustomToolBarButton customToolBarButton = (CustomToolBarButton) widget;
@ -568,7 +568,7 @@ public class EditToolBar extends BasicPane {
this.javaScriptPane.populateBean(customToolBarButton.getJSImpl());
}
}
private void populateSubmit(){
card.show(centerPane, "submit");
Submit submit = ((Submit) widget);
@ -576,13 +576,13 @@ public class EditToolBar extends BasicPane {
this.failSubmit.setSelected(submit.isFailVerifySubmit());
this.isCurSheet.setSelected(submit.isOnlySubmitSelect());
}
private void populatePDFPrint(){
card.show(centerPane, "pdfprint");
PDFPrint pdfPrint = (PDFPrint) widget;
this.isPopup.setSelected(pdfPrint.isPopup());
}
private void populatePrint(){
card.show(centerPane, "print");
Print print = (Print) widget;
@ -591,7 +591,7 @@ public class EditToolBar extends BasicPane {
this.flashPrint.setSelected(print.isFlashPrint());
this.serverPrint.setSelected(print.isServerPrint());
}
private void populateDefault(){
Button button = (Button) widget;
this.icon.setSelected(button.isShowIcon());
@ -602,7 +602,7 @@ public class EditToolBar extends BasicPane {
/**
* 更新
*
*
* @return 对应组件
*/
public Widget update() {
@ -624,28 +624,28 @@ public class EditToolBar extends BasicPane {
updateDefault();
}
Set<ExtraButtonToolBarProvider> extraButtonSet = ExtraDesignClassManager.getInstance().getArray(ExtraButtonToolBarProvider.XML_TAG);
for(ExtraButtonToolBarProvider provider : extraButtonSet){
provider.update(widget);
}
Set<ExtraButtonToolBarProvider> extraButtonSet = ExtraDesignClassManager.getInstance().getArray(ExtraButtonToolBarProvider.XML_TAG);
for (ExtraButtonToolBarProvider provider : extraButtonSet) {
provider.update(widget);
}
return widget;
}
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(){
Submit submit = ((Submit) widget);
submit.setVerify(this.isVerify.isSelected());
submit.setFailVerifySubmit(this.failSubmit.isSelected());
submit.setOnlySubmitSelect(this.isCurSheet.isSelected());
}
private void updatePrint(){
Print print = (Print) widget;
print.setAppletPrint(this.appletPrint.isSelected());
@ -653,7 +653,7 @@ public class EditToolBar extends BasicPane {
print.setPDFPrint(this.pdfPrint.isSelected());
print.setServerPrint(this.serverPrint.isSelected());
}
private void updateExport(){
Export export = (Export) widget;
export.setPdfAvailable(this.pdf.isSelected());

7
designer_base/src/com/fr/design/fun/ExtraButtonToolBarProvider.java

@ -8,7 +8,6 @@ import java.awt.*;
/**
* 报表工具栏设计器端拓展用于配置按钮额外属性
*
* Created by harry on 2016-12-23.
*/
public interface ExtraButtonToolBarProvider extends Mutable {
@ -18,7 +17,6 @@ public interface ExtraButtonToolBarProvider extends Mutable {
int CURRENT_LEVEL = 1;
/**
*
* 用于添加属性面板
*
* @param centerPane 面板
@ -26,11 +24,10 @@ public interface ExtraButtonToolBarProvider extends Mutable {
void updateCenterPane(JPanel centerPane);
/**
*
* 更新界面
*
* @param widget 控件
* @param card 卡片布局
* @param widget 控件
* @param card 卡片布局
* @param centerPane 面板
*/
void populate(Widget widget, CardLayout card, JPanel centerPane);

Loading…
Cancel
Save