fr_shine 8 years ago
parent
commit
269d6a97ec
  1. 2
      .gitignore
  2. 9
      designer/designer.iml
  3. 13
      designer/src/com/fr/design/mainframe/CellElementPropertyPane.java
  4. 2
      designer/src/com/fr/design/mainframe/JWorkBook.java
  5. 4
      designer/src/com/fr/design/report/mobile/MobileUseHtmlGroupPane.java
  6. 2
      designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java
  7. 48
      designer/src/com/fr/design/webattr/EditToolBar.java
  8. 6
      designer/src/com/fr/design/webattr/ReportWebWidgetConstants.java
  9. 129
      designer/src/com/fr/design/widget/CellWidgetCardPane.java
  10. 4
      designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java
  11. 6
      designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java
  12. 6
      designer/src/com/fr/grid/selection/CellSelection.java
  13. 6
      designer/src/com/fr/grid/selection/FloatSelection.java
  14. 2
      designer/src/com/fr/grid/selection/Selection.java
  15. 4
      designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java
  16. 62
      designer_base/src/com/fr/design/actions/file/LocalePane.java
  17. 13
      designer_base/src/com/fr/design/beans/location/MoveUtils.java
  18. 2
      designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java
  19. 8
      designer_base/src/com/fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java
  20. 2
      designer_base/src/com/fr/design/extra/PluginHelper.java
  21. 418
      designer_base/src/com/fr/design/formula/FormulaPane.java
  22. 51
      designer_base/src/com/fr/design/formula/FunctionConstants.java
  23. 2
      designer_base/src/com/fr/design/formula/FunctionDefNAD.java
  24. 11
      designer_base/src/com/fr/design/formula/FunctionManagerPane.java
  25. 3
      designer_base/src/com/fr/design/fun/ConnectionProvider.java
  26. 41
      designer_base/src/com/fr/design/fun/ExtraButtonToolBarProvider.java
  27. 19
      designer_base/src/com/fr/design/fun/impl/AbstractExtraButtonToolBarProvider.java
  28. 5
      designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java
  29. 8
      designer_base/src/com/fr/design/gui/icombobox/UIComboBox.java
  30. 54
      designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java
  31. 10
      designer_base/src/com/fr/design/gui/itable/PropertyGroup.java
  32. 46
      designer_base/src/com/fr/design/locale/designer.properties
  33. 121
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  34. 126
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  35. 41
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  36. 45
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  37. 93
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  38. 3
      designer_base/src/com/fr/design/mainframe/DesignerFrame.java
  39. 2
      designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  40. 2
      designer_base/src/com/fr/design/mainframe/WestRegionContainerPane.java
  41. 6
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  42. 7
      designer_base/src/com/fr/design/style/color/ColorPicker.java
  43. 1
      designer_base/src/com/fr/design/style/color/ColorSelectBox.java
  44. 4
      designer_base/src/com/fr/env/RemoteEnv.java
  45. 2
      designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java
  46. 2
      designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane.java
  47. 2
      designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane4Chart.java
  48. 4
      designer_chart/src/com/fr/design/chart/report/MapCubeLayerPane.java
  49. 7
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java
  50. 11
      designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java
  51. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/BubblePlotTableDataContentPane.java
  52. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java
  53. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/StockPlotTableDataContentPane.java
  54. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/XYScatterPlotTableDataContentPane.java
  55. 16
      designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java
  56. 2
      designer_form/build.dev.gradle
  57. 13
      designer_form/src/com/fr/design/designer/beans/ConnectorCreator.java
  58. 4
      designer_form/src/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java
  59. 8
      designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java
  60. 9
      designer_form/src/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java
  61. 8
      designer_form/src/com/fr/design/designer/beans/location/AccessDirection.java
  62. 165
      designer_form/src/com/fr/design/designer/beans/location/Inner.java
  63. 16
      designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java
  64. 2
      designer_form/src/com/fr/design/designer/creator/XWFitLayout.java
  65. 2
      designer_form/src/com/fr/design/designer/creator/XWScaleLayout.java
  66. 2
      designer_form/src/com/fr/design/designer/creator/XWTitleLayout.java
  67. 80
      designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveAction.java
  68. 23
      designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveCustomAction.java
  69. 62
      designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveEndAction.java
  70. 59
      designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveFirstAction.java
  71. 58
      designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java
  72. 58
      designer_form/src/com/fr/design/designer/creator/cardlayout/TabMovePrevAction.java
  73. 10
      designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java
  74. 12
      designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java
  75. 4
      designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java
  76. 53
      designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java
  77. 20
      designer_form/src/com/fr/design/designer/properties/FRAbsoluteBodyLayoutPropertiesGroupModel.java
  78. 16
      designer_form/src/com/fr/design/designer/properties/mobile/BodyAppRelayoutTable.java
  79. 1
      designer_form/src/com/fr/design/designer/properties/mobile/BodyMobilePropertyUI.java
  80. 2
      designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java
  81. 4
      designer_form/src/com/fr/design/form/mobile/MobileUseHtmlGroupPane.java
  82. 6
      designer_form/src/com/fr/design/mainframe/ConnectorHelper.java
  83. 5
      designer_form/src/com/fr/design/mainframe/EditingMouseListener.java
  84. 311
      designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java
  85. 267
      designer_form/src/com/fr/design/mainframe/MobileBodyWidgetTable.java
  86. 428
      designer_form/src/com/fr/design/mainframe/MobileParaWidgetTable.java
  87. 449
      designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java
  88. 269
      designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

2
.gitignore vendored

@ -3,3 +3,5 @@ designer_base/bin
designer_chart/bin designer_chart/bin
designer_form/bin designer_form/bin
*.iml *.iml

9
designer/designer.iml

@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4"> <module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7" inherit-compiler-output="false"> <component name="NewModuleRootManager" inherit-compiler-output="true">
<output url="file://$MODULE_DIR$/../../env/WebReport/WEB-INF/classes" /> <exclude-output />
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content> </content>
<orderEntry type="jdk" jdkName="jdk1.8" jdkType="JavaSDK" /> <orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="designer_base" /> <orderEntry type="module" module-name="designer_base" />
<orderEntry type="library" name="lib" level="project" /> <orderEntry type="module" module-name="designer_form" />
<orderEntry type="module" module-name="designer_chart" />
</component> </component>
</module> </module>

13
designer/src/com/fr/design/mainframe/CellElementPropertyPane.java

@ -102,12 +102,23 @@ public class CellElementPropertyPane extends DockingView {
return element; return element;
} }
public void removeAll() {
this.remove(titlePane);
this.remove(cellElementEditPane);
}
public void reInit(ElementCasePane ePane) {
this.add(titlePane, BorderLayout.NORTH);
this.add(cellElementEditPane, BorderLayout.CENTER);
cellElementEditPane.populate(ePane);
}
public void populate(ElementCasePane ePane) { public void populate(ElementCasePane ePane) {
TemplateElementCase elementCase = ePane.getEditingElementCase(); TemplateElementCase elementCase = ePane.getEditingElementCase();
if (elementCase == null) { if (elementCase == null) {
return; return;
} }
cellElementEditPane.populate(ePane); ePane.getSelection().populatePropertyPane(ePane);
} }
@Override @Override

2
designer/src/com/fr/design/mainframe/JWorkBook.java

@ -463,7 +463,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
*/ */
public ShortCut[] shortCuts4Authority() { public ShortCut[] shortCuts4Authority() {
return new ShortCut[]{ return new ShortCut[]{
new NameSeparator(Inter.getLocText(new String[]{"DashBoard-Potence", "Edit"})), new NameSeparator(Inter.getLocText("FR-Designer_Permissions_Edition")),
BaseUtils.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this), BaseUtils.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this),
}; };

4
designer/src/com/fr/design/report/mobile/MobileUseHtmlGroupPane.java

@ -7,6 +7,10 @@ import com.fr.report.mobile.ElementCaseMobileAttr;
* Created by kunsnat on 2016/8/3. * Created by kunsnat on 2016/8/3.
*/ */
public class MobileUseHtmlGroupPane extends MobileUseHtmlGroupBeanPane<ElementCaseMobileAttr> { public class MobileUseHtmlGroupPane extends MobileUseHtmlGroupBeanPane<ElementCaseMobileAttr> {
public MobileUseHtmlGroupPane(String annotation) {
super(annotation);
}
@Override @Override
public void populateBean(ElementCaseMobileAttr mobileAttr) { public void populateBean(ElementCaseMobileAttr mobileAttr) {
if(mobileAttr != null) { if(mobileAttr != null) {

2
designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java

@ -34,7 +34,7 @@ public class ReportMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{
appFitBrowserPane.setAppFitPreviewPane(appFitPreviewPane); appFitBrowserPane.setAppFitPreviewPane(appFitPreviewPane);
jPanel.add(appFitBrowserPane); jPanel.add(appFitBrowserPane);
jPanel.add(htmlGroupPane = new MobileUseHtmlGroupPane()); jPanel.add(htmlGroupPane = new MobileUseHtmlGroupPane(Inter.getLocText("FR-Designer_Mobile_Report_Analysis_Annotation")));
jPanel.add(mobileToolBarPane = new MobileToolBarPane()); jPanel.add(mobileToolBarPane = new MobileToolBarPane());

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

@ -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());

6
designer/src/com/fr/design/webattr/ReportWebWidgetConstants.java

@ -78,13 +78,13 @@ public class ReportWebWidgetConstants {
public static final WidgetOption EDIT = WidgetOptionFactory.createByWidgetClass("Edit", Edit.class); public static final WidgetOption EDIT = WidgetOptionFactory.createByWidgetClass("Edit", Edit.class);
// 导出成Excel 分页导出 // 导出成Excel 分页导出
public static final WidgetOption EXCELP = WidgetOptionFactory.createByWidgetClass(Inter.getLocText(new String[]{"Excel", "Export-Excel-Page"}, new String[]{"(", ")"}), public static final WidgetOption EXCELP = WidgetOptionFactory.createByWidgetClass(Inter.getLocText(new String[]{"Excel", "FR-Designer_Export_Excel_Page"}, new String[]{"(", ")"}),
BaseUtils.readIcon("/com/fr/web/images/excel.png"), ExcelP.class); BaseUtils.readIcon("/com/fr/web/images/excel.png"), ExcelP.class);
// 导出成Excel 原样导出 // 导出成Excel 原样导出
public static final WidgetOption EXCELO = WidgetOptionFactory.createByWidgetClass(Inter.getLocText(new String[]{"Excel", "Export-Excel-Simple"}, new String[]{"(", ")"}), public static final WidgetOption EXCELO = WidgetOptionFactory.createByWidgetClass(Inter.getLocText(new String[]{"Excel", "FR-Designer_Export_Excel_Simple"}, new String[]{"(", ")"}),
BaseUtils.readIcon("/com/fr/web/images/excel.png"), ExcelO.class); BaseUtils.readIcon("/com/fr/web/images/excel.png"), ExcelO.class);
// 导出成Excel 分页分Sheet导出 // 导出成Excel 分页分Sheet导出
public static final WidgetOption EXCELS = WidgetOptionFactory.createByWidgetClass(Inter.getLocText(new String[]{"Excel", "Export-Excel-PageToSheet"}, new String[]{"(", ")"}), public static final WidgetOption EXCELS = WidgetOptionFactory.createByWidgetClass(Inter.getLocText(new String[]{"Excel", "FR-Designer_Export_Excel_PageToSheet"}, new String[]{"(", ")"}),
BaseUtils.readIcon("/com/fr/web/images/excel.png"), ExcelS.class); BaseUtils.readIcon("/com/fr/web/images/excel.png"), ExcelS.class);
// 导出成Word // 导出成Word

129
designer/src/com/fr/design/widget/CellWidgetCardPane.java

@ -20,24 +20,28 @@ import java.awt.*;
* carl :单独弄出来 * carl :单独弄出来
*/ */
public class CellWidgetCardPane extends BasicPane { public class CellWidgetCardPane extends BasicPane {
// 当前的编辑器属性定义面板 //当前的编辑器属性定义面板
private DataModify<? extends Widget> currentEditorDefinePane; private DataModify<? extends Widget> currentEditorDefinePane;
//属性配置切换面板
private JTabbedPane tabbedPane; private JTabbedPane tabbedPane;
private BasicWidgetPropertySettingPane widgetPropertyPane; private BasicWidgetPropertySettingPane widgetPropertyPane;
private JPanel attriPane;
private JPanel cardPane;
private CardLayout card;
private JPanel presPane; //通用属性容器
private JPanel cardPaneForPresent; private JPanel attriTabPane;
private CardLayout cardForPresent; private JPanel attriCardPane;
private CardLayout attriCardLayout;
private JPanel cardPaneForTreeSetting; //数字字典属性容器
private JPanel dictTabPane;
private JPanel dictCardPane;
private CardLayout dictCardLayout;
private JPanel formPane; //构建树属性容器
private WidgetEventPane eventTabPane; private JPanel treeTabPane;
//事件属性容器
private JPanel eventTabPane;
private WidgetEventPane eventPane;
public CellWidgetCardPane(ElementCasePane pane) { public CellWidgetCardPane(ElementCasePane pane) {
this.initComponents(pane); this.initComponents(pane);
@ -47,26 +51,26 @@ public class CellWidgetCardPane extends BasicPane {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
tabbedPane = new UITabbedPane(); tabbedPane = new UITabbedPane();
this.add(tabbedPane, BorderLayout.CENTER); this.add(tabbedPane, BorderLayout.CENTER);
attriPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); attriTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
formPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); eventTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
eventTabPane = new WidgetEventPane(pane); eventPane = new WidgetEventPane(pane);
formPane.add(eventTabPane, BorderLayout.CENTER); eventTabPane.add(eventPane, BorderLayout.CENTER);
tabbedPane.add(Inter.getLocText("FR-Designer_Attribute"), attriPane); tabbedPane.add(Inter.getLocText("FR-Designer_Attribute"), attriTabPane);
tabbedPane.add(Inter.getLocText("FR-Designer_Form_Editing_Listeners"), formPane); tabbedPane.add(Inter.getLocText("FR-Designer_Form_Editing_Listeners"), eventTabPane);
presPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); dictTabPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
cardPaneForPresent = FRGUIPaneFactory.createCardLayout_S_Pane(); dictCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
presPane.add(cardPaneForPresent, BorderLayout.CENTER); dictTabPane.add(dictCardPane, BorderLayout.CENTER);
cardForPresent = new CardLayout(); dictCardLayout = new CardLayout();
cardPaneForPresent.setLayout(cardForPresent); dictCardPane.setLayout(dictCardLayout);
cardPaneForTreeSetting = FRGUIPaneFactory.createBorderLayout_L_Pane(); treeTabPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
widgetPropertyPane = new BasicWidgetPropertySettingPane(); widgetPropertyPane = new BasicWidgetPropertySettingPane();
attriPane.add(widgetPropertyPane, BorderLayout.NORTH); attriTabPane.add(widgetPropertyPane, BorderLayout.NORTH);
cardPane = FRGUIPaneFactory.createCardLayout_S_Pane(); attriCardPane = FRGUIPaneFactory.createCardLayout_S_Pane();
attriPane.add(cardPane, BorderLayout.CENTER); attriTabPane.add(attriCardPane, BorderLayout.CENTER);
card = (CardLayout) cardPane.getLayout(); attriCardLayout = (CardLayout) attriCardPane.getLayout();
this.setPreferredSize(new Dimension(600, 450)); this.setPreferredSize(new Dimension(600, 450));
} }
@ -84,49 +88,53 @@ public class CellWidgetCardPane extends BasicPane {
this.tabbedPane.setEnabled(true); this.tabbedPane.setEnabled(true);
} }
attriPane.remove(widgetPropertyPane); attriTabPane.remove(widgetPropertyPane);
widgetPropertyPane = new BasicWidgetPropertySettingPane(); widgetPropertyPane = new BasicWidgetPropertySettingPane();
JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel northPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
northPane.setBorder(BorderFactory.createEmptyBorder(5, 8, 0, 8)); northPane.setBorder(BorderFactory.createEmptyBorder(5, 8, 0, 8));
JPanel basic = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Form_Basic_Properties")); JPanel basic = FRGUIPaneFactory.createTitledBorderPane(Inter.getLocText("FR-Designer_Form_Basic_Properties"));
northPane.add(basic); northPane.add(basic);
basic.add(widgetPropertyPane); basic.add(widgetPropertyPane);
attriPane.add(northPane, BorderLayout.NORTH); attriTabPane.add(northPane, BorderLayout.NORTH);
WidgetDefinePaneFactory.RN rn = WidgetDefinePaneFactory.createWidgetDefinePane(cellWidget, new Operator() { WidgetDefinePaneFactory.RN rn = WidgetDefinePaneFactory.createWidgetDefinePane(cellWidget, new Operator() {
@Override @Override
public void did(DataCreatorUI ui, String cardName) { public void did(DataCreatorUI ui, String cardName) {
if (ui == null) { if (ui == null) {
addPresPane(false); removeDictAttriPane();
addTreeSettingPane(false); removeTreeAttriPane();
} }
if (ui instanceof DictionaryPane) { if (ui instanceof DictionaryPane) {
removeDictAttriPane();
removeTreeAttriPane();
showDictPane(ui, cardName); showDictPane(ui, cardName);
} else if (ui instanceof TreeSettingPane) { } else if (ui instanceof TreeSettingPane) {
removeDictAttriPane();
removeTreeAttriPane();
showTreePane(ui); showTreePane(ui);
} }
} }
}); });
DataModify<? extends Widget> definePane = rn.getDefinePane(); DataModify<? extends Widget> definePane = rn.getDefinePane();
cardPane.add(definePane.toSwingComponent(), rn.getCardName()); attriCardPane.add(definePane.toSwingComponent(), rn.getCardName());
card.show(cardPane, rn.getCardName()); attriCardLayout.show(attriCardPane, rn.getCardName());
currentEditorDefinePane = definePane; currentEditorDefinePane = definePane;
eventTabPane.populate(cellWidget); eventPane.populate(cellWidget);
widgetPropertyPane.populate(cellWidget); widgetPropertyPane.populate(cellWidget);
tabbedPane.setSelectedIndex(0); tabbedPane.setSelectedIndex(0);
} }
private void showDictPane(DataCreatorUI ui, String cardName) { private void showDictPane(DataCreatorUI ui, String cardName) {
cardPaneForPresent.removeAll(); dictCardPane.removeAll();
cardPaneForPresent.add(ui.toSwingComponent(), cardName); dictCardPane.add(ui.toSwingComponent(), cardName);
cardForPresent.show(cardPaneForPresent, cardName); dictCardLayout.show(dictCardPane, cardName);
addPresPane(true); addDictAttriPane();
} }
private void showTreePane(DataCreatorUI ui) { private void showTreePane(DataCreatorUI ui) {
cardPaneForTreeSetting.removeAll(); treeTabPane.removeAll();
cardPaneForTreeSetting.add(ui.toSwingComponent()); treeTabPane.add(ui.toSwingComponent());
addTreeSettingPane(true); addTreeAttriPane();
} }
public Widget update() { public Widget update() {
@ -139,7 +147,7 @@ public class CellWidgetCardPane extends BasicPane {
} }
widgetPropertyPane.update(widget); widgetPropertyPane.update(widget);
Listener[] listener = eventTabPane == null ? new Listener[0] : eventTabPane.updateListeners(); Listener[] listener = eventPane == null ? new Listener[0] : eventPane.updateListeners();
widget.clearListeners(); widget.clearListeners();
for (Listener l : listener) { for (Listener l : listener) {
widget.addListener(l); widget.addListener(l);
@ -155,25 +163,26 @@ public class CellWidgetCardPane extends BasicPane {
*/ */
public void checkValid() throws Exception { public void checkValid() throws Exception {
currentEditorDefinePane.checkValid(); currentEditorDefinePane.checkValid();
eventTabPane.checkValid(); eventPane.checkValid();
} }
//:jackie 如果选择的项有形态,则将形态面板加入tab面板
private void addPresPane(boolean add) { private void addDictAttriPane() {
if (add) { tabbedPane.add(this.dictTabPane, 1);
tabbedPane.add(this.presPane, 1); tabbedPane.setTitleAt(1, Inter.getLocText("FR-Designer_DS_Dictionary"));
tabbedPane.setTitleAt(1, Inter.getLocText("FR-Designer_DS_Dictionary"));
} else {
tabbedPane.remove(presPane);
}
} }
private void addTreeSettingPane(boolean add) { private void addTreeAttriPane() {
if (add) { tabbedPane.add(this.treeTabPane, 1);
tabbedPane.add(this.cardPaneForTreeSetting, 1); tabbedPane.setTitleAt(1, Inter.getLocText("FR-Designer_Create_Tree"));
tabbedPane.setTitleAt(1, Inter.getLocText("FR-Designer_Create_Tree")); }
} else {
tabbedPane.remove(this.cardPaneForTreeSetting); private void removeDictAttriPane() {
} tabbedPane.remove(this.dictTabPane);
} }
}
private void removeTreeAttriPane() {
tabbedPane.remove(this.treeTabPane);
}
}

4
designer/src/com/fr/design/widget/ui/FieldEditorDefinePane.java

@ -20,7 +20,7 @@ import com.fr.form.ui.FieldEditor;
import com.fr.general.Inter; import com.fr.general.Inter;
public abstract class FieldEditorDefinePane<T extends FieldEditor> extends AbstractDataModify<T> { public abstract class FieldEditorDefinePane<T extends FieldEditor> extends AbstractDataModify<T> {
private static final int ALLOW_BLANK_CHECK_BOX_WIDTH = GraphHelper.getLocTextWidth("FR-Designer_Allow_Blank") + 30; private static final int ALLOW_BLANK_CHECK_BOX_WIDTH = GraphHelper.getLocTextWidth("FR-Designer_Allow_Null") + 30;
private static final int ALLOW_BLANK_CHECK_BOX_HEIGHT = 30; private static final int ALLOW_BLANK_CHECK_BOX_HEIGHT = 30;
private UICheckBox allowBlankCheckBox; private UICheckBox allowBlankCheckBox;
// richer:错误信息,是所有控件共有的属性,所以放到这里来 // richer:错误信息,是所有控件共有的属性,所以放到这里来
@ -39,7 +39,7 @@ public abstract class FieldEditorDefinePane<T extends FieldEditor> extends Abstr
initRegErrorMsgTextField(); initRegErrorMsgTextField();
//JPanel firstPanel = FRGUIPaneFactory.createBorderLayout_M_Pane(); //JPanel firstPanel = FRGUIPaneFactory.createBorderLayout_M_Pane();
allowBlankCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Blank")); allowBlankCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Allow_Null"));
allowBlankCheckBox.setPreferredSize(new Dimension(ALLOW_BLANK_CHECK_BOX_WIDTH, ALLOW_BLANK_CHECK_BOX_HEIGHT)); allowBlankCheckBox.setPreferredSize(new Dimension(ALLOW_BLANK_CHECK_BOX_WIDTH, ALLOW_BLANK_CHECK_BOX_HEIGHT));
allowBlankCheckBox.addItemListener(new ItemListener() { allowBlankCheckBox.addItemListener(new ItemListener() {

6
designer/src/com/fr/design/widget/ui/TextFieldEditorDefinePane.java

@ -61,11 +61,7 @@ public class TextFieldEditorDefinePane extends FieldEditorDefinePane<TextEditor>
regPane.getRegComboBox().addActionListener(new ActionListener() { regPane.getRegComboBox().addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
RegExp regExp = (RegExp) regPane.getRegComboBox().getSelectedItem(); RegExp regExp = (RegExp) regPane.getRegComboBox().getSelectedItem();
if (!StringUtils.isNotEmpty(regExp.toRegText())) { getRegErrorMsgTextField().setEnabled(regExp.errorMessageEditable());
getRegErrorMsgTextField().setEnabled(false);
} else {
getRegErrorMsgTextField().setEnabled(true);
}
} }
}); });

6
designer/src/com/fr/grid/selection/CellSelection.java

@ -18,6 +18,7 @@ import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.imenu.UIMenu; import com.fr.design.gui.imenu.UIMenu;
import com.fr.design.gui.imenu.UIPopupMenu; import com.fr.design.gui.imenu.UIPopupMenu;
import com.fr.design.mainframe.CellElementPropertyPane;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.mainframe.ElementCasePane.Clear; import com.fr.design.mainframe.ElementCasePane.Clear;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
@ -684,4 +685,9 @@ public class CellSelection extends Selection {
editor.populate(tc); editor.populate(tc);
return editor; return editor;
} }
@Override
public void populatePropertyPane(ElementCasePane ePane) {
CellElementPropertyPane.getInstance().reInit(ePane);
}
} }

6
designer/src/com/fr/grid/selection/FloatSelection.java

@ -20,6 +20,7 @@ import com.fr.design.cell.clipboard.CellElementsClip;
import com.fr.design.cell.clipboard.ElementsTransferable; import com.fr.design.cell.clipboard.ElementsTransferable;
import com.fr.design.cell.clipboard.FloatElementsClip; import com.fr.design.cell.clipboard.FloatElementsClip;
import com.fr.design.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
import com.fr.design.mainframe.CellElementPropertyPane;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
@ -230,4 +231,9 @@ public class FloatSelection extends Selection {
editor.populate(tc); editor.populate(tc);
return editor; return editor;
} }
@Override
public void populatePropertyPane(ElementCasePane ePane) {
CellElementPropertyPane.getInstance().removeAll();
}
} }

2
designer/src/com/fr/grid/selection/Selection.java

@ -87,6 +87,8 @@ public abstract class Selection implements FCloneable, Serializable , Selectable
// //////////////////////////Just4CellSelection/////////////////////////////// // //////////////////////////Just4CellSelection///////////////////////////////
public abstract boolean containsColumnRow(ColumnRow cr); public abstract boolean containsColumnRow(ColumnRow cr);
public abstract void populatePropertyPane(ElementCasePane ePane);
@Override @Override

4
designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java

@ -161,7 +161,7 @@ public class BottomCornerMouseHanlder extends MouseInputAdapter {
* @param isIntersects 是否重叠 * @param isIntersects 是否重叠
*/ */
@Override @Override
public void setWidgetsIntersects(boolean isIntersects) { public void setWidgetsIntersected(boolean isIntersects) {
} }
/** /**
@ -170,7 +170,7 @@ public class BottomCornerMouseHanlder extends MouseInputAdapter {
* @return 重叠 * @return 重叠
*/ */
@Override @Override
public boolean getWidgetsIntersects() { public boolean isWidgetsIntersected() {
return false; return false;
} }

62
designer_base/src/com/fr/design/actions/file/LocalePane.java

@ -27,6 +27,8 @@ import com.fr.design.dialog.BasicPane;
import com.fr.file.filetree.FileNode; import com.fr.file.filetree.FileNode;
import com.fr.general.*; import com.fr.general.*;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
/** /**
@ -51,8 +53,8 @@ public class LocalePane extends BasicPane {
add(tabbedPane, BorderLayout.CENTER); add(tabbedPane, BorderLayout.CENTER);
predefineTableModel = new DefaultTableModel() { predefineTableModel = new DefaultTableModel() {
public boolean isCellEditable(int col, int row) { public boolean isCellEditable(int row, int column) {
return false; return column == 0;
} }
}; };
@ -109,23 +111,39 @@ public class LocalePane extends BasicPane {
} }
private void initPredefinedProperties() { private void initPredefinedProperties() {
Map<Locale, LocalePackage> map = Inter.getPredefinedPackageMap();
LocalePackage chinese = map.get(Locale.SIMPLIFIED_CHINESE); Map<Locale, String> supportLocaleMap = Inter.getSupportLocaleMap();
String[] localeFiles = StableFactory.getLocaleFiles();
List<String> sortKeys = new ArrayList<String>(); List<String> sortKeys = new ArrayList<String>();
Set<ResourceBundle> bundles = chinese.getKindsOfResourceBundle(); for (String path : localeFiles) {
for (ResourceBundle bundle : bundles) { ResourceBundle chineseBundle = loadResourceBundle(path, Locale.SIMPLIFIED_CHINESE);
sortKeys.addAll(bundle.keySet()); sortKeys.addAll(chineseBundle.keySet());
} }
Collections.sort(sortKeys); Collections.sort(sortKeys);
Map<Locale, List<ResourceBundle>> localeResourceBundleMap = new HashMap<Locale, List<ResourceBundle>>();
for (Map.Entry<Locale, String> entry : supportLocaleMap.entrySet()) {
Locale locale = entry.getKey();
List<ResourceBundle> list = new ArrayList<>();
for (String path : localeFiles) {
ResourceBundle chineseBundle = loadResourceBundle(path, locale);
list.add(chineseBundle);
}
localeResourceBundleMap.put(locale, list);
}
Map<Locale, Vector<String>> data = new HashMap<Locale, Vector<String>>(); Map<Locale, Vector<String>> data = new HashMap<Locale, Vector<String>>();
for (Map.Entry<Locale, LocalePackage> entry : map.entrySet()) { for (Map.Entry<Locale, List<ResourceBundle>> entry : localeResourceBundleMap.entrySet()) {
Vector<String> column = new Vector<String>(); Vector<String> column = new Vector<String>();
List<ResourceBundle> rbs = entry.getValue();
for (String key : sortKeys) { for (String key : sortKeys) {
column.add(entry.getValue().getLocText(key)); column.add(readText(rbs, key));
} }
data.put(entry.getKey(), column); data.put(entry.getKey(), column);
} }
@ -140,6 +158,19 @@ public class LocalePane extends BasicPane {
} }
} }
private String readText(List<ResourceBundle> rbs, String key) {
for (ResourceBundle rb : rbs) {
if (rb.containsKey(key)) {
return rb.getString(key);
}
}
return null;
}
private ResourceBundle loadResourceBundle(String dir, Locale locale) {
return ResourceBundle.getBundle(dir, locale, Inter.class.getClassLoader());
}
private void initCustomProperties() throws Exception { private void initCustomProperties() throws Exception {
Env env = FRContext.getCurrentEnv(); Env env = FRContext.getCurrentEnv();
if (env == null) { if (env == null) {
@ -176,22 +207,9 @@ public class LocalePane extends BasicPane {
} }
} }
private Properties loadLocaleProperties(String name) {
Properties properties = new Properties();
InputStream inputStream = IOUtils.readResource("/com/fr/general/locale/" + name);
try {
properties.load(inputStream);
} catch (IOException e) {
FRLogger.getLogger().error(e.getMessage());
}
return properties;
}
/** /**
* 保存当前编辑的国际化 * 保存当前编辑的国际化
* *
*
* @date 2014-9-30-下午3:10:30
*/ */
public void save() { public void save() {
Env env = FRContext.getCurrentEnv(); Env env = FRContext.getCurrentEnv();

13
designer_base/src/com/fr/design/beans/location/MoveUtils.java

@ -16,6 +16,7 @@ import java.util.ArrayList;
public class MoveUtils { public class MoveUtils {
public static final int SORPTION_UNIT = 5; public static final int SORPTION_UNIT = 5;
private static final int EQUIDISTANTLINE_UNIT = 4;
public static WidgetForbidWindow widgetForbidWindow = new WidgetForbidWindow(); public static WidgetForbidWindow widgetForbidWindow = new WidgetForbidWindow();
@ -77,13 +78,13 @@ public class MoveUtils {
* 设置designer内部组件是否重叠的标志位 * 设置designer内部组件是否重叠的标志位
* @param isIntersects 是否重叠 * @param isIntersects 是否重叠
*/ */
void setWidgetsIntersects(boolean isIntersects); void setWidgetsIntersected(boolean isIntersects);
/** /**
* 获取designer内部组件是否重叠的标志位 * 获取designer内部组件是否重叠的标志位
* @return 重叠 * @return 重叠
*/ */
boolean getWidgetsIntersects(); boolean isWidgetsIntersected();
/** /**
* 获取designer相对屏幕的位置 * 获取designer相对屏幕的位置
@ -357,10 +358,10 @@ public class MoveUtils {
if(designer.getDesignerLocationOnScreen() != null) { if(designer.getDesignerLocationOnScreen() != null) {
displayForbidWindow(x + designer.getDesignerLocationOnScreen().x, y + designer.getDesignerLocationOnScreen().y); displayForbidWindow(x + designer.getDesignerLocationOnScreen().x, y + designer.getDesignerLocationOnScreen().y);
} }
designer.setWidgetsIntersects(true); designer.setWidgetsIntersected(true);
} }
else{ else{
designer.setWidgetsIntersects(false); designer.setWidgetsIntersected(false);
hideForbidWindow(); hideForbidWindow();
} }
} }
@ -479,10 +480,10 @@ public class MoveUtils {
} }
private static void processEquidistantLinesList(PlacePointing pEquidistantX, PlacePointing pEquidistantY, Rectangle operatingRectangle){ private static void processEquidistantLinesList(PlacePointing pEquidistantX, PlacePointing pEquidistantY, Rectangle operatingRectangle){
EquidistantLine[] equidistantLines1 = new EquidistantLine[4]; EquidistantLine[] equidistantLines1 = new EquidistantLine[EQUIDISTANTLINE_UNIT];
//先按方向处理,只保留四个方向上距离最近 //先按方向处理,只保留四个方向上距离最近
for(int count = 0; count < equidistantLines.size(); count++){ for(int count = 0; count < equidistantLines.size(); count++){
for (int direction = 0; direction < 4; direction++){ for (int direction = 0; direction < EQUIDISTANTLINE_UNIT; direction++){
if(equidistantLines.get(count).getDirection() == (direction + 1)){//direction 1,2,3,4 分别对应top,left,bottom,right if(equidistantLines.get(count).getDirection() == (direction + 1)){//direction 1,2,3,4 分别对应top,left,bottom,right
if(equidistantLines1[direction] != null if(equidistantLines1[direction] != null
&& equidistantLines1[direction].getDistance() > equidistantLines.get(count).getDistance() && equidistantLines1[direction].getDistance() > equidistantLines.get(count).getDistance()

2
designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java

@ -84,7 +84,7 @@ public class TableDataTreePane extends BasicTableDataTreePane {
GeneralContext.addPluginReadListener(new PluginReadListener() { GeneralContext.addPluginReadListener(new PluginReadListener() {
@Override @Override
public void success() { public void success(Status status) {
addMenuDef.clearShortCuts(); addMenuDef.clearShortCuts();
createAddMenuDef(); createAddMenuDef();
} }

8
designer_base/src/com/fr/design/dialog/mobile/MobileUseHtmlGroupBeanPane.java

@ -23,11 +23,11 @@ public abstract class MobileUseHtmlGroupBeanPane<T> extends BasicBeanPane<T> {
private List<UIRadioButton> radioButtons = new ArrayList<UIRadioButton>(); private List<UIRadioButton> radioButtons = new ArrayList<UIRadioButton>();
public MobileUseHtmlGroupBeanPane() { public MobileUseHtmlGroupBeanPane(String annotation) {
initComponents(); initComponents(annotation);
} }
private void initComponents() { private void initComponents(String annotation) {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(UITitledBorder.createBorderWithTitle(this.title4PopupWindow())); this.setBorder(UITitledBorder.createBorderWithTitle(this.title4PopupWindow()));
@ -43,7 +43,7 @@ public abstract class MobileUseHtmlGroupBeanPane<T> extends BasicBeanPane<T> {
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
new Component[]{new UILabel(Inter.getLocText("FR-mobile_analysis_style")), useApp, useHTML5}, new Component[]{new UILabel(Inter.getLocText("FR-mobile_analysis_style")), useApp, useHTML5},
new Component[]{new UILabel(Inter.getLocText("FR-mobile_analysis_annotation")), null, null} new Component[]{new UILabel(annotation), null, null}
}; };
JPanel usePane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize); JPanel usePane = TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize);
usePane.setBorder(BorderFactory.createEmptyBorder(10, 13, 10, 10)); usePane.setBorder(BorderFactory.createEmptyBorder(10, 13, 10, 10));

2
designer_base/src/com/fr/design/extra/PluginHelper.java

@ -256,7 +256,7 @@ public class PluginHelper {
if (PluginLoader.getLoader().isInstalled(plugin)) { if (PluginLoader.getLoader().isInstalled(plugin)) {
throw new com.fr.plugin.PluginVerifyException(Inter.getLocText("FR-Designer-Plugin_Has_Been_Installed")); throw new com.fr.plugin.PluginVerifyException(Inter.getLocText("FR-Designer-Plugin_Has_Been_Installed"));
} }
if (plugin.isJarExpired()) { if (plugin.checkIfJarExpired()) {
String jarExpiredInfo = Inter.getLocText(new String[]{"FR-Designer-Plugin_Jar_Expired", ",", "FR-Designer-Plugin_Install_Failed", ",", "FR-Designer-Plugin_Please_Update_Jar", plugin.getRequiredJarTime()}); String jarExpiredInfo = Inter.getLocText(new String[]{"FR-Designer-Plugin_Jar_Expired", ",", "FR-Designer-Plugin_Install_Failed", ",", "FR-Designer-Plugin_Please_Update_Jar", plugin.getRequiredJarTime()});
FRLogger.getLogger().error(jarExpiredInfo); FRLogger.getLogger().error(jarExpiredInfo);
throw new com.fr.plugin.PluginVerifyException(jarExpiredInfo); throw new com.fr.plugin.PluginVerifyException(jarExpiredInfo);

418
designer_base/src/com/fr/design/formula/FormulaPane.java

@ -32,10 +32,12 @@ import javax.swing.event.ListSelectionListener;
import javax.swing.event.TreeSelectionEvent; import javax.swing.event.TreeSelectionEvent;
import javax.swing.event.TreeSelectionListener; import javax.swing.event.TreeSelectionListener;
import javax.swing.tree.*; import javax.swing.tree.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
import java.io.*; import java.io.*;
import java.util.Locale; import java.util.Locale;
import java.util.Set;
/** /**
* 公式编辑面板 * 公式编辑面板
* @editor zhou * @editor zhou
@ -60,29 +62,16 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
public FormulaPane() { public FormulaPane() {
initComponents(); initComponents();
} }
protected void initComponents() { private void initFormulaTextAreaKeyListener(){
this.setLayout(new BorderLayout(4, 4)); formulaTextArea.addKeyListener(this);
formulaTextArea.addKeyListener(new KeyAdapter() {
// text
JPanel textPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(textPane, BorderLayout.CENTER);
JPanel checkBoxandbuttonPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
UILabel formulaLabel = new UILabel(Inter.getLocText("FormulaD-Input_formula_in_the_text_area_below") + ":"
+ " ");
formulaLabel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
formulaTextArea = new RSyntaxTextArea();
configFormulaArea();
formulaTextArea.addKeyListener(this);
formulaTextArea.addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent e) { public void keyReleased(KeyEvent e) {
formulaTextArea.setForeground(Color.black); formulaTextArea.setForeground(Color.black);
String text = formulaTextArea.getText(); String text = formulaTextArea.getText();
// 判断在中文输入状态是否还包含提示符 要删掉 // 判断在中文输入状态是否还包含提示符 要删掉
String tip = "\n\n\n" + Inter.getLocText("Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column"); //Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column
String tip = "\n\n\n" + Inter.getLocText("FR-Designer_FormulaPane_Tips");
if(text.contains(tip)) { if(text.contains(tip)) {
text = text.substring(0, text.indexOf(tip)); text = text.substring(0, text.indexOf(tip));
insertPosition = 0; insertPosition = 0;
@ -90,9 +79,10 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
} }
} }
}); });
}
formulaTextArea.addMouseListener(new MouseAdapter() {
private void initFormulaTextAreaMouseListener(){
formulaTextArea.addMouseListener(new MouseAdapter() {
@Override @Override
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
insertPosition = formulaTextArea.getCaretPosition(); insertPosition = formulaTextArea.getCaretPosition();
@ -115,52 +105,81 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
} }
} }
}); });
UIScrollPane formulaTextAreaScrollPane = new UIScrollPane(formulaTextArea); }
formulaTextAreaScrollPane.setBorder(null);
textPane.add(formulaLabel, BorderLayout.NORTH); private void initFormulaTextArea(){
textPane.add(formulaTextAreaScrollPane, BorderLayout.CENTER); formulaTextArea = new RSyntaxTextArea();
textPane.add(checkBoxandbuttonPane, BorderLayout.SOUTH); configFormulaArea();
initFormulaTextAreaKeyListener();
// tipsPane initFormulaTextAreaMouseListener();
JPanel tipsPane = new JPanel(new BorderLayout(4, 4)); }
this.add(tipsPane, BorderLayout.EAST);
private void initKeyWordTextFieldKeyListener(){
JPanel searchPane = new JPanel(new BorderLayout(4, 4)); keyWordTextField.addKeyListener(new KeyListener() {
searchPane.add(keyWordTextField, BorderLayout.CENTER);
UIButton searchButton = new UIButton(Inter.getLocText("Search"));
searchPane.add(searchButton, BorderLayout.EAST);
tipsPane.add(searchPane, BorderLayout.NORTH);
keyWordTextField.addKeyListener(new KeyListener() {
@Override @Override
public void keyTyped(KeyEvent e) { public void keyTyped(KeyEvent e) {
} }
@Override @Override
public void keyReleased(KeyEvent e) { public void keyReleased(KeyEvent e) {
} }
@Override @Override
public void keyPressed(KeyEvent e) { public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER) { if (e.getKeyCode() == KeyEvent.VK_ENTER) {
String toFind = keyWordTextField.getText(); String toFind = keyWordTextField.getText();
search(toFind, false); search(toFind, false);
fixFunctionNameList(); fixFunctionNameList();
e.consume(); e.consume();
} }
} }
}); });
}
private void initTipsPane(){
// tipsPane
JPanel tipsPane = new JPanel(new BorderLayout(4, 4));
this.add(tipsPane, BorderLayout.EAST);
JPanel searchPane = new JPanel(new BorderLayout(4, 4));
searchPane.add(keyWordTextField, BorderLayout.CENTER);
UIButton searchButton = new UIButton(Inter.getLocText("FR-Designer_FormulaPane_Search"));
searchPane.add(searchButton, BorderLayout.EAST);
tipsPane.add(searchPane, BorderLayout.NORTH);
initKeyWordTextFieldKeyListener();
tipsList = new JList(listModel); tipsList = new JList(listModel);
tipsList.addMouseListener(new DoubleClick()); tipsList.addMouseListener(new DoubleClick());
UIScrollPane tipsScrollPane = new UIScrollPane(tipsList); UIScrollPane tipsScrollPane = new UIScrollPane(tipsList);
tipsScrollPane.setPreferredSize(new Dimension(170, 75)); tipsScrollPane.setPreferredSize(new Dimension(170, 75));
tipsScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); tipsScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC));
tipsPane.add(tipsScrollPane, BorderLayout.CENTER); tipsPane.add(tipsScrollPane, BorderLayout.CENTER);
searchButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
String toFind = keyWordTextField.getText();
search(toFind, false);
formulaTextArea.requestFocusInWindow();
fixFunctionNameList();
}
});
}
protected void initComponents() {
this.setLayout(new BorderLayout(4, 4));
// text
JPanel textPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
this.add(textPane, BorderLayout.CENTER);
JPanel checkBoxandbuttonPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
UILabel formulaLabel = new UILabel(Inter.getLocText("FormulaD-Input_formula_in_the_text_area_below") + ":"
+ " ");
formulaLabel.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
initFormulaTextArea();
UIScrollPane formulaTextAreaScrollPane = new UIScrollPane(formulaTextArea);
formulaTextAreaScrollPane.setBorder(null);
textPane.add(formulaLabel, BorderLayout.NORTH);
textPane.add(formulaTextAreaScrollPane, BorderLayout.CENTER);
textPane.add(checkBoxandbuttonPane, BorderLayout.SOUTH);
initTipsPane();
UIButton checkValidButton = new UIButton(Inter.getLocText("FormulaD-Check_Valid")); UIButton checkValidButton = new UIButton(Inter.getLocText("FormulaD-Check_Valid"));
checkValidButton.addActionListener(checkValidActionListener); checkValidButton.addActionListener(checkValidActionListener);
@ -169,20 +188,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
checkBoxPane.setPreferredSize(new Dimension(450, 30)); checkBoxPane.setPreferredSize(new Dimension(450, 30));
checkBoxandbuttonPane.add(checkBoxPane, BorderLayout.WEST); checkBoxandbuttonPane.add(checkBoxPane, BorderLayout.WEST);
checkBoxandbuttonPane.add(checkValidButton, BorderLayout.EAST); checkBoxandbuttonPane.add(checkValidButton, BorderLayout.EAST);
extendCheckBoxPane(checkBoxPane); extendCheckBoxPane(checkBoxPane);
searchButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
String toFind = keyWordTextField.getText();
search(toFind, false);
formulaTextArea.requestFocusInWindow();
fixFunctionNameList();
}
});
variableTreeAndDescriptionArea = new VariableTreeAndDescriptionArea(); variableTreeAndDescriptionArea = new VariableTreeAndDescriptionArea();
this.add(variableTreeAndDescriptionArea, BorderLayout.SOUTH); this.add(variableTreeAndDescriptionArea, BorderLayout.SOUTH);
} }
@ -253,11 +259,17 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
this.formulaTextArea.setText(StringUtils.EMPTY); this.formulaTextArea.setText(StringUtils.EMPTY);
} }
} }
//hugh:为啥会是10呢?搞不懂~~~
private static final int KEY_10 = 10;
//上下左右
private static final int KEY_37 = 37;
private static final int KEY_38 = 38;
private static final int KEY_39 = 39;
private static final int KEY_40 = 40;
@Override @Override
public void keyReleased(KeyEvent e) { public void keyReleased(KeyEvent e) {
int key = e.getKeyCode(); int key = e.getKeyCode();
if (key == 38 || key == 40 || key == 37 || key == 39 || key == 10) //如果是删除符号 ,为了可读性 没有和其他按键的程序相融合 if (key == KEY_38 || key == KEY_40 || key == KEY_37 || key == KEY_39 || key == KEY_10) //如果是删除符号 ,为了可读性 没有和其他按键的程序相融合
{ {
listModel.removeAllElements(); listModel.removeAllElements();
currentPosition = formulaTextArea.getCaretPosition(); currentPosition = formulaTextArea.getCaretPosition();
@ -461,7 +473,8 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
String content = formula.getContent(); String content = formula.getContent();
if (content.trim().equals("=")) { if (content.trim().equals("=")) {
this.formulaTextArea.setForeground(Color.gray); this.formulaTextArea.setForeground(Color.gray);
this.formulaTextArea.setText("\n\n\n" + Inter.getLocText("Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column")); //Tips:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column
this.formulaTextArea.setText("\n\n\n" + Inter.getLocText("FR-Designer_FormulaPane_Tips"));
this.formulaTextArea.setCaretPosition(0); this.formulaTextArea.setCaretPosition(0);
ifHasBeenWriten = 0; ifHasBeenWriten = 0;
this.listModel.removeAllElements(); this.listModel.removeAllElements();
@ -548,22 +561,21 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
public VariableTreeAndDescriptionArea() { public VariableTreeAndDescriptionArea() {
this.initComponents(); this.initComponents();
} }
private void initComponents() { private void initFunctionTypeList(JPanel functionPane){
this.setLayout(new BorderLayout(4, 4)); functionTypeList = new QuickList(functionTypeListModel);
// Function
JPanel functionPane = new JPanel(new BorderLayout(4, 4));
this.add(functionPane, BorderLayout.WEST);
functionTypeList = new QuickList(functionTypeListModel);
UIScrollPane functionTypeScrollPane = new UIScrollPane(functionTypeList); UIScrollPane functionTypeScrollPane = new UIScrollPane(functionTypeList);
functionTypeScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); functionTypeScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC));
functionTypeScrollPane.setPreferredSize(new Dimension(140, 200)); functionTypeScrollPane.setPreferredSize(new Dimension(140, 200));
functionPane.add(this.createNamePane(Inter.getLocText("FormulaD-Function_category") + ":", functionTypeScrollPane), BorderLayout.WEST); functionPane.add(this.createNamePane(Inter.getLocText("FormulaD-Function_category") + ":", functionTypeScrollPane), BorderLayout.WEST);
functionTypeList.setCellRenderer(new DefaultListCellRenderer() { initTypeListCellRenderer();
initGroupTypeModel();
initTypeListSelectionListener();
}
private void initTypeListCellRenderer(){
functionTypeList.setCellRenderer(
new DefaultListCellRenderer() {
@Override @Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
@ -573,48 +585,44 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
return this; return this;
} }
}); });
}
functionTypeListModel.addElement(FunctionConstants.COMMON);
for (int i = 0; i < FunctionConstants.EMBFUNCTIONS.length; i++) { private void initTypeListSelectionListener(){
functionTypeListModel.addElement(FunctionConstants.EMBFUNCTIONS[i]); functionTypeList.addListSelectionListener(new ListSelectionListener() {
}
functionTypeListModel.addElement(FunctionConstants.ALL);
functionTypeListModel.addElement(FunctionConstants.CUSTOM);
functionTypeListModel.addElement(FunctionConstants.PLUGIN);
functionTypeList.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent evt) { public void valueChanged(ListSelectionEvent evt) {
Object selectedValue = ((JList) evt.getSource()).getSelectedValue(); Object selectedValue = ((JList) evt.getSource()).getSelectedValue();
if (!(selectedValue instanceof FunctionGroup)) { if (!(selectedValue instanceof FunctionGroup)) {
return; return;
} }
NameAndDescription[] nads = ((FunctionGroup) selectedValue).getDescriptions(); NameAndDescription[] nads = ((FunctionGroup) selectedValue).getDescriptions();
functionNameModel = (DefaultListModel) functionNameList.getModel(); functionNameModel = (DefaultListModel) functionNameList.getModel();
functionNameModel.clear(); functionNameModel.clear();
for (NameAndDescription nad : nads) { for (NameAndDescription nad : nads) {
functionNameModel.addElement(nad); functionNameModel.addElement(nad);
} }
if (functionNameModel.size() > 0) { if (functionNameModel.size() > 0) {
functionNameList.setSelectedIndex(0); functionNameList.setSelectedIndex(0);
functionNameList.ensureIndexIsVisible(0); functionNameList.ensureIndexIsVisible(0);
} }
} }
}); });
}
functionNameList = new JList(new DefaultListModel());
UIScrollPane functionNameScrollPane = new UIScrollPane(functionNameList); private void initGroupTypeModel(){
functionNameScrollPane.setPreferredSize(new Dimension(140, 200)); functionTypeListModel.addElement(FunctionConstants.COMMON);
functionPane.add( for (int i = 0; i < FunctionConstants.EMBFUNCTIONS.length; i++) {
this.createNamePane(Inter.getLocText("FormulaD-Function_name") + ":", functionNameScrollPane), functionTypeListModel.addElement(FunctionConstants.EMBFUNCTIONS[i]);
BorderLayout.CENTER); }
functionNameScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); functionTypeListModel.addElement(FunctionConstants.ALL);
functionTypeListModel.addElement(FunctionConstants.CUSTOM);
functionNameList.setCellRenderer(new DefaultListCellRenderer() { functionTypeListModel.addElement(FunctionConstants.PLUGIN);
//hugh: 从函数分组插件中添加分组
FunctionConstants.addFunctionGroupFromPlugins(functionTypeListModel);
}
private void initFunctionNameListCellRenderer(){
functionNameList.setCellRenderer(new DefaultListCellRenderer() {
@Override @Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
@ -625,8 +633,10 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
return this; return this;
} }
}); });
}
functionNameList.addListSelectionListener(new ListSelectionListener() {
private void initFunctionNameListSelectionListener(){
functionNameList.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent evt) { public void valueChanged(ListSelectionEvent evt) {
Object selectedValue = functionNameList.getSelectedValue(); Object selectedValue = functionNameList.getSelectedValue();
@ -640,11 +650,11 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
descriptionTextArea.moveCaretPosition(0); descriptionTextArea.moveCaretPosition(0);
} }
}); });
}
functionNameList.addMouseListener(new MouseAdapter() {
private void initFunctionNameListMouseListener(){
functionNameList.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent evt) { public void mouseClicked(MouseEvent evt) {
if (evt.getClickCount() >= 2) { if (evt.getClickCount() >= 2) {
Object selectedValue = functionNameList.getSelectedValue(); Object selectedValue = functionNameList.getSelectedValue();
if (!(selectedValue instanceof NameAndDescription)) { if (!(selectedValue instanceof NameAndDescription)) {
@ -654,7 +664,6 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
applyText(insert); applyText(insert);
} }
if (SwingUtilities.isRightMouseButton(evt)) { if (SwingUtilities.isRightMouseButton(evt)) {
JPopupMenu popupMenu = new JPopupMenu(); JPopupMenu popupMenu = new JPopupMenu();
LookDetailAction lookDetailAction = new LookDetailAction(); LookDetailAction lookDetailAction = new LookDetailAction();
@ -665,24 +674,28 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
} }
} }
}); });
}
// vairable.
variablesTree = new JTree(); private void initFunctionNameList(JPanel functionPane){
UIScrollPane variablesTreePane = new UIScrollPane(variablesTree); functionNameList = new JList(new DefaultListModel());
variablesTreePane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC)); UIScrollPane functionNameScrollPane = new UIScrollPane(functionNameList);
this.add(this.createNamePane( functionNameScrollPane.setPreferredSize(new Dimension(140, 200));
Inter.getLocText("Variables") + ":", variablesTreePane), BorderLayout.CENTER); functionPane.add(
variablesTree.setRootVisible(false); this.createNamePane(Inter.getLocText("FormulaD-Function_name") + ":", functionNameScrollPane),
variablesTree.setShowsRootHandles(true); BorderLayout.CENTER);
variablesTree.addMouseListener(applyTextMouseListener); functionNameScrollPane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC));
variablesTree.setCellRenderer(applyTreeCellRenderer); initFunctionNameListCellRenderer();
initFunctionNameListSelectionListener();
// Description initFunctionNameListMouseListener();
}
private void initDescriptionTextArea(){
// Description
descriptionTextArea = new UITextArea(16, 27); descriptionTextArea = new UITextArea(16, 27);
UIScrollPane desScrollPane = new UIScrollPane(descriptionTextArea); UIScrollPane desScrollPane = new UIScrollPane(descriptionTextArea);
desScrollPane.setBorder(null); desScrollPane.setBorder(null);
this.add(this.createNamePane(Inter.getLocText("Formula_Description") + ":", desScrollPane), BorderLayout.EAST); this.add(this.createNamePane(Inter.getLocText("FR-Designer_FormulaPane_Formula_Description") + ":", desScrollPane), BorderLayout.EAST);
descriptionTextArea.setBackground(new Color(255, 255, 225)); descriptionTextArea.setBackground(new Color(255, 255, 225));
descriptionTextArea.setLineWrap(true); descriptionTextArea.setLineWrap(true);
descriptionTextArea.setWrapStyleWord(true); descriptionTextArea.setWrapStyleWord(true);
@ -696,19 +709,41 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
} }
}); });
variablesTree.addTreeSelectionListener(new TreeSelectionListener() { }
public void valueChanged(TreeSelectionEvent e) { private StringBuilder getText(TextUserObject selectedValue,String path) throws IOException{
Object selectedValue = ((DefaultMutableTreeNode) variablesTree.getLastSelectedPathComponent()).getUserObject(); Reader desReader;
StringBuilder desBuf = new StringBuilder();
InputStream desInputStream = BaseUtils.readResource(path+ ((TextUserObject) selectedValue).displayText+".txt");
if (desInputStream == null) {
String description = "";
desReader = new StringReader(description);
} else {
desReader = new InputStreamReader(desInputStream);
}
BufferedReader reader = new BufferedReader(desReader);
String lineText;
while ((lineText = reader.readLine()) != null) {
if (desBuf.length() > 0) {
desBuf.append('\n');
}
desBuf.append(lineText);
}
reader.close();
desReader.close();
return desBuf;
}
private void initVariablesTreeSelectionListener(){
variablesTree.addTreeSelectionListener(new TreeSelectionListener() {
public void valueChanged(TreeSelectionEvent e) {
Object selectedValue = ((DefaultMutableTreeNode) variablesTree.getLastSelectedPathComponent()).getUserObject();
if (selectedValue == null) { if (selectedValue == null) {
return; return;
} }
StringBuilder desBuf = new StringBuilder(); StringBuilder desBuf = new StringBuilder();
try { try {
Reader desReader;
String path; String path;
Locale locale = FRContext.getLocale(); Locale locale = FRContext.getLocale();
if (locale.equals(Locale.CHINA)) { if (locale.equals(Locale.CHINA)) {
path = "/com/fr/design/insert/formula/variable/cn/"; path = "/com/fr/design/insert/formula/variable/cn/";
@ -716,43 +751,42 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
path = "/com/fr/design/insert/formula/variable/en/"; path = "/com/fr/design/insert/formula/variable/en/";
} }
if (selectedValue instanceof TextUserObject) { if (selectedValue instanceof TextUserObject) {
desBuf = getText((TextUserObject)selectedValue,path);
InputStream desInputStream = BaseUtils.readResource(path
+ ((TextUserObject) selectedValue).displayText
+ ".txt");
if (desInputStream == null) {
String description = "";
desReader = new StringReader(description);
} else {
desReader = new InputStreamReader(
desInputStream);
}
BufferedReader reader = new BufferedReader(
desReader);
String lineText;
while ((lineText = reader.readLine()) != null) {
if (desBuf.length() > 0) {
desBuf.append('\n');
}
desBuf.append(lineText);
}
reader.close();
desReader.close();
} }
} catch (IOException exp) { } catch (IOException exp) {
FRContext.getLogger().error(exp.getMessage(), exp); FRContext.getLogger().error(exp.getMessage(), exp);
} }
descriptionTextArea.setText(desBuf.toString()); descriptionTextArea.setText(desBuf.toString());
descriptionTextArea.moveCaretPosition(0); descriptionTextArea.moveCaretPosition(0);
} }
}); });
}
private void initVariablesTree(){
// vairable.
variablesTree = new JTree();
UIScrollPane variablesTreePane = new UIScrollPane(variablesTree);
variablesTreePane.setBorder(new UIRoundedBorder(UIConstants.LINE_COLOR, 1, UIConstants.ARC));
this.add(this.createNamePane(
Inter.getLocText("FR-Designer_FormulaPane_Variables") + ":", variablesTreePane), BorderLayout.CENTER);
variablesTree.setRootVisible(false);
variablesTree.setShowsRootHandles(true);
variablesTree.addMouseListener(applyTextMouseListener);
variablesTree.setCellRenderer(applyTreeCellRenderer);
initDescriptionTextArea();
initVariablesTreeSelectionListener();
}
private void initComponents() {
this.setLayout(new BorderLayout(4, 4));
// Function
JPanel functionPane = new JPanel(new BorderLayout(4, 4));
this.add(functionPane, BorderLayout.WEST);
initFunctionTypeList(functionPane);
initFunctionNameList(functionPane);
initVariablesTree();
// 选择: // 选择:
functionTypeList.setSelectedIndex(0); functionTypeList.setSelectedIndex(0);
} }
@ -763,7 +797,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
private class LookDetailAction extends UpdateAction { private class LookDetailAction extends UpdateAction {
public LookDetailAction() { public LookDetailAction() {
this.setName(Inter.getLocText("Function_Detail")); this.setName(Inter.getLocText("FR-Designer_FormulaPane_Function_Detail"));
this.setMnemonic('L'); this.setMnemonic('L');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/preview.png")); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_file/preview.png"));
} }
@ -778,7 +812,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
BasicPane basicPane = new BasicPane() { BasicPane basicPane = new BasicPane() {
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("Function_Detail"); return Inter.getLocText("FR-Designer_FormulaPane_Function_Detail");
} }
}; };
basicPane.setLayout(FRGUIPaneFactory.createBorderLayout()); basicPane.setLayout(FRGUIPaneFactory.createBorderLayout());
@ -855,7 +889,7 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
return this; return this;
} }
}; };
public void populate(VariableResolver variableResolver) { public void populate(VariableResolver variableResolver) {
// varibale tree. // varibale tree.
DefaultTreeModel variableModel = (DefaultTreeModel) variablesTree.getModel(); DefaultTreeModel variableModel = (DefaultTreeModel) variablesTree.getModel();
@ -868,53 +902,29 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
DefaultMutableTreeNode bindCellNode = new DefaultMutableTreeNode(new TextUserObject("$$$")); DefaultMutableTreeNode bindCellNode = new DefaultMutableTreeNode(new TextUserObject("$$$"));
rootNode.add(bindCellNode); rootNode.add(bindCellNode);
} }
{ rootNode.add(new TextFolderUserObject(Inter.getLocText("FormulaD-Data_Fields"),
MutableTreeNode tableTreeNode = new TextFolderUserObject( BaseUtils.readIcon("/com/fr/design/images/dialog/table.png"),
Inter.getLocText("FormulaD-Data_Fields"), variableResolver.resolveColumnNames()).createMutableTreeNode());
BaseUtils.readIcon("/com/fr/design/images/dialog/table.png"),
variableResolver.resolveColumnNames()).createMutableTreeNode(); // Set cutReport Variable
rootNode.add(new TextFolderUserObject(Inter.getLocText("FR-Designer_FormulaPane_Variables"),
rootNode.add(tableTreeNode); BaseUtils.readIcon("/com/fr/design/images/dialog/variable.png"),
} variableResolver.resolveCurReportVariables()).createMutableTreeNode());
{ rootNode.add(new TextFolderUserObject(Inter.getLocText(new String[]{"Datasource-Datasource", "Parameter"}),
// Set cutReport Variable BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"),
rootNode.add(new TextFolderUserObject( variableResolver.resolveTableDataParameterVariables()).createMutableTreeNode());
Inter.getLocText("Variables"),
BaseUtils.readIcon("/com/fr/design/images/dialog/variable.png"), rootNode.add(new TextFolderUserObject(Inter.getLocText("ParameterD-Report_Parameter"),
variableResolver.resolveCurReportVariables()).createMutableTreeNode()); BaseUtils.readIcon("/com/fr/design/images/m_report/p.gif"),
} variableResolver.resolveReportParameterVariables()).createMutableTreeNode());
rootNode.add(new TextFolderUserObject(Inter.getLocText("M_Server-Global_Parameters"),
{ BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"),
rootNode.add(new TextFolderUserObject( variableResolver.resolveGlobalParameterVariables()).createMutableTreeNode());
Inter.getLocText(new String[]{"Datasource-Datasource", "Parameter"}),
BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"),
variableResolver.resolveTableDataParameterVariables()).createMutableTreeNode());
}
{
MutableTreeNode reportParameterTreeNode = new TextFolderUserObject(
Inter.getLocText("ParameterD-Report_Parameter"),
BaseUtils.readIcon("/com/fr/design/images/m_report/p.gif"),
variableResolver.resolveReportParameterVariables()).createMutableTreeNode();
rootNode.add(reportParameterTreeNode);
}
{
MutableTreeNode globalParameterTreeNode = new TextFolderUserObject(
Inter.getLocText("M_Server-Global_Parameters"),
BaseUtils.readIcon("/com/fr/design/images/dialog/parameter.gif"),
variableResolver.resolveGlobalParameterVariables()).createMutableTreeNode();
rootNode.add(globalParameterTreeNode);
}
variableModel.reload(); variableModel.reload();
// Expand // Expand
for (int row = 0; row < this.variablesTree.getRowCount(); row++) { for (int row = 0; row < this.variablesTree.getRowCount(); row++) {
this.variablesTree.expandRow(row); this.variablesTree.expandRow(row);
@ -993,6 +1003,6 @@ public class FormulaPane extends BasicPane implements KeyListener, UIFormula{
buffer.append("|"); buffer.append("|");
buffer.append("\n"); buffer.append("\n");
} }
System.out.println(buffer.toString()); FRContext.getLogger().debug(buffer.toString());
} }
} }

51
designer_base/src/com/fr/design/formula/FunctionConstants.java

@ -11,6 +11,8 @@ import com.fr.stable.EncodeConstants;
import com.fr.stable.OperatingSystem; import com.fr.stable.OperatingSystem;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.fun.FunctionDefContainer;
import com.fr.stable.fun.mark.Mutable;
import com.fr.stable.script.Function; import com.fr.stable.script.Function;
import com.fr.stable.script.FunctionDef; import com.fr.stable.script.FunctionDef;
@ -23,8 +25,49 @@ import java.util.*;
import java.util.zip.ZipEntry; import java.util.zip.ZipEntry;
import java.util.zip.ZipFile; import java.util.zip.ZipFile;
import javax.swing.DefaultListModel;
public abstract class FunctionConstants { public abstract class FunctionConstants {
/**
* 将函数分组插件中的函数添加到对应的列表中
* @param listModel
*/
public static void addFunctionGroupFromPlugins(DefaultListModel listModel){
//hugh:自定义函数分组
Set<Mutable> containers = ExtraClassManager.getInstance().getArray(FunctionDefContainer.MARK_STRING);
if(!containers.isEmpty()){
for(Mutable container : containers){
listModel.addElement(createFunctionGroup((FunctionDefContainer)container));
}
}
}
/**
* 创建一个新的分组
* @param container
* @return
*/
private static FunctionGroup createFunctionGroup(final FunctionDefContainer container){
return new FunctionGroup() {
@Override
public String getGroupName() {
return container.getGroupName();
}
@Override
public NameAndDescription[] getDescriptions() {
FunctionDef[] fs = container.getFunctionDefs();
int count = fs.length;
FunctionDefNAD[] nads = new FunctionDefNAD[count];
for (int i = 0; i < count; i ++) {
nads[i] = new FunctionDefNAD(fs[i]);
}
return nads;
}
};
}
public static FunctionGroup PLUGIN = new FunctionGroup() { public static FunctionGroup PLUGIN = new FunctionGroup() {
@Override @Override
public String getGroupName() { public String getGroupName() {
@ -96,7 +139,13 @@ public abstract class FunctionConstants {
} }
Collections.addAll(all, PLUGIN.getDescriptions()); Collections.addAll(all, PLUGIN.getDescriptions());
Collections.addAll(all, CUSTOM.getDescriptions()); Collections.addAll(all, CUSTOM.getDescriptions());
//hugh:自定义函数分组
Set<Mutable> containers = ExtraClassManager.getInstance().getArray(FunctionDefContainer.MARK_STRING);
if(!containers.isEmpty()){
for(Mutable container : containers){
Collections.addAll(all,createFunctionGroup(((FunctionDefContainer)container)).getDescriptions());
}
}
java.util.Collections.sort(all, NameAndDescriptionComparator); java.util.Collections.sort(all, NameAndDescriptionComparator);
return all.toArray(new NameAndDescription[all.size()]); return all.toArray(new NameAndDescription[all.size()]);

2
designer_base/src/com/fr/design/formula/FunctionDefNAD.java

@ -6,7 +6,7 @@ import com.fr.stable.StringUtils;
public class FunctionDefNAD extends AbstractNameAndDescription { public class FunctionDefNAD extends AbstractNameAndDescription {
private FunctionDef def; private FunctionDef def;
FunctionDefNAD(FunctionDef def) { public FunctionDefNAD(FunctionDef def) {
this.def = def; this.def = def;
} }

11
designer_base/src/com/fr/design/formula/FunctionManagerPane.java

@ -20,6 +20,7 @@ import com.fr.file.FunctionManagerProvider;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
import com.fr.stable.ProductConstants;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import com.fr.stable.script.FunctionDef; import com.fr.stable.script.FunctionDef;
@ -159,7 +160,11 @@ public class FunctionManagerPane extends BasicPane {
descriptionArea.setWrapStyleWord(true); descriptionArea.setWrapStyleWord(true);
descriptionArea.setLineWrap(true); descriptionArea.setLineWrap(true);
northPane.add(descriptionArea); northPane.add(descriptionArea);
descriptionArea.setText(Inter.getLocText("FR-Designer_Function_Description_Area_Text", File.separator, File.separator, FRContext.getCurrentEnv().getPath() + File.separator));
String path1 = getEscapePath(File.separator + ProjectConstants.WEBINF_NAME + File.separator + ProjectConstants.CLASSES_NAME);
String path2 = getEscapePath(FRContext.getCurrentEnv().getPath() + File.separator + ProjectConstants.CLASSES_NAME);
descriptionArea.setText(Inter.getLocText("FR-Designer_Function_Description_Area_Text", path1, path2));
JPanel descriptionPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); //Description Pane JPanel descriptionPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); //Description Pane
this.add(descriptionPane, BorderLayout.SOUTH); this.add(descriptionPane, BorderLayout.SOUTH);
descriptionPane.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4)); descriptionPane.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
@ -167,6 +172,10 @@ public class FunctionManagerPane extends BasicPane {
this.descriptionTextArea = new UITextArea(6, 24); this.descriptionTextArea = new UITextArea(6, 24);
descriptionPane.add(new JScrollPane(this.descriptionTextArea), BorderLayout.CENTER); descriptionPane.add(new JScrollPane(this.descriptionTextArea), BorderLayout.CENTER);
} }
private String getEscapePath(String path) {
return path.replace("\\", "\\\\");
}
private ActionListener createEditorButtonActionListener() { private ActionListener createEditorButtonActionListener() {
return new ActionListener() { return new ActionListener() {

3
designer_base/src/com/fr/design/fun/ConnectionProvider.java

@ -12,7 +12,8 @@ public interface ConnectionProvider extends Mutable {
public static final String XML_TAG = "ConnectionProvider"; public static final String XML_TAG = "ConnectionProvider";
int CURRENT_LEVEL = 1; // 2016-12-14 1 -> 2 , 增加connection.feature方法导致不兼容.
int CURRENT_LEVEL = 2;
/** /**
* 数据连接弹出菜单的名字 * 数据连接弹出菜单的名字

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

@ -0,0 +1,41 @@
package com.fr.design.fun;
import com.fr.form.ui.Widget;
import com.fr.stable.fun.mark.Mutable;
import javax.swing.*;
import java.awt.*;
/**
* 报表工具栏设计器端拓展用于配置按钮额外属性
* Created by harry on 2016-12-23.
*/
public interface ExtraButtonToolBarProvider extends Mutable {
String XML_TAG = "ExtraButtonToolBarProvider";
int CURRENT_LEVEL = 1;
/**
* 用于添加属性面板
*
* @param centerPane 面板
*/
void updateCenterPane(JPanel centerPane);
/**
* 更新界面
*
* @param widget 控件
* @param card 卡片布局
* @param centerPane 面板
*/
void populate(Widget widget, CardLayout card, JPanel centerPane);
/**
* 保存界面设置
*
* @param widget 控件
*/
void update(Widget widget);
}

19
designer_base/src/com/fr/design/fun/impl/AbstractExtraButtonToolBarProvider.java

@ -0,0 +1,19 @@
package com.fr.design.fun.impl;
import com.fr.design.fun.ExtraButtonToolBarProvider;
import com.fr.stable.fun.impl.AbstractProvider;
import com.fr.stable.fun.mark.API;
/**
* Created by harry on 2016-12-23.
*/
@API(level = ExtraButtonToolBarProvider.CURRENT_LEVEL)
public abstract class AbstractExtraButtonToolBarProvider extends AbstractProvider implements ExtraButtonToolBarProvider {
public int currentAPILevel() {
return ExtraButtonToolBarProvider.CURRENT_LEVEL;
}
public String mark4Provider() {
return getClass().getName();
}
}

5
designer_base/src/com/fr/design/gui/controlpane/JListControlPane.java

@ -109,6 +109,10 @@ public abstract class JListControlPane extends JControlPane {
} }
protected void doBeforePopulate(ListModelElement el, Object obj) {
}
@Override @Override
protected ShortCut4JControlPane addItemShortCut() { protected ShortCut4JControlPane addItemShortCut() {
ShortCut addItemShortCut; ShortCut addItemShortCut;
@ -832,6 +836,7 @@ public abstract class JListControlPane extends JControlPane {
cardPane.add(updatePanes[i], String.valueOf(i)); cardPane.add(updatePanes[i], String.valueOf(i));
} }
card.show(cardPane, String.valueOf(i)); card.show(cardPane, String.valueOf(i));
doBeforePopulate(el, ob2Populate);
updatePanes[i].populateBean(ob2Populate); updatePanes[i].populateBean(ob2Populate);
doWhenPopulate(updatePanes[i]); doWhenPopulate(updatePanes[i]);
break; break;

8
designer_base/src/com/fr/design/gui/icombobox/UIComboBox.java

@ -160,6 +160,14 @@ public class UIComboBox extends JComboBox implements UIObserver, GlobalNameObser
uiObserverListener = listener; uiObserverListener = listener;
} }
public void removeChangeListener(){
uiObserverListener = null;
}
public UIObserverListener getUiObserverListener(){
return uiObserverListener;
}
/** /**
* @return * @return
*/ */

54
designer_base/src/com/fr/design/gui/itable/AbstractPropertyTable.java

@ -26,32 +26,39 @@ import com.fr.general.Inter;
*/ */
public abstract class AbstractPropertyTable extends JTable { public abstract class AbstractPropertyTable extends JTable {
// 属性分 // // 所有数据组, 把数据分组,一个可折叠的项里面的所有行 为一
protected ArrayList<PropertyGroup> groups; protected ArrayList<PropertyGroup> groups;
protected TableModel default_table_model;
// 属性表被选中的行加一个浅蓝色的背景 // 属性表被选中的行加一个浅蓝色的背景
public static final Color PROPERTY_SELECTION_BACKGROUND = new Color(153, 204, 255); public static final Color PROPERTY_SELECTION_BACKGROUND = new Color(153, 204, 255);
// 属性表的行高 // 属性表的行高
public static final int PROPERTY_TABLE_ROW_HEIGHT = 22; public static final int PROPERTY_TABLE_ROW_HEIGHT = 22;
private static final int PROPERTY_ICON_WIDTH = 10;
public AbstractPropertyTable() { public AbstractPropertyTable() {
this.setRowHeight(PROPERTY_TABLE_ROW_HEIGHT); this.setTableProperties();
this.initPopup();
this.setModel(new DefaultTableModel());
}
private void setTableProperties() {
JTableHeader header = getTableHeader(); JTableHeader header = getTableHeader();
header.setReorderingAllowed(false); header.setReorderingAllowed(false);
header.setPreferredSize(new Dimension(0, PROPERTY_TABLE_ROW_HEIGHT)); header.setPreferredSize(new Dimension(0, PROPERTY_TABLE_ROW_HEIGHT));
header.setDefaultRenderer(new HeaderRenderer()); header.setDefaultRenderer(new HeaderRenderer());
this.setRowHeight(PROPERTY_TABLE_ROW_HEIGHT);
this.setGridColor(new Color(212, 208, 200)); this.setGridColor(new Color(212, 208, 200));
this.setSelectionBackground(PROPERTY_SELECTION_BACKGROUND); this.setSelectionBackground(PROPERTY_SELECTION_BACKGROUND);
this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
this.setColumnSelectionAllowed(false); this.setColumnSelectionAllowed(false);
this.setRowSelectionAllowed(true); this.setRowSelectionAllowed(true);
this.setFillsViewportHeight(true); this.setFillsViewportHeight(true);
this.initPopup();
default_table_model = new DefaultTableModel();
this.setModel(default_table_model);
this.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); this.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
} }
/**
* 在这个函数里面初始化表格数据再repaint
* @param source
*/
public abstract void initPropertyGroups(Object source); public abstract void initPropertyGroups(Object source);
public void fireValueChanged(Object old_value, boolean success, Object newValue) { public void fireValueChanged(Object old_value, boolean success, Object newValue) {
@ -64,12 +71,15 @@ public abstract class AbstractPropertyTable extends JTable {
@Override @Override
public TableCellRenderer getCellRenderer(int row, int column) { public TableCellRenderer getCellRenderer(int row, int column) {
//如果数据组不为空
if (groups != null) { if (groups != null) {
Point pIndex = getGroupIndex(row); Point pIndex = getGroupIndex(row);
if (pIndex == null){ if (pIndex == null){
return super.getCellRenderer(row, column); return super.getCellRenderer(row, column);
} }
//拿出当前行所在的那个属性组
PropertyGroup group = groups.get(pIndex.x); PropertyGroup group = groups.get(pIndex.x);
//如果是标题行
if (pIndex.y == 0) { if (pIndex.y == 0) {
if (column == 0) { if (column == 0) {
return group.getFirstRenderer(); return group.getFirstRenderer();
@ -77,11 +87,13 @@ public abstract class AbstractPropertyTable extends JTable {
return group.getSecondRenderer(); return group.getSecondRenderer();
} }
} else { } else {
//如果是非标题行第一列,采用默认渲染器
if (column == 0) { if (column == 0) {
return super.getCellRenderer(row, column); return super.getCellRenderer(row, column);
} else { } else {
TableCellRenderer renderer = group.getModel().getRenderer(pIndex.y - 1); TableCellRenderer renderer = group.getModel().getRenderer(pIndex.y - 1);
if (renderer instanceof Component) { if (renderer instanceof Component) {
//如果这个渲染器是继承自Component,根据当前行列是否可编辑决定该控件是否可用
((Component) renderer).setEnabled(isCellEditable(row, column)); ((Component) renderer).setEnabled(isCellEditable(row, column));
} }
return renderer; return renderer;
@ -115,6 +127,12 @@ public abstract class AbstractPropertyTable extends JTable {
} }
} }
/**
* 看懂了写个注释先
* 获取当前row行的Point(x, y), x代表当前row行是属于groups中的第x个组y代表当前row行所在的第x组里面的第y行
* @param row
* @return
*/
private Point getGroupIndex(int row) { private Point getGroupIndex(int row) {
int count = 0; int count = 0;
for (int i = 0; i < groups.size(); i++) { for (int i = 0; i < groups.size(); i++) {
@ -135,6 +153,10 @@ public abstract class AbstractPropertyTable extends JTable {
this.addMouseListener(new MouseAdapter() { this.addMouseListener(new MouseAdapter() {
/**
* 如果点到标题行就要触发折叠事件
* @param e
*/
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (!e.isPopupTrigger() && groups != null) { if (!e.isPopupTrigger() && groups != null) {
@ -148,13 +170,18 @@ public abstract class AbstractPropertyTable extends JTable {
} }
} }
/**
* 这个mousePressed和上面的mouseClicked唯一不同的地方是单双击和e.getX() < 10 的判断
* 这个意思应该就是说点到图标加号减号立即触发折叠效果否则点其他处要双击才能触发
* @param e
*/
@Override @Override
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
if (!e.isPopupTrigger() && groups != null) { if (!e.isPopupTrigger() && groups != null) {
int row = AbstractPropertyTable.super.rowAtPoint(e.getPoint()); int row = AbstractPropertyTable.super.rowAtPoint(e.getPoint());
if (row != -1) { if (row != -1) {
Point pIndex = getGroupIndex(row); Point pIndex = getGroupIndex(row);
if (pIndex.y == 0 && e.getClickCount() == 1 && e.getX() < 10) { if (pIndex.y == 0 && e.getClickCount() == 1 && e.getX() < PROPERTY_ICON_WIDTH) {
toggleCollapse(pIndex.x); toggleCollapse(pIndex.x);
} }
} }
@ -163,16 +190,27 @@ public abstract class AbstractPropertyTable extends JTable {
}); });
} }
/**
* 切换属性组折叠属性true/false
* @param groupIndex
*/
private void toggleCollapse(int groupIndex) { private void toggleCollapse(int groupIndex) {
PropertyGroup group = groups.get(groupIndex); PropertyGroup group = groups.get(groupIndex);
group.setCollapsed(!group.isCollapsed()); group.setCollapsed(!group.isCollapsed());
//这里获取表格的父控件是为了当表格被折叠了后,装表格的父控件也要相应的重新布局一下
//比如折叠之后表格行数应该比原来的少,占用父容器空间应该小点,不重新布局父容器,表格大小不会改变
Container parent = AbstractPropertyTable.this.getParent(); Container parent = AbstractPropertyTable.this.getParent();
if (parent != null) { if (parent != null) {
parent.doLayout(); // parent.doLayout(); // 这里还是用revalidate吧。。daLayout有时候会失效不知道为什么
parent.revalidate();
} }
repaint(); repaint();
} }
/**
* BeanTableModel类提供表格数据
* 它的所有数据来源均来自PropertyGroup中的AbstractPropertyGroupModel中的descriptor
*/
public class BeanTableModel extends AbstractTableModel { public class BeanTableModel extends AbstractTableModel {
@Override @Override

10
designer_base/src/com/fr/design/gui/itable/PropertyGroup.java

@ -4,11 +4,14 @@ import javax.swing.table.TableCellRenderer;
import com.fr.design.beans.GroupModel; import com.fr.design.beans.GroupModel;
/**
* PropertyGroup类描述了属性表中一个属性分组
*/
public class PropertyGroup { public class PropertyGroup {
private GroupModel model; private GroupModel model; // 描述这个属性组中的数据model
private String name; private String name; // 这组属性的标题名称
private boolean collapsed; private boolean collapsed; // 这组属性是否折叠
private GroupRenderer renderer1; private GroupRenderer renderer1;
private GroupRenderer renderer2; private GroupRenderer renderer2;
@ -55,4 +58,5 @@ public class PropertyGroup {
public TableCellRenderer getSecondRenderer() { public TableCellRenderer getSecondRenderer() {
return renderer2; return renderer2;
} }
} }

46
designer_base/src/com/fr/design/locale/designer.properties

@ -100,7 +100,7 @@ FR-Designer_FS_Close_Other_Templates=
FR-Designer_File= FR-Designer_File=
FR-Designer_Filter_Conditions= FR-Designer_Filter_Conditions=
FR-Designer_Finish-Modify-Share= FR-Designer_Finish-Modify-Share=
FR-Designer_Fit= FR-Designer_Fit-App=
FR-Designer_Font-Family= FR-Designer_Font-Family=
FR-Designer_Font-Size= FR-Designer_Font-Size=
FR-Designer_Forbid_Drag_into_Adapt_Pane=Forbid Drag into Para Pane FR-Designer_Forbid_Drag_into_Adapt_Pane=Forbid Drag into Para Pane
@ -357,6 +357,7 @@ FR-Designer_KeyPoint=KeyPoint
FR-Designer_loadedTreeModel=loadedTreeModel FR-Designer_loadedTreeModel=loadedTreeModel
FR-Designer-Failed_to_load_the_plugin=Failed to load the plugin\uFF0Cplease update the plugin\: FR-Designer-Failed_to_load_the_plugin=Failed to load the plugin\uFF0Cplease update the plugin\:
FR-Designer-Plugin_Please_Update_Jar= FR-Designer-Plugin_Please_Update_Jar=
FR-Designer-Invalid_Page_Number=Invalid Page Number
FR-Designer_XMLA_Database=Database FR-Designer_XMLA_Database=Database
FR-Designer_XMLA_UserName=User name FR-Designer_XMLA_UserName=User name
FR-Designer_XMLA_Password=Password FR-Designer_XMLA_Password=Password
@ -487,6 +488,10 @@ FR-Designer-LayerPageReport_PageQuery=
FR-Designer-LayerPageReport_Define_PageQuerySQL= FR-Designer-LayerPageReport_Define_PageQuerySQL=
FR-Designer_Event= FR-Designer_Event=
FR-Designer_Properties= FR-Designer_Properties=
FR-Designer_Permissions_Edition=Permissions Edition
FR-Designer_Export_Excel_Page=Page
FR-Designer_Export_Excel_Simple=Simple
FR-Designer_Export_Excel_PageToSheet=Page To Sheet
FR-Designer_Export_failed=Export failed FR-Designer_Export_failed=Export failed
FR-Designer_Exported_successfully=Exported successfully FR-Designer_Exported_successfully=Exported successfully
FR-Designer_Exporting=Exporting FR-Designer_Exporting=Exporting
@ -510,6 +515,22 @@ FR-Designer_Create_Tree=
FR-Designer_Set_Callback_Function= FR-Designer_Set_Callback_Function=
FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Content=
FR-Designer_ConfirmDialog_Title= FR-Designer_ConfirmDialog_Title=
FR-Designer_FormulaPane_Tips=Tips\:You_Can_Input_B1_To_Input_The_Data_Of_The_First_Row_Second_Column
FR-Designer_FormulaPane_Variables=Variables
FR-Designer_FormulaPane_Formula_Description=Formula_Description
FR-Designer_FormulaPane_Function_Detail=Function Detail
FR-Designer_FormulaPane_Search=Search
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=
FR-Designer_ClassName_panel=ClassName
FR-Designer_Description_panel=Description
FR-Designer_Edit_panel=Edit
FR-Designer_Property_panel=Property
FR-Designer_Select_panel=Select
FR-Designer_LayoutTable_Column_Width=160 FR-Designer_LayoutTable_Column_Width=160
FR-Designer_Set_BG_Of_Current_Row=Set BG of the row being edited FR-Designer_Set_BG_Of_Current_Row=Set BG of the row being edited
FR-Designer_Unload_Check=Prompt users when leave without submitting FR-Designer_Unload_Check=Prompt users when leave without submitting
@ -517,20 +538,6 @@ FR-Designer_ReportColumns_Columns_Optional=
FR-Designer_Row_Icon_File_Name=row.png FR-Designer_Row_Icon_File_Name=row.png
FR-Designer_Center_Display=Center FR-Designer_Center_Display=Center
FR-Designer_Left_Display=Left FR-Designer_Left_Display=Left
FR-Designer_Background_Null=
FR-Designer_Background_Color=
FR-Designer_Background_Texture=
FR-Designer_Background_Pattern=
FR-Designer_Background_Gradient_Color=
FR-Designer_Background_Image=
FR-Designer_Background_Clear=
FR-Designer_Background_Image_Select=
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=
FR-Designer_Initial_Background_Tips=
FR-Designer_Mouse_Move_Tips=
FR-Designer_Mouse_Click_Tips=
FR-Designer_About_Version=Version FR-Designer_About_Version=Version
FR-Designer_About_CopyRight=Copy Right FR-Designer_About_CopyRight=Copy Right
FR-Designer_Service_Phone=Service Phone FR-Designer_Service_Phone=Service Phone
@ -539,6 +546,7 @@ FR-Designer_PageSetup_Page=Page
FR-Designer_Custom_Job_Description=Description FR-Designer_Custom_Job_Description=Description
FR-Designer_Property=Property FR-Designer_Property=Property
FR-Designer_ClassName=Class Name FR-Designer_ClassName=Class Name
FR-Designer_Polyblock_Edit=Polyblock Edit FR-Designer_Polyblock_Edit=Polyblock Edit
FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes} FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes}
FR-Designer_PageSetup_Horizontal=Horizontal FR-Designer_PageSetup_Horizontal=Horizontal
@ -554,11 +562,9 @@ FR-Designer_Show_As_Download=Display the binary content using download link
FR-Designer_File_Name_For_Download=File Name For Download FR-Designer_File_Name_For_Download=File Name For Download
FR-Designer_No=No FR-Designer_No=No
FR-Designer_Pagination=Page Break FR-Designer_Pagination=Page Break
FR-Designer_Role=Role
FR-Designer-Move_Tab_First=move to first
FR-Designer-Move_Tab_End=move to end
FR-Designer-Move_Tab_Next=move to next
FR-Designer-Move_Tab_Prev=move to previous
FR-Designer_DS_TableData=Data Set FR-Designer_DS_TableData=Data Set
FR-Designer_Parameter-Formula=Formula FR-Designer_Parameter-Formula=Formula
FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update.
FR-Designer_WidgetOrder=Widget Order
FR-Designer_Mobile_Form_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the form in the APP.
FR-Designer_Mobile_Report_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the report in the APP, only to support the paging preview, fill in the preview of the property is invalid.

121
designer_base/src/com/fr/design/locale/designer_en_US.properties

@ -73,8 +73,8 @@ FR-Designer_Button-Type=Button Type
FR-Designer_CardLayout=TabLayout FR-Designer_CardLayout=TabLayout
FR-Designer_Cell=cell FR-Designer_Cell=cell
FR-Designer_Chart_Cell=Chart Hyperlink-Link Cell FR-Designer_Chart_Cell=Chart Hyperlink-Link Cell
FR-Designer_Chart_Float=Chart Hyperlink-Floating Elements FR-Designer_Chart_Float=Chart Hyperlink-Floating Element
FR-Designer_Chart_Float_chart=Chart Hyperlink-Floating-window Chart FR-Designer_Chart_Float_chart=Chart Hyperlink-Floating Chart
FR-Designer_Check-for-Updates=Check for Updates FR-Designer_Check-for-Updates=Check for Updates
FR-Designer_Choose-Data-Confusion-Tip=\ Please Choose the field needed to be confused and then preview FR-Designer_Choose-Data-Confusion-Tip=\ Please Choose the field needed to be confused and then preview
FR-Designer_Close=close FR-Designer_Close=close
@ -100,6 +100,7 @@ FR-Designer_FS_Close_Other_Templates=Close other templates
FR-Designer_File=file FR-Designer_File=file
FR-Designer_Filter_Conditions=Filter condition FR-Designer_Filter_Conditions=Filter condition
FR-Designer_Finish-Modify-Share=Finish Modification And Share FR-Designer_Finish-Modify-Share=Finish Modification And Share
FR-Designer_Fit-App=App self-adaption
FR-Designer_Fit=self-adaption FR-Designer_Fit=self-adaption
FR-Designer_Font-Family=Font name FR-Designer_Font-Family=Font name
FR-Designer_Font-Size=Font size FR-Designer_Font-Size=Font size
@ -118,7 +119,7 @@ FR-Designer_Get-CubeGetting cube=
FR-Designer_Help=Help FR-Designer_Help=Help
FR-Designer_Hide=Hide FR-Designer_Hide=Hide
FR-Designer_Hyperlink=Hyperlink FR-Designer_Hyperlink=Hyperlink
FR-Designer_Hyperlink-Form_link=Current form object FR-Designer_Hyperlink-Form_link=Current dashboard object
FR-Designer_IDCard=IDCard FR-Designer_IDCard=IDCard
FR-Designer_Icon=Icon FR-Designer_Icon=Icon
FR-Designer_Index=index FR-Designer_Index=index
@ -126,7 +127,7 @@ FR-Designer_Input_Rule=Input Rule
FR-Designer_Language_Default=Default FR-Designer_Language_Default=Default
FR-Designer_Layout=Layout FR-Designer_Layout=Layout
FR-Designer_Layout-HBox=Horizontal Box Layout FR-Designer_Layout-HBox=Horizontal Box Layout
FR-Designer_Layout-Index=Layout Index FR-Designer_Layout-Index=Index
FR-Designer_Layout_Constraints=Layout Constraints FR-Designer_Layout_Constraints=Layout Constraints
FR-Designer_Length=Length FR-Designer_Length=Length
FR-Designer_Loading_Data=Loading Data FR-Designer_Loading_Data=Loading Data
@ -173,12 +174,12 @@ FR-Designer_Search=Search
FR-Designer_Set=Set FR-Designer_Set=Set
FR-Designer_Share-Template=Share Template FR-Designer_Share-Template=Share Template
FR-Designer_Simple_general=Simple custom query FR-Designer_Simple_general=Simple custom query
FR-Designer_Song_TypeFace=song typeface FR-Designer_Song_TypeFace=Song typeface
FR-Designer_Start-Date=Start Date FR-Designer_Start-Date=Start Date
FR-Designer_Subscript=Subscript FR-Designer_Subscript=Subscript
FR-Designer_Superscript=Superscript FR-Designer_Superscript=Superscript
FR-Designer_Support_QQ=Support online FR-Designer_Support_QQ=Support online
FR-Designer_Swatch=Swatch FR-Designer_Swatch=Sample
FR-Designer_Tab_title=Tab title FR-Designer_Tab_title=Tab title
FR-Designer_TableData=Data set FR-Designer_TableData=Data set
FR-Designer_Thank_guest=Special thanks to FR-Designer_Thank_guest=Special thanks to
@ -190,8 +191,8 @@ FR-Designer_Underline=Underline
FR-Designer_Used=Recently Used FR-Designer_Used=Recently Used
FR-Designer_User-defined-MDX=Custom MDX query FR-Designer_User-defined-MDX=Custom MDX query
FR-Designer_SampleText=SampleText SampleText FR-Designer_SampleText=SampleText SampleText
FR-Designer_Vertical-LeftToRight=Vertical Text (Left to Right) FR-Designer_Vertical-LeftToRight=Vertical Text (left to right)
FR-Designer_Vertical-RightToLeft=Vertical Text (Right To Left) FR-Designer_Vertical-RightToLeft=Vertical Text (right to left)
FR-Designer_VerticalBoxLayout=Vertical Box Layout FR-Designer_VerticalBoxLayout=Vertical Box Layout
FR-Designer_Visible=Visible FR-Designer_Visible=Visible
FR-Designer_WLayout-Border-ToolTips=The complete border layout container\uFF0Cis composed of central, eastern, western, northern and southern parts. You can adjust the height of the northern and southern ones and the width of the eastern and western ones. FR-Designer_WLayout-Border-ToolTips=The complete border layout container\uFF0Cis composed of central, eastern, western, northern and southern parts. You can adjust the height of the northern and southern ones and the width of the eastern and western ones.
@ -358,6 +359,7 @@ FR-Designer_KeyPoint=KeyPoint
FR-Designer_loadedTreeModel=loadedTreeModel FR-Designer_loadedTreeModel=loadedTreeModel
FR-Designer-Failed_to_load_the_plugin=Failed to load the plugin\uFF0Cplease update the plugin\: FR-Designer-Failed_to_load_the_plugin=Failed to load the plugin\uFF0Cplease update the plugin\:
FR-Designer-Plugin_Please_Update_Jar=Please Update Jar FR-Designer-Plugin_Please_Update_Jar=Please Update Jar
FR-Designer-Invalid_Page_Number=Invalid Page Number
FR-Designer_XMLA_Database=DB FR-Designer_XMLA_Database=DB
FR-Designer_XMLA_UserName=User name FR-Designer_XMLA_UserName=User name
FR-Designer_XMLA_Password=Password FR-Designer_XMLA_Password=Password
@ -413,12 +415,12 @@ FR-Designer_Unit_PT=Pound
FR-Designer-Write_Auto_Stash=auto stash FR-Designer-Write_Auto_Stash=auto stash
FR-Designer_Printer_Native_Button=Native Print FR-Designer_Printer_Native_Button=Native Print
FR-Designer_Event_ShowWidgets=Display widgets directly FR-Designer_Event_ShowWidgets=Display widgets directly
FR-Designer_Current_Preview_Rows=Current Number of Preview Rows FR-Designer_Current_Preview_Rows=Current Number of Preview Rows
FR-Designer_Data=Data FR-Designer_Data=Data
FR-Designer_Error=Error FR-Designer_Error=Error
FR-Designer_formDesignerModule=Form Designer FR-Designer_formDesignerModule=Form Designer
FR-Designer-Website_Url=http\://www.finereport.com/en FR-Designer-Website_Url=http\://www.finereport.com/en
FR-Designer-BBSLogin_Download-Unlogin-Tip= FR-Designer-BBSLogin_Download-Unlogin-Tip=Login to download
FR-Designer-App_ReLayout=AppRelayout FR-Designer-App_ReLayout=AppRelayout
FR-Designer_Mobile-Attr=Mobile Attr FR-Designer_Mobile-Attr=Mobile Attr
FR-Designer_Mobile-Vertical=Vertical Screen FR-Designer_Mobile-Vertical=Vertical Screen
@ -432,42 +434,42 @@ FR-Designer_COMMUNITY_NEED=need
FR-Designer_COMMUNITY_BUG=bug report FR-Designer_COMMUNITY_BUG=bug report
FR-Designer_COMMUNITY_SIGN=sign FR-Designer_COMMUNITY_SIGN=sign
FR-Designer_COMMUNITY_QUESTIONS=questions FR-Designer_COMMUNITY_QUESTIONS=questions
FR-Designer_Mobile-Zoom=zoom FR-Designer_Mobile-Zoom=Zoom
FR-Designer_Mobile-Open=Open FR-Designer_Mobile-Open=Open
FR-Designer_Mobile-Warning= FR-Designer_Mobile-Warning=Max height cannot exceed 80% of display area
FR-Designer_Button-OK=OK FR-Designer_Button-OK=OK
FR-Designer_Button-Cancel=Cancel FR-Designer_Button-Cancel=Cancel
FR-Designer_Write-Save-Formula=Preserve formula when fill FR-Designer_Write-Save-Formula=Preserve formula when fill
FR-Designer_Export-Save-Formula=Preserve formula when export FR-Designer_Export-Save-Formula=Preserve formula when export
FR-Designer_Form-Fit-Tip=Fit Plugin FR-Designer_Form-Fit-Tip=Adaptive plug-in
FR-Designer_Form-Frozen-Tip=When Use Form Frozen, Suggest Install FR-Designer_Form-Frozen-Tip=When use Frozen, suggest install
FR-Designer_Form-Forzen-Speed=To Speed UP. FR-Designer_Form-Forzen-Speed=, use bidirectional and horizontal adaption to improve the speed.
FR-Designer_Attention=attention FR-Designer_Attention=Attention
FR-Designer_Forbid_Widgets_Intersects=Forbid Widgets Intersects FR-Designer_Forbid_Widgets_Intersects=Forbid component overlap
FR-Designer_Widget_Scaling_Mode_Fit=Area-Fit FR-Designer_Widget_Scaling_Mode_Fit=Area-Fit
FR-Designer_Widget_Scaling_Mode_Fixed=Area-Fixed FR-Designer_Widget_Scaling_Mode_Fixed=Area-Fixed
FR-Designer-Widget_Area_Scaling=Widget Area Scaling FR-Designer-Widget_Area_Scaling=Component area scaling
FR-Designer-Widget_Scaling_Mode=Widget Scaling Mode FR-Designer-Widget_Scaling_Mode=Scaling mode
FR-Designer-QQLogin-Determine=Determine FR-Designer-QQLogin-Determine=Determine
FR-Designer-QQLogin-Cancel=Cancel FR-Designer-QQLogin-Cancel=Cancel
FR-Designer-Reuse_Manager=Reuse Manager FR-Designer-Reuse_Manager=Component management
FR-Designer_TableData-Default-Para=Default Para FR-Designer_TableData-Default-Para=Default parameter
FR-Designer_Layout_Block_Absolute=Absolute Layout Block FR-Designer_Layout_Block_Absolute=Absolute layout block
FR-Designer_Layout_Block_Tab=TabLayout FR-Designer_Layout_Block_Tab=Tab block
FR-Designer_Layout_Block_Blank=Blank Block FR-Designer_Layout_Block_Blank=Blank block
FR-Designer_Attr_Layout=layout FR-Designer_Attr_Layout=Layout
FR-Designer_Attr_Layout_Type=layout type FR-Designer_Attr_Layout_Type=Layout type
FR-Designer_Attr_Bidirectional_Adaptive=Bidirectional Adaptive FR-Designer_Attr_Bidirectional_Adaptive=Bidirectional adaptive
FR-Designer-Selected_Widget=selected widget FR-Designer-Selected_Widget=Selected widget
FR-Designer_LocalWidget=local widget FR-Designer_LocalWidget=Local component library
FR-Designer_AllCategories=all categories FR-Designer_AllCategories=All categories
FR-Designer_Download_Template=download template FR-Designer_Download_Template=Download components
FR-Designer_Install_Template=install template FR-Designer_Install_Template=Install components
FR-Designer_Delete_Template=delete template FR-Designer_Delete_Template=Delete components
FR-Designer_Mobile-Refresh=refresh FR-Designer_Mobile-Refresh=Refresh
FR-Designer_Mobile-ToolBar=toolbar FR-Designer_Mobile-ToolBar=Toolbar
FR-Designer_WLayout-Absolute-ToolTips=Freestyle layout, add control in any position of the layout FR-Designer_WLayout-Absolute-ToolTips=Freestyle layout, add control in any position of the layout
FR-Designer_Reset=reset FR-Designer_Reset=Reset
FR-Designer_Add_all=Add all FR-Designer_Add_all=Add all
FR-Designer_Language_Change_Successful=New language setting will be enabled when designer is restarted FR-Designer_Language_Change_Successful=New language setting will be enabled when designer is restarted
FR-Designer_Template_Web_Attributes=Web Attributes FR-Designer_Template_Web_Attributes=Web Attributes
@ -486,6 +488,10 @@ FR-Designer-DS-Database_Query=DB Query
FR-Designer_Is_Share_DBTableData=Shared data set FR-Designer_Is_Share_DBTableData=Shared data set
FR-Designer_Event=Event FR-Designer_Event=Event
FR-Designer_Properties=Properties FR-Designer_Properties=Properties
FR-Designer_Permissions_Edition=Permissions Edition
FR-Designer_Export_Excel_Page=Page Break
FR-Designer_Export_Excel_Simple=Original
FR-Designer_Export_Excel_PageToSheet=One Page Per Sheet
FR-Designer_Export_failed=Export failed FR-Designer_Export_failed=Export failed
FR-Designer_Exported_successfully=Exported successfully FR-Designer_Exported_successfully=Exported successfully
FR-Designer_Exporting=Exporting FR-Designer_Exporting=Exporting
@ -508,8 +514,24 @@ FR-Designer_Form_Basic_Properties=Basic Property
FR-Designer_DS_Dictionary=Data Dictionary FR-Designer_DS_Dictionary=Data Dictionary
FR-Designer_Create_Tree=Build Tree FR-Designer_Create_Tree=Build Tree
FR-Designer_Set_Callback_Function=Set Callback Function FR-Designer_Set_Callback_Function=Set Callback Function
FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Content=Confirm to delete Tab Control
FR-Designer_ConfirmDialog_Title= FR-Designer_ConfirmDialog_Title=FineReport 8.0
FR-Designer_FormulaPane_Tips=Tips\:You can input B1 to get the data in the second cell of the first row
FR-Designer_FormulaPane_Variables=Variables
FR-Designer_FormulaPane_Formula_Description=Formula Description
FR-Designer_FormulaPane_Function_Detail=Function Detail
FR-Designer_FormulaPane_Search=Search
FR-Designer_Tab_carousel=Tab carousel
FR-Designer_setCarousel=Start
FR-Designer_carouselInterval=Interval
FR-Designer_ClassName_panel=Class Name
FR-Designer_Description_panel=Description
FR-Designer_Edit_panel=Edit
FR-Designer_Property_panel=Property
FR-Designer_Select_panel=Sel
FR-Designer_LayoutTable_Column_Width=250 FR-Designer_LayoutTable_Column_Width=250
FR-Designer_Set_BG_Of_Current_Row=Set BG of the row being edited FR-Designer_Set_BG_Of_Current_Row=Set BG of the row being edited
FR-Designer_Unload_Check=Prompt users when leave without submitting FR-Designer_Unload_Check=Prompt users when leave without submitting
@ -517,20 +539,6 @@ FR-Designer_ReportColumns_Columns_Optional=\u3000
FR-Designer_Row_Icon_File_Name=row_en.png FR-Designer_Row_Icon_File_Name=row_en.png
FR-Designer_Center_Display=Center FR-Designer_Center_Display=Center
FR-Designer_Left_Display=Left FR-Designer_Left_Display=Left
FR-Designer_Background_Null=No Background
FR-Designer_Background_Color=Color
FR-Designer_Background_Texture=Texture
FR-Designer_Background_Pattern=Pattern
FR-Designer_Background_Gradient_Color=Gradient Color
FR-Designer_Background_Image=Image
FR-Designer_Background_Clear=Clear
FR-Designer_Background_Image_Select=Select Picture
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=
FR-Designer_Initial_Background_Tips=Initial background of the button
FR-Designer_Mouse_Move_Tips=Move the mouse to the button on the background, in the absence of not changing the background
FR-Designer_Mouse_Click_Tips=The background of the mouse to click the button, in the absence of not changing the background
FR-Designer_About_Version=Version FR-Designer_About_Version=Version
FR-Designer_About_CopyRight=Copy Right FR-Designer_About_CopyRight=Copy Right
FR-Designer_Service_Phone=Service Phone FR-Designer_Service_Phone=Service Phone
@ -539,6 +547,7 @@ FR-Designer_PageSetup_Page=Page
FR-Designer_Custom_Job_Description=Description FR-Designer_Custom_Job_Description=Description
FR-Designer_Property=Property FR-Designer_Property=Property
FR-Designer_ClassName=Class Name FR-Designer_ClassName=Class Name
FR-Designer_Polyblock_Edit=Aggregation block edition FR-Designer_Polyblock_Edit=Aggregation block edition
FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class files should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes FR-Designer_Function_Description_Area_Text=The class must inherit 'com.fr.script.AbstractFunction'. The compiled class files should be copied to\nJ2EE server '{R1}WEB-INF{R2}classes' directory.\nAdd the source code(.java file) into the same folder if need.\nExample: {R3}classes
FR-Designer_PageSetup_Horizontal=Horizontal FR-Designer_PageSetup_Horizontal=Horizontal
@ -554,11 +563,9 @@ FR-Designer_Show_As_Download=Display the binary content using download link
FR-Designer_File_Name_For_Download=File Name For Download FR-Designer_File_Name_For_Download=File Name For Download
FR-Designer_No=No FR-Designer_No=No
FR-Designer_Pagination=Page Break FR-Designer_Pagination=Page Break
FR-Designer-Move_Tab_First=move to first
FR-Designer-Move_Tab_End=move to end
FR-Designer-Move_Tab_Next=move to next
FR-Designer-Move_Tab_Prev=move to previous
FR-Designer_Role=Role
FR-Designer_DS_TableData=Data Set FR-Designer_DS_TableData=Data Set
FR-Designer_Parameter-Formula=Formula FR-Designer_Parameter-Formula=Formula
FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update. FR-Designer_Plugin_Should_Update_Please_Contact_Developer=Plugin version is too low, and is not compatible with current API. Please contact the developer to update.
FR-Designer_WidgetOrder=Widget Order
FR-Designer_Mobile_Form_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the form in the APP.
FR-Designer_Mobile_Report_Analysis_Annotation=annotation\: You can use this attribute to control the analysis of the report in the APP, only to support the paging preview, fill in the preview of the property is invalid.

126
designer_base/src/com/fr/design/locale/designer_ja_JP.properties

@ -100,6 +100,7 @@ FR-Designer_FS_Close_Other_Templates=\u305D\u306E\u4ED6\u30C6\u30F3\u30D7\u30EC\
FR-Designer_File=\u30D5\u30A1\u30A4\u30EB FR-Designer_File=\u30D5\u30A1\u30A4\u30EB
FR-Designer_Filter_Conditions=\u9078\u5225\u6761\u4EF6 FR-Designer_Filter_Conditions=\u9078\u5225\u6761\u4EF6
FR-Designer_Finish-Modify-Share=\u4FEE\u6B63\u3092\u5B8C\u4E86\u3057\u3066\u30B7\u30A7\u30A2 FR-Designer_Finish-Modify-Share=\u4FEE\u6B63\u3092\u5B8C\u4E86\u3057\u3066\u30B7\u30A7\u30A2
FR-Designer_Fit-App=App\u81EA\u9069\u5FDC
FR-Designer_Fit=\u81EA\u9069\u5FDC FR-Designer_Fit=\u81EA\u9069\u5FDC
FR-Designer_Font-Family=\u30D5\u30A9\u30F3\u30C8\u540D\u79F0 FR-Designer_Font-Family=\u30D5\u30A9\u30F3\u30C8\u540D\u79F0
FR-Designer_Font-Size=\u30D5\u30A9\u30F3\u30C8\u5927\u5C0F FR-Designer_Font-Size=\u30D5\u30A9\u30F3\u30C8\u5927\u5C0F
@ -222,7 +223,7 @@ FR-Designer-StyleAlignment_Style_Indentation=\u30A4\u30F3\u30C7\u30F3\u30C8
FR-Designer-StyleAlignment_Style_Spacing=\u9593\u9694\u8DDD\u96E2 FR-Designer-StyleAlignment_Style_Spacing=\u9593\u9694\u8DDD\u96E2
FR-Designer-StyleAlignment_Style_Alignment=\u63C3\u3048 FR-Designer-StyleAlignment_Style_Alignment=\u63C3\u3048
FR-Designer-CommitTab_Submit=\u63D0\u51FA\u3059\u308B FR-Designer-CommitTab_Submit=\u63D0\u51FA\u3059\u308B
FR-Designer-CommitTab_SureToDelete=Sure to delete FR-Designer-CommitTab_SureToDelete=\u524A\u9664\u3057\u307E\u3059\u304B
FR-Designer-CommitTab_Remove=\u524A\u9664 FR-Designer-CommitTab_Remove=\u524A\u9664
FR-Designer-Collect_Information_free=\u7121\u6599 FR-Designer-Collect_Information_free=\u7121\u6599
FR-Designer-Collect_Information_Description=\u8A18\u8FF0 FR-Designer-Collect_Information_Description=\u8A18\u8FF0
@ -369,13 +370,13 @@ FR-Designer_LiteCondition_ConditionB-OR=\u30AA\u30A2(OR)
FR-Designer_LiteCondition_Common_Condition=\u666E\u901A\u6761\u4EF6 FR-Designer_LiteCondition_Common_Condition=\u666E\u901A\u6761\u4EF6
FR-Designer_LiteCondition_Formula_Condition=\u516C\u5F0F\u6761\u4EF6 FR-Designer_LiteCondition_Formula_Condition=\u516C\u5F0F\u6761\u4EF6
FR-Designer_LiteCondition_Define=\u5B9A\u7FA9 FR-Designer_LiteCondition_Define=\u5B9A\u7FA9
FR-Designer_Select_All= FR-Designer_Select_All=\u5168\u9078\u629E
FR-Designer-Plugin_Expire_Dialog_Title=\u671F\u9650\u5207\u308C\u306E\u30D7\u30E9\u30B0\u30A4\u30F3 FR-Designer-Plugin_Expire_Dialog_Title=\u671F\u9650\u5207\u308C\u306E\u30D7\u30E9\u30B0\u30A4\u30F3
FR-Designer-Plugin_Expire_Dialog_Text=\u30D7\u30E9\u30B0\u30A4\u30F3\u306F\u3001\u8CFC\u5165\u3092\u3059\u308B\u305F\u3081\u306B\u5E06\u30BD\u30D5\u30C8\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30BB\u30F3\u30BF\u30FC\u3092\u884C\u304F\u3001\u6709\u52B9\u671F\u9650\u304C\u5207\u308C\u3066\u3044\u307E\u3059\u3002 FR-Designer-Plugin_Expire_Dialog_Text=\u30D7\u30E9\u30B0\u30A4\u30F3\u306F\u3001\u8CFC\u5165\u3092\u3059\u308B\u305F\u3081\u306B\u5E06\u30BD\u30D5\u30C8\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3\u30BB\u30F3\u30BF\u30FC\u3092\u884C\u304F\u3001\u6709\u52B9\u671F\u9650\u304C\u5207\u308C\u3066\u3044\u307E\u3059\u3002
FR-Designer-Plugin_Finerest_Addon=\u5E06\u8EDF\u5FDC\u7528\u30BB\u30F3\u30BF\u30FC FR-Designer-Plugin_Finerest_Addon=\u5E06\u8EDF\u5FDC\u7528\u30BB\u30F3\u30BF\u30FC
FR-Designer_Performance_First=\u6027\u80FD\u512A\u5148 FR-Designer_Performance_First=\u6027\u80FD\u512A\u5148
FR-Designer_Total_N_Grade=\u5168\u90E8\u3067\:${N}\u5C64 FR-Designer_Total_N_Grade=\u5168\u90E8\u3067\:${N}\u5C64
FR-Designer_time(s)= FR-Designer_time(s)=\u56DE
FR-Designer_General=\u5E38\u7528 FR-Designer_General=\u5E38\u7528
FR-Designer_Advanced=\u9AD8\u7D1A FR-Designer_Advanced=\u9AD8\u7D1A
FR-Designer_Oracle=\u3059\u3079\u3066\u306E\u30C6\u30FC\u30D6\u30EB FR-Designer_Oracle=\u3059\u3079\u3066\u306E\u30C6\u30FC\u30D6\u30EB
@ -407,10 +408,10 @@ FR-Designer_Current_Preview_Rows=\u73FE\u5728\u306E\u30D7\u30EC\u30D3\u30E5\u30F
FR-Designer_Data=\u30C7\u30FC\u30BF FR-Designer_Data=\u30C7\u30FC\u30BF
FR-Designer_Error=\u30A8\u30E9\u30FC FR-Designer_Error=\u30A8\u30E9\u30FC
FR-Designer-Website_Url=http\://www.finereport.com/jp FR-Designer-Website_Url=http\://www.finereport.com/jp
FR-Designer_formDesignerModule= FR-Designer_formDesignerModule=\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u30C7\u30B6\u30A4\u30CA\u30FC
FR-Designer-BBSLogin_Login-Title= FR-Designer-BBSLogin_Login-Title=BBS\u30ED\u30B0\u30A4\u30F3
FR-Designer_Get-CubeGetting= FR-Designer_Get-CubeGetting=cube\u53D6\u5F97
FR-Designer-BBSLogin_Download-Unlogin-Tip= FR-Designer-BBSLogin_Download-Unlogin-Tip=\u30ED\u30B0\u30A4\u30F3\u3057\u3066\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9
FR-Designer-App_ReLayout=\u96FB\u8A71\u518D\u30EC\u30A4\u30A2\u30A6\u30C8 FR-Designer-App_ReLayout=\u96FB\u8A71\u518D\u30EC\u30A4\u30A2\u30A6\u30C8
FR-Designer_Mobile-Attr=\u30E2\u30D0\u30A4\u30EB\u7AEF\u672B\u5C5E\u6027 FR-Designer_Mobile-Attr=\u30E2\u30D0\u30A4\u30EB\u7AEF\u672B\u5C5E\u6027
FR-Designer_Mobile-Vertical=\u7E26 FR-Designer_Mobile-Vertical=\u7E26
@ -435,60 +436,76 @@ FR-Designer_Widget_Scaling_Mode_Fixed=\u56FA\u5B9A\u30B5\u30A4\u30BA
FR-Designer-Widget_Area_Scaling=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30A8\u30EA\u30A2\ FR-Designer-Widget_Area_Scaling=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u30A8\u30EA\u30A2\
FR-Designer-QQLogin-Determine=\u6C7A\u5B9A\u3057\u307E\u3059 FR-Designer-QQLogin-Determine=\u6C7A\u5B9A\u3057\u307E\u3059
FR-Designer-QQLogin-Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB FR-Designer-QQLogin-Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB
FR-Designer-Reuse_Manager= FR-Designer-Reuse_Manager=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8
FR-Designer_Layout_Block_Absolute= FR-Designer_Layout_Block_Absolute=\u7D76\u5BFE\u30EC\u30A4\u30A2\u30A6\u30C8\u30D6\u30ED\u30C3\u30AF
FR-Designer_Layout_Block_Tab= FR-Designer_Layout_Block_Tab=Tab\u30D6\u30ED\u30C3\u30AF
FR-Designer_Layout_Block_Blank= FR-Designer_Layout_Block_Blank=\u7A7A\u767D\u30D6\u30ED\u30C3\u30AF
FR-Designer_Attr_Layout= FR-Designer_Attr_Layout=\u30EC\u30A4\u30A2\u30A6\u30C8
FR-Designer_Attr_Layout_Type= FR-Designer_Attr_Layout_Type=\u30EC\u30A4\u30A2\u30A6\u30C8\u65B9\u5F0F
FR-Designer_Attr_Bidirectional_Adaptive= FR-Designer_Attr_Bidirectional_Adaptive=\u53CC\u65B9\u5411\u81EA\u5DF1\u8ABF\u6574
FR-Designer_Download_Template= FR-Designer_Download_Template=\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u3092\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9
FR-Designer-Widget_Scaling_Mode=\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u8AD6\u7406 FR-Designer-Widget_Scaling_Mode=\u30B9\u30B1\u30FC\u30EA\u30F3\u30B0\u8AD6\u7406
FR-Designer_Mobile-Refresh= FR-Designer_Mobile-Refresh=\u66F4\u65B0
FR-Designer_Mobile-ToolBar= FR-Designer_Mobile-ToolBar=\u30C4\u30FC\u30EB\u30D0\u30FC
FR-Designer_WLayout-Absolute-ToolTips=\u81EA\u7531\u5F0F\u914D\u7F6E\u3067\u3059\u3002\u914D\u7F6E\u5185\u306E\u4EFB\u610F\u306E\u4F4D\u7F6E\u306B\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u3092\u8FFD\u52A0\u3059\u308B\u3053\u3068 FR-Designer_WLayout-Absolute-ToolTips=\u81EA\u7531\u5F0F\u914D\u7F6E\u3067\u3059\u3002\u914D\u7F6E\u5185\u306E\u4EFB\u610F\u306E\u4F4D\u7F6E\u306B\u30B3\u30F3\u30C8\u30ED\u30FC\u30EB\u3092\u8FFD\u52A0\u3059\u308B\u3053\u3068
FR-Designer_Add_all=\u3059\u3079\u3066\u8FFD\u52A0 FR-Designer_Add_all=\u3059\u3079\u3066\u8FFD\u52A0
FR-Designer_Language_Change_Successful= FR-Designer_Language_Change_Successful=\u65B0\u3057\u3044\u8A00\u8A9E\u306F\u518D\u8D77\u52D5\u5F8C\u306B\u4F7F\u7528\u3055\u308C\u307E\u3059\u3002
FR-Designer_Template_Web_Attributes= FR-Designer_Template_Web_Attributes=\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u30A6\u30A7\u30D6\u30D7\u30ED\u30D1\u30C6\u30A3
FR-Designer_Basic=\u57FA\u672C FR-Designer_Basic=\u57FA\u672C
FR-Designer_Printers(Server)=\u30D7\u30EA\u30F3\u30BF\u30FC(\u30B5\u30FC\u30D0) FR-Designer_Printers(Server)=\u30D7\u30EA\u30F3\u30BF\u30FC(\u30B5\u30FC\u30D0)
FR-Designer_Pagination_Setting=\u30DA\u30FC\u30B8\u5225\u30D7\u30EC\u30D3\u30E5\u30FC\u8A2D\u5B9A FR-Designer_Pagination_Setting=\u30DA\u30FC\u30B8\u5225\u30D7\u30EC\u30D3\u30E5\u30FC\u8A2D\u5B9A
FR-Designer_Write_Setting=\u5831\u544A\u30DA\u30FC\u30B8\u8A2D\u5B9A FR-Designer_Write_Setting=\u66F8\u304D\u8FBC\u307F\u30DA\u30FC\u30B8\u8A2D\u5B9A
FR-Designer_Data_Analysis_Settings=\u30C7\u30FC\u30BF\u5206\u6790\u8A2D\u5B9A FR-Designer_Data_Analysis_Settings=\u30C7\u30FC\u30BF\u5206\u6790\u8A2D\u5B9A
FR-Designer_Browser_Background=\u30D6\u30E9\u30A6\u30B6\u80CC\u666F FR-Designer_Browser_Background=\u30D6\u30E9\u30A6\u30B6\u80CC\u666F
FR-Designer_Import_Css=Css\u5F15\u7528 FR-Designer_Import_Css=Css\u5F15\u7528
FR-Designer_Import_JavaScript=JavaScript\u5F15\u7528 FR-Designer_Import_JavaScript=JavaScript\u5F15\u7528
FR-Designer-Datasource-Param_DES=<html>&nbsp; "${abc}"\u3092\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3068\u3057\u3066\u5165\u529B\u3067\u304D\u307E\u3059\u3002\u3053\u3053\u3067abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3002abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306E\u540D\u524D\u3067\u3059\u3002\u4F8B\u3048\u3070<br/>&nbsp;select * from table where id\=${abc}\u3002<br/>&nbsp;select * from table where id\='${abc}'\u3002(\u3082\u3057id\u306F\u6587\u5B57\u5217\u306A\u3089)</html>\uFFFD FR-Designer-Datasource-Param_DES=<html>&nbsp; "${abc}"\u3092\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3068\u3057\u3066\u5165\u529B\u3067\u304D\u307E\u3059\u3002\u3053\u3053\u3067abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u3002abc\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u306E\u540D\u524D\u3067\u3059\u3002\u4F8B\u3048\u3070<br/>&nbsp;select * from table where id\=${abc}\u3002<br/>&nbsp;select * from table where id\='${abc}'\u3002(\u3082\u3057id\u306F\u6587\u5B57\u5217\u306A\u3089)</html>\uFFFD
FR-Designer-DS-Database_Query=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30AF\u30A8\u30EA\u30FC FR-Designer-DS-Database_Query=\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30AF\u30A8\u30EA\u30FC
FR-Designer-LayerPageReport_PageQuery=\u30DA\u30FC\u30B8\u5225\u30AF\u30A8\u30EA FR-Designer-LayerPageReport_PageQuery=\u6539\u30DA\u30FC\u30B8\u691C\u7D22
FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u7FA9\u30DA\u30FC\u30B8\u5225\u30AF\u30A8\u30EAsql FR-Designer-LayerPageReport_Define_PageQuerySQL=\u6539\u30DA\u30FC\u30B8\u691C\u7D22sql\u3092\u66F8\u304F
FR-Designer_Is_Share_DBTableData=\u5171\u6709\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8 FR-Designer_Is_Share_DBTableData=\u5171\u6709\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8
FR-Designer_Event=\ FR-Designer_Event=\u30A4\u30D9\u30F3\u30C8
FR-Designer_Properties=FR-Designer_Properties=\ FR-Designer_Properties=\u30D7\u30ED\u30D1\u30C6\u30A3
\ FR-Designer_Permissions_Edition=\u6A29\u9650\u7DE8\u96C6
FR-Designer_Export_Excel_Page=\u6539\u30DA\u30FC\u30B8\u51FA\u529B
FR-Designer_Export_Excel_Simple=\u305D\u306E\u307E\u307E\u51FA\u529B
FR-Designer_Export_Excel_PageToSheet=\u6539\u30DA\u30FC\u30B8\uFF06\u30B7\u30FC\u30C8\u5206\u3051
FR-Designer_Export_failed=\u5C0E\u51FA\u306B\u5931\u6557\u3057\u307E\u3057\u305F FR-Designer_Export_failed=\u5C0E\u51FA\u306B\u5931\u6557\u3057\u307E\u3057\u305F
FR-Designer_Exported_successfully=\u5C0E\u51FA\u6210\u529F FR-Designer_Exported_successfully=\u5C0E\u51FA\u6210\u529F
FR-Designer_Exporting=\u5C0E\u51FA\u3057\u3066\u3044\u307E\u3059 FR-Designer_Exporting=\u5C0E\u51FA\u3057\u3066\u3044\u307E\u3059
FR-Designer_Export-PDF=PDF\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8FR-Designer_Button_OK=FR-Designer_Button_OK=\u78BA\u5B9A FR-Designer_Export-PDF=PDF\u30D5\u30A9\u30FC\u30DE\u30C3\u30C8
FR-Designer_Button_OK=\u78BA\u5B9A
FR-Designer_Button_Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB FR-Designer_Button_Cancel=\u30AD\u30E3\u30F3\u30BB\u30EB
\uFFFD FR-Designer_JavaScript=JavaScript
FR-Designer_JavaScript= FR-Designer_JavaScript_Form_Submit=\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u66F8\u304D\u8FBC\u307F
FR-Designer_JavaScript_Form_Submit= FR-Designer_JavaScript_Commit_to_Database=DB\u306B\u66F8\u304D\u8FBC\u307F
FR-Designer_JavaScript_Commit_to_Database= FR-Designer_JavaScript_Custom=\u30AB\u30B9\u30BF\u30E0
FR-Designer_JavaScript_Custom= FR-Designer_RWA_Submit=\u66F8\u304D\u8FBC\u307F
FR-Designer_RWA_Submit= FR-Designer_Event_Name=\u30A4\u30D9\u30F3\u30C8\u540D
FR-Designer_Event_Name= FR-Designer_Event_Type=\u30A4\u30D9\u30F3\u30C8\u30BF\u30A4\u30D7
FR-Designer_Event_Type= FR-Designer_Event_Name_Type=\u30A4\u30D9\u30F3\u30C8\u540D\u3068\u30BF\u30A4\u30D7
FR-Designer_Event_Name_Type= FR-Designer_JavaScript_Set=JS\u8A2D\u5B9A
FR-Designer_JavaScript_Set= FR-Designer_Attribute=\u30D7\u30ED\u30D1\u30C6\u30A3
FR-Designer_Attribute= FR-Designer_Form_Editing_Listeners=\u30A4\u30D9\u30F3\u30C8\u7DE8\u96C6
FR-Designer_Form_Editing_Listeners= FR-Designer_Form_Basic_Properties=\u57FA\u672C\u30D7\u30ED\u30D1\u30C6\u30A3
FR-Designer_Form_Basic_Properties= FR-Designer_DS_Dictionary=\u30C7\u30FC\u30BF\u8F9E\u66F8
FR-Designer_DS_Dictionary= FR-Designer_Create_Tree=\u30C4\u30EA\u30FC\u69CB\u7BC9
FR-Designer_Create_Tree= FR-Designer_Set_Callback_Function=\u30B3\u30FC\u30EB\u30D0\u30C3\u30AF\u95A2\u6570\u8A2D\u5B9A
FR-Designer_Set_Callback_Function= FR-Designer_ConfirmDialog_Content=tab\u30A6\u30A3\u30B8\u30A7\u30C3\u30C8\u3092\u524A\u9664\u3057\u307E\u3059\u304B
FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Title=FineReport 8.0
FR-Designer_ConfirmDialog_Title= FR-Designer_FormulaPane_Tips=\u30D2\u30F3\u30C8\:B1\u3092\u5165\u529B
FR-Designer_FormulaPane_Variables=\u5909\u6570
FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8AAC\u660E
FR-Designer_FormulaPane_Function_Detail=\u95A2\u6570\u660E\u7D30
FR-Designer_FormulaPane_Search=\u691C\u7D22
FR-Designer_Tab_carousel=tab\u30AB\u30EB\u30FC\u30BB\u30EB
FR-Designer_setCarousel=\u30AB\u30EB\u30FC\u30BB\u30EB\u30AA\u30F3
FR-Designer_carouselInterval=\u30AB\u30EB\u30FC\u30BB\u30EB\u9593\u9694
FR-Designer_ClassName_panel=\u985E\u540D
FR-Designer_Description_panel=\u8A18\u8FF0
FR-Designer_Edit_panel=\u7DE8\u96C6
FR-Designer_Property_panel=\u5C5E\u6027
FR-Designer_Select_panel=\u9078\u629E
FR-Designer_LayoutTable_Column_Width=160 FR-Designer_LayoutTable_Column_Width=160
FR-Designer_Set_BG_Of_Current_Row=\u5831\u544A\u30AB\u30EC\u30F3\u30C8\u7DE8\u96C6\u884C\u80CC\u666F\u8A2D\u5B9A FR-Designer_Set_BG_Of_Current_Row=\u5831\u544A\u30AB\u30EC\u30F3\u30C8\u7DE8\u96C6\u884C\u80CC\u666F\u8A2D\u5B9A
FR-Designer_Unload_Check=\u63D0\u51FA\u305B\u305A\u306B\u30D2\u30F3\u30C8 FR-Designer_Unload_Check=\u63D0\u51FA\u305B\u305A\u306B\u30D2\u30F3\u30C8
@ -496,20 +513,6 @@ FR-Designer_ReportColumns_Columns_Optional=\u6BB5\u7D44\u307F
FR-Designer_Row_Icon_File_Name=row.png FR-Designer_Row_Icon_File_Name=row.png
FR-Designer_Center_Display=\u4E2D\u592E\u63C3\u3048\u8868\u793A FR-Designer_Center_Display=\u4E2D\u592E\u63C3\u3048\u8868\u793A
FR-Designer_Left_Display=\u5DE6\u8868\u793A FR-Designer_Left_Display=\u5DE6\u8868\u793A
FR-Designer_Background_Null=
FR-Designer_Background_Color=
FR-Designer_Background_Texture=
FR-Designer_Background_Pattern=
FR-Designer_Background_Gradient_Color=
FR-Designer_Background_Image=
FR-Designer_Background_Clear=
FR-Designer_Background_Image_Select=
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=
FR-Designer_Initial_Background_Tips=
FR-Designer_Mouse_Move_Tips=
FR-Designer_Mouse_Click_Tips=
FR-Designer_About_Version=\u30D0\u30FC\u30B8\u30E7\u30F3 FR-Designer_About_Version=\u30D0\u30FC\u30B8\u30E7\u30F3
FR-Designer_About_CopyRight=\u8457\u4F5C\u6A29\u6240\u6709 FR-Designer_About_CopyRight=\u8457\u4F5C\u6A29\u6240\u6709
FR-Designer_Service_Phone=\u30B5\u30FC\u30D3\u30B9\u96FB\u8A71\uFF1A FR-Designer_Service_Phone=\u30B5\u30FC\u30D3\u30B9\u96FB\u8A71\uFF1A
@ -518,6 +521,7 @@ FR-Designer_PageSetup_Page=\u30DA\u30FC\u30B8
FR-Designer_Custom_Job_Description=\u8A18\u8FF0 FR-Designer_Custom_Job_Description=\u8A18\u8FF0
FR-Designer_Property=\u5C5E\u6027 FR-Designer_Property=\u5C5E\u6027
FR-Designer_ClassName=\u985E\u540D FR-Designer_ClassName=\u985E\u540D
FR-Designer_Polyblock_Edit=\u30A2\u30B0\u30EA\u30B2\u30FC\u30B7\u30E7\u30F3\u30D6\u30ED\u30C3\u30AF\u7DE8\u96C6 FR-Designer_Polyblock_Edit=\u30A2\u30B0\u30EA\u30B2\u30FC\u30B7\u30E7\u30F3\u30D6\u30ED\u30C3\u30AF\u7DE8\u96C6
FR-Designer_Function_Description_Area_Text=\u3053\u306E\u30AF\u30E9\u30B9\u306F\u7D99\u627F\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"com.fr.script.AbstractFunction"\u3002\u3092\u7D99\u627F\u3059\u3079\u304D\u3067\u3059\u3002\u30B3\u30F3\u30D1\u30A4\u30EB\u5F8C\u306E\u985E\u30D5\u30A1\u30A4\u30EB\u3092\nJ2EE\u30B5\u30FC\u30D0\u30FC "{R1}WEB-INF{R2}classes" \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3002\u306B\u30B3\u30D4\u30FC\u3057\u3066\u3001class\u306B\u5BFE\u5FDC\u3059\u308Bjava\u30D5\u30A1\u30A4\u30EB\u3082\u5F53\u76EE\u6B21\u306B\u7F6E\u3044\u3066\u304F\u3060\u3055\u3044\u3002\n\u4F8B\u3048\u3070\uFF1A{R3}classes FR-Designer_Function_Description_Area_Text=\u3053\u306E\u30AF\u30E9\u30B9\u306F\u7D99\u627F\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"com.fr.script.AbstractFunction"\u3002\u3092\u7D99\u627F\u3059\u3079\u304D\u3067\u3059\u3002\u30B3\u30F3\u30D1\u30A4\u30EB\u5F8C\u306E\u985E\u30D5\u30A1\u30A4\u30EB\u3092\nJ2EE\u30B5\u30FC\u30D0\u30FC "{R1}WEB-INF{R2}classes" \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3002\u306B\u30B3\u30D4\u30FC\u3057\u3066\u3001class\u306B\u5BFE\u5FDC\u3059\u308Bjava\u30D5\u30A1\u30A4\u30EB\u3082\u5F53\u76EE\u6B21\u306B\u7F6E\u3044\u3066\u304F\u3060\u3055\u3044\u3002\n\u4F8B\u3048\u3070\uFF1A{R3}classes
FR-Designer_PageSetup_Horizontal=\u6A2A\u65B9\u5411 FR-Designer_PageSetup_Horizontal=\u6A2A\u65B9\u5411
@ -533,11 +537,5 @@ FR-Designer_Show_As_Download=\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u30EA\u30F3\u3
FR-Designer_File_Name_For_Download=\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u30D5\u30A1\u30A4\u30EB\u540D FR-Designer_File_Name_For_Download=\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u30D5\u30A1\u30A4\u30EB\u540D
FR-Designer_No=\u3044\u3044\u3048 FR-Designer_No=\u3044\u3044\u3048
FR-Designer_Pagination=\u30DA\u30FC\u30B8\u30F3\u30B0 FR-Designer_Pagination=\u30DA\u30FC\u30B8\u30F3\u30B0
FR-Designer-Move_Tab_First=
FR-Designer-Move_Tab_End=
FR-Designer-Move_Tab_Next=
FR-Designer-Move_Tab_Prev=
FR-Designer_Role=
FR-Designer_DS_TableData=\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9 FR-Designer_DS_TableData=\u30C7\u30FC\u30BF\u30BD\u30FC\u30B9
FR-Designer_Parameter-Formula=\u6570\u5F0F FR-Designer_Parameter-Formula=\u6570\u5F0F
FR-Designer_Plugin_Should_Update_Please_Contact_Developer=

41
designer_base/src/com/fr/design/locale/designer_ko_KR.properties

@ -100,6 +100,7 @@ FR-Designer_FS_Close_Other_Templates=\uAE30\uD0C0\uD15C\uD50C\uB9BF\uB2EB\uAE30
FR-Designer_File=\uD30C\uC77C FR-Designer_File=\uD30C\uC77C
FR-Designer_Filter_Conditions=\uD544\uD130\uC870\uAC74 FR-Designer_Filter_Conditions=\uD544\uD130\uC870\uAC74
FR-Designer_Finish-Modify-Share=\uC218\uC815\uC644\uB8CC\uBC0F\uACF5\uC720 FR-Designer_Finish-Modify-Share=\uC218\uC815\uC644\uB8CC\uBC0F\uACF5\uC720
FR-Designer_Fit-App=App\uC790\uAE30\uC801\uC751
FR-Designer_Fit=\uC790\uAE30\uC801\uC751 FR-Designer_Fit=\uC790\uAE30\uC801\uC751
FR-Designer_Font-Family=\uAE00\uAF34\uBA85\uCE6D FR-Designer_Font-Family=\uAE00\uAF34\uBA85\uCE6D
FR-Designer_Font-Size=\uAE00\uAF34\uD06C\uAE30 FR-Designer_Font-Size=\uAE00\uAF34\uD06C\uAE30
@ -460,6 +461,10 @@ FR-Designer_Is_Share_DBTableData=\uB370\uC774\uD130\uC138\uD2B8\uACF5\uC720
FR-Designer-LayerPageReport_PageQuery=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30 FR-Designer-LayerPageReport_PageQuery=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30
FR-Designer-LayerPageReport_Define_PageQuerySQL=\uC815\uC758\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30sql FR-Designer-LayerPageReport_Define_PageQuerySQL=\uC815\uC758\uD398\uC774\uC9C0\uB098\uB204\uAE30\uCC3E\uC544\uBCF4\uAE30sql
FR-Designer_Event= FR-Designer_Event=
FR-Designer_Permissions_Edition=\uAD8C\uD55C\uD3B8\uC9D1
FR-Designer_Export_Excel_Page=\uD398\uC774\uC9C0\uB098\uB204\uAE30\uC5B4\uB0B4\uBCF4\uB0B4\uAE30
FR-Designer_Export_Excel_Simple=\uC6D0\uB798\uBAA8\uC2B5\uB0B4\uBCF4\uB0B4\uAE30
FR-Designer_Export_Excel_PageToSheet=\uD398\uC774\uC9C0\uC640 Sheet\uB098\uB204\uC5B4\uB0B4\uBCF4\uB0B4\uAE30
FR-Designer_Properties=\uFFFD FR-Designer_Properties=\uFFFD
FR-Designer_Export_failed=\uB0B4\uBCF4\uB0B4\uAE30\uC2E4\uD328 FR-Designer_Export_failed=\uB0B4\uBCF4\uB0B4\uAE30\uC2E4\uD328
FR-Designer_Exported_successfully=\uB0B4\uBCF4\uB0B4\uAE30\uC131\uACF5 FR-Designer_Exported_successfully=\uB0B4\uBCF4\uB0B4\uAE30\uC131\uACF5
@ -484,6 +489,19 @@ FR-Designer_Create_Tree=
FR-Designer_Set_Callback_Function= FR-Designer_Set_Callback_Function=
FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Content=
FR-Designer_ConfirmDialog_Title= FR-Designer_ConfirmDialog_Title=
FR-Designer_FormulaPane_Tips=\uC54C\uB9BC\: B1\uC744\uC785\uB825\uD558\uC5EC\uCCAB\uBC88\uC9F8\uD589\uB450\uBC88\uC9F8\uC5F4\uC758\uB370\uC774\uD130\uB97C\uC785\uB825\uD560\uC218\uC788\uC2B5\uB2C8\uB2E4.
FR-Designer_FormulaPane_Variables=\uBCC0\uC218
FR-Designer_FormulaPane_Formula_Description=\uC218\uC2DD\uC124\uBA85
FR-Designer_FormulaPane_Function_Detail=\uD568\uC218\uC0C1\uC138\uC0AC\uD56D
FR-Designer_FormulaPane_Search=\uAC80\uC0C9
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=
FR-Designer_ClassName_panel=\uD074\uB798\uC2A4\uB124\uC784
FR-Designer_Description_panel=\uC124\uBA85
FR-Designer_Edit_panel=\uD3B8\uC9D1
FR-Designer_Property_panel=\uC18D\uC131
FR-Designer_Select_panel=\uC120\uD0DD
FR-Designer_LayoutTable_Column_Width=160 FR-Designer_LayoutTable_Column_Width=160
FR-Designer_Set_BG_Of_Current_Row=\uAE30\uC785\uD604\uC7AC\uD3B8\uC9D1\uD589\uBC30\uACBD\uC124\uC815 FR-Designer_Set_BG_Of_Current_Row=\uAE30\uC785\uD604\uC7AC\uD3B8\uC9D1\uD589\uBC30\uACBD\uC124\uC815
FR-Designer_Unload_Check=\uBBF8\uC81C\uCD9C\uB098\uAC14\uC74C\uC54C\uB9BC FR-Designer_Unload_Check=\uBBF8\uC81C\uCD9C\uB098\uAC14\uC74C\uC54C\uB9BC
@ -491,20 +509,6 @@ FR-Designer_ReportColumns_Columns_Optional=\uC140\uB098\uB204\uAE30
FR-Designer_Row_Icon_File_Name=row.png FR-Designer_Row_Icon_File_Name=row.png
FR-Designer_Center_Display=\uAC00\uC6B4\uB370\uC815\uB82C\uBCF4\uC774\uAE30 FR-Designer_Center_Display=\uAC00\uC6B4\uB370\uC815\uB82C\uBCF4\uC774\uAE30
FR-Designer_Left_Display=\uC67C\uCABD\uBCF4\uC774\uAE30 FR-Designer_Left_Display=\uC67C\uCABD\uBCF4\uC774\uAE30
FR-Designer_Background_Null=
FR-Designer_Background_Color=
FR-Designer_Background_Texture=
FR-Designer_Background_Pattern=
FR-Designer_Background_Gradient_Color=
FR-Designer_Background_Image=
FR-Designer_Background_Clear=
FR-Designer_Background_Image_Select=
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=
FR-Designer_Initial_Background_Tips=
FR-Designer_Mouse_Move_Tips=
FR-Designer_Mouse_Click_Tips=
FR-Designer_About_Version=\uBC84\uC804 FR-Designer_About_Version=\uBC84\uC804
FR-Designer_About_CopyRight=\uD310\uAD8C\uC18C\uC720 FR-Designer_About_CopyRight=\uD310\uAD8C\uC18C\uC720
FR-Designer_Service_Phone=\uC11C\uBE44\uC2A4\uC804\uD654\uFF1A FR-Designer_Service_Phone=\uC11C\uBE44\uC2A4\uC804\uD654\uFF1A
@ -513,6 +517,8 @@ FR-Designer_PageSetup_Page=\uC6F9\uD398\uC774\uC9C0
FR-Designer_Custom_Job_Description=\uC124\uBA85 FR-Designer_Custom_Job_Description=\uC124\uBA85
FR-Designer_Property=\uC18D\uC131 FR-Designer_Property=\uC18D\uC131
FR-Designer_ClassName=\uD074\uB798\uC2A4\uB124\uC784 FR-Designer_ClassName=\uD074\uB798\uC2A4\uB124\uC784
FR-Designer_Template_Web_Attributes=\uD15C\uD50C\uB9BF \uC6F9 \uC18D\uC131
FR-Designer_Polyblock_Edit=\uCDE8\uD569\uBE14\uB7ED\uD3B8\uC9D1 FR-Designer_Polyblock_Edit=\uCDE8\uD569\uBE14\uB7ED\uD3B8\uC9D1
FR-Designer_Function_Description_Area_Text=\uD574\uB2F9\uD074\uB798\uC2A4\uB294\uACC4\uC2B9\uD574\uC57C\uD55C\uB2E4."com.fr.script.AbstractFunction".\uCEF4\uD30C\uC77C\uD6C4\uC758\uD074\uB798\uC2A4\uD30C\uC77C\uC744~\uB85C\uBCF5\uC0AC\nJ2EE\uC11C\uBC84 "{R1}WEB-INF{R2}classes" \uB514\uB809\uD130\uB9AC, \uD544\uC694\uC2DC class \uC0C1\uC751\uD558\uB294 java\uC18C\uC2A4\uD30C\uC77C\uB3C4\uD574\uB2F9\uB514\uB809\uD130\uB9AC\uD558\uB2E8\uC5D0\uB450\uC5B4\uD3B8\uC9D1\uBC0F\uCC3E\uC544\uBCF4\uAE30\uB97C\uD560\uC218\uC788\uC2B5\uB2C8\uB2E4.\n\uC608: {R3}classes FR-Designer_Function_Description_Area_Text=\uD574\uB2F9\uD074\uB798\uC2A4\uB294\uACC4\uC2B9\uD574\uC57C\uD55C\uB2E4."com.fr.script.AbstractFunction".\uCEF4\uD30C\uC77C\uD6C4\uC758\uD074\uB798\uC2A4\uD30C\uC77C\uC744~\uB85C\uBCF5\uC0AC\nJ2EE\uC11C\uBC84 "{R1}WEB-INF{R2}classes" \uB514\uB809\uD130\uB9AC, \uD544\uC694\uC2DC class \uC0C1\uC751\uD558\uB294 java\uC18C\uC2A4\uD30C\uC77C\uB3C4\uD574\uB2F9\uB514\uB809\uD130\uB9AC\uD558\uB2E8\uC5D0\uB450\uC5B4\uD3B8\uC9D1\uBC0F\uCC3E\uC544\uBCF4\uAE30\uB97C\uD560\uC218\uC788\uC2B5\uB2C8\uB2E4.\n\uC608: {R3}classes
FR-Designer_PageSetup_Horizontal=\uAC00\uB85C FR-Designer_PageSetup_Horizontal=\uAC00\uB85C
@ -528,12 +534,5 @@ FR-Designer_Show_As_Download=\uB2E4\uC6B4\uB85C\uB4DC\uB9C1\uD06C\uB85C2\uC9C4\u
FR-Designer_File_Name_For_Download=\uB2E4\uC6B4\uB85C\uB4DC\uD30C\uC77C\uBA85 FR-Designer_File_Name_For_Download=\uB2E4\uC6B4\uB85C\uB4DC\uD30C\uC77C\uBA85
FR-Designer_No=\uC544\uB2C8\uC624 FR-Designer_No=\uC544\uB2C8\uC624
FR-Designer_Pagination=\uD398\uC774\uC9C0\uB098\uB204\uAE30 FR-Designer_Pagination=\uD398\uC774\uC9C0\uB098\uB204\uAE30
FR-Designer-Move_Tab_First=
FR-Designer-Move_Tab_End=
FR-Designer-Move_Tab_Next=
FR-Designer-Move_Tab_Prev=
FR-Designer_Role=
FR-Designer_DS_TableData=\uB370\uC774\uD130\uC138\uD2B8 FR-Designer_DS_TableData=\uB370\uC774\uD130\uC138\uD2B8
FR-Designer_Parameter-Formula=\uC218\uC2DD FR-Designer_Parameter-Formula=\uC218\uC2DD
FR-Designer_Plugin_Should_Update_Please_Contact_Developer=

45
designer_base/src/com/fr/design/locale/designer_zh_CN.properties

@ -100,6 +100,7 @@ FR-Designer_FS_Close_Other_Templates=\u5173\u95ED\u5176\u4ED6\u6A21\u677F
FR-Designer_File=\u6587\u4EF6 FR-Designer_File=\u6587\u4EF6
FR-Designer_Filter_Conditions=\u8FC7\u6EE4\u6761\u4EF6 FR-Designer_Filter_Conditions=\u8FC7\u6EE4\u6761\u4EF6
FR-Designer_Finish-Modify-Share=\u5B8C\u6210\u4FEE\u6539\u5E76\u5206\u4EAB FR-Designer_Finish-Modify-Share=\u5B8C\u6210\u4FEE\u6539\u5E76\u5206\u4EAB
FR-Designer_Fit-App=App\u81EA\u9002\u5E94
FR-Designer_Fit=\u81EA\u9002\u5E94 FR-Designer_Fit=\u81EA\u9002\u5E94
FR-Designer_Font-Family=\u5B57\u4F53\u540D\u79F0 FR-Designer_Font-Family=\u5B57\u4F53\u540D\u79F0
FR-Designer_Font-Size=\u5B57\u4F53\u5927\u5C0F FR-Designer_Font-Size=\u5B57\u4F53\u5927\u5C0F
@ -358,6 +359,7 @@ FR-Designer_KeyPoint=\u5173\u952E\u8282\u70B9
FR-Designer_loadedTreeModel=\u52A0\u8F7D\u5931\u8D25,\u8BF7\u68C0\u67E5\u540E\u91CD\u8BD5 FR-Designer_loadedTreeModel=\u52A0\u8F7D\u5931\u8D25,\u8BF7\u68C0\u67E5\u540E\u91CD\u8BD5
FR-Designer-Failed_to_load_the_plugin=\u65E0\u6CD5\u52A0\u8F7D\u63D2\u4EF6\uFF0C\u8BF7\u66F4\u65B0\u63D2\u4EF6\uFF1A FR-Designer-Failed_to_load_the_plugin=\u65E0\u6CD5\u52A0\u8F7D\u63D2\u4EF6\uFF0C\u8BF7\u66F4\u65B0\u63D2\u4EF6\uFF1A
FR-Designer-Plugin_Please_Update_Jar=\u8BF7\u66F4\u65B0Jar\u5305, \u63D2\u4EF6\u9700\u6C42\u6700\u4F4E\u7248\u672C FR-Designer-Plugin_Please_Update_Jar=\u8BF7\u66F4\u65B0Jar\u5305, \u63D2\u4EF6\u9700\u6C42\u6700\u4F4E\u7248\u672C
FR-Designer-Invalid_Page_Number=\u65E0\u6548\u9875\u7801
FR-Designer_Get-CubeGetting=\u83B7\u53D6cube FR-Designer_Get-CubeGetting=\u83B7\u53D6cube
FR-Designer_XMLA_Database=\u6570\u636E\u5E93 FR-Designer_XMLA_Database=\u6570\u636E\u5E93
FR-Designer_XMLA_UserName=\u7528\u6237\u540D FR-Designer_XMLA_UserName=\u7528\u6237\u540D
@ -490,6 +492,10 @@ FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u4E49\u5206\u9875\u67E5\u
FR-Designer_Is_Share_DBTableData=\u5171\u4EAB\u6570\u636E\u96C6 FR-Designer_Is_Share_DBTableData=\u5171\u4EAB\u6570\u636E\u96C6
FR-Designer_Event=\u4E8B\u4EF6 FR-Designer_Event=\u4E8B\u4EF6
FR-Designer_Properties=\u5C5E\u6027 FR-Designer_Properties=\u5C5E\u6027
FR-Designer_Permissions_Edition=\u6743\u9650\u7F16\u8F91
FR-Designer_Export_Excel_Page=\u5206\u9875\u5BFC\u51FA
FR-Designer_Export_Excel_Simple=\u539F\u6837\u5BFC\u51FA
FR-Designer_Export_Excel_PageToSheet=\u5206\u9875\u5206Sheet\u5BFC\u51FA
FR-Designer_Export_failed=\u5BFC\u51FA\u5931\u8D25 FR-Designer_Export_failed=\u5BFC\u51FA\u5931\u8D25
FR-Designer_Exported_successfully=\u5BFC\u51FA\u6210\u529F FR-Designer_Exported_successfully=\u5BFC\u51FA\u6210\u529F
FR-Designer_Exporting=\u6B63\u5728\u5BFC\u51FA FR-Designer_Exporting=\u6B63\u5728\u5BFC\u51FA
@ -514,6 +520,22 @@ FR-Designer_Create_Tree=\u6784\u5EFA\u6811
FR-Designer_Set_Callback_Function=\u8BBE\u7F6E\u56DE\u8C03\u51FD\u6570 FR-Designer_Set_Callback_Function=\u8BBE\u7F6E\u56DE\u8C03\u51FD\u6570
FR-Designer_ConfirmDialog_Content=\u662F\u5426\u786E\u5B9A\u5220\u9664tab\u63A7\u4EF6 FR-Designer_ConfirmDialog_Content=\u662F\u5426\u786E\u5B9A\u5220\u9664tab\u63A7\u4EF6
FR-Designer_ConfirmDialog_Title=FineReport 8.0 FR-Designer_ConfirmDialog_Title=FineReport 8.0
FR-Designer_FormulaPane_Tips=\u63D0\u793A\:\u60A8\u53EF\u4EE5\u901A\u8FC7\u8F93\u5165B1\u6765\u5199\u5165\u7B2C\u4E00\u884C\u7B2C\u4E8C\u5217\u7684\u6570\u636E\u3002
FR-Designer_FormulaPane_Variables=\u53D8\u91CF
FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8BF4\u660E
FR-Designer_FormulaPane_Function_Detail=\u51FD\u6570\u660E\u7EC6
FR-Designer_FormulaPane_Search=\u641C\u7D22
FR-Designer_Tab_carousel=tab\u8F6E\u64AD
FR-Designer_setCarousel=\u5F00\u542F\u8F6E\u64AD
FR-Designer_carouselInterval=\u8F6E\u64AD\u95F4\u9694
FR-Designer_ClassName_panel=\u7C7B\u540D
FR-Designer_Description_panel=\u63CF\u8FF0
FR-Designer_Edit_panel=\u7F16\u8F91
FR-Designer_Property_panel=\u5C5E\u6027
FR-Designer_Select_panel=\u9009\u62E9
FR-Designer_LayoutTable_Column_Width=160 FR-Designer_LayoutTable_Column_Width=160
FR-Designer_Set_BG_Of_Current_Row=\u586B\u62A5\u5F53\u524D\u7F16\u8F91\u884C\u80CC\u666F\u8BBE\u7F6E FR-Designer_Set_BG_Of_Current_Row=\u586B\u62A5\u5F53\u524D\u7F16\u8F91\u884C\u80CC\u666F\u8BBE\u7F6E
FR-Designer_Unload_Check=\u672A\u63D0\u4EA4\u79BB\u5F00\u63D0\u793A FR-Designer_Unload_Check=\u672A\u63D0\u4EA4\u79BB\u5F00\u63D0\u793A
@ -521,20 +543,6 @@ FR-Designer_ReportColumns_Columns_Optional=\u5206\u680F
FR-Designer_Row_Icon_File_Name=row.png FR-Designer_Row_Icon_File_Name=row.png
FR-Designer_Center_Display=\u5C45\u4E2D\u5C55\u793A FR-Designer_Center_Display=\u5C45\u4E2D\u5C55\u793A
FR-Designer_Left_Display=\u5DE6\u5C55\u793A FR-Designer_Left_Display=\u5DE6\u5C55\u793A
FR-Designer_Background_Null=\u6CA1\u6709\u80CC\u666F
FR-Designer_Background_Color=\u989C\u8272
FR-Designer_Background_Texture=\u7EB9\u7406
FR-Designer_Background_Pattern=\u56FE\u6848
FR-Designer_Background_Gradient_Color=\u6E10\u53D8\u8272
FR-Designer_Background_Image=\u56FE\u7247
FR-Designer_Background_Clear=\u6E05\u9664
FR-Designer_Background_Image_Select=\u9009\u62E9\u56FE\u7247
FR-Designer_Tab_carousel=tab\u8F6E\u64AD
FR-Designer_setCarousel=\u5F00\u542F\u8F6E\u64AD
FR-Designer_carouselInterval=\u8F6E\u64AD\u95F4\u9694
FR-Designer_Initial_Background_Tips=\u6309\u94AE\u7684\u521D\u59CB\u80CC\u666F
FR-Designer_Mouse_Move_Tips=\u9F20\u6807\u79FB\u52A8\u5230\u6309\u94AE\u4E0A\u7684\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F
FR-Designer_Mouse_Click_Tips=\u9F20\u6807\u70B9\u51FB\u6309\u94AE\u65F6\u80CC\u666F\uFF0C\u82E5\u65E0\u5219\u4E0D\u6539\u53D8\u80CC\u666F
FR-Designer_About_Version=\u7248\u672C FR-Designer_About_Version=\u7248\u672C
FR-Designer_About_CopyRight=\u7248\u6743\u6240\u6709 FR-Designer_About_CopyRight=\u7248\u6743\u6240\u6709
FR-Designer_Service_Phone=\u670D\u52A1\u7535\u8BDD\uFF1A FR-Designer_Service_Phone=\u670D\u52A1\u7535\u8BDD\uFF1A
@ -543,6 +551,7 @@ FR-Designer_PageSetup_Page=\u9875\u9762
FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Custom_Job_Description=\u63CF\u8FF0
FR-Designer_Property=\u5C5E\u6027 FR-Designer_Property=\u5C5E\u6027
FR-Designer_ClassName=\u7C7B\u540D FR-Designer_ClassName=\u7C7B\u540D
FR-Designer_Polyblock_Edit=\u805A\u5408\u5757\u7F16\u8F91 FR-Designer_Polyblock_Edit=\u805A\u5408\u5757\u7F16\u8F91
FR-Designer_Function_Description_Area_Text=\u8BE5\u7C7B\u5FC5\u987B\u7EE7\u627F"com.fr.script.AbstractFunction"\u3002\u5E94\u5C06\u7F16\u8BD1\u540E\u7684\u7C7B\u6587\u4EF6\u62F7\u8D1D\u5230\nJ2EE\u670D\u52A1\u5668 "{R1}WEB-INF{R2}classes" \u76EE\u5F55\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8BDD\u5C06class\u5BF9\u5E94\u7684java\u6E90\u6587\u4EF6\u4E5F\u653E\u7F6E\u5230\u8BE5\u76EE\u5F55\u4E0B\u65B9\u4FBF\u7F16\u8F91\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R3}classes FR-Designer_Function_Description_Area_Text=\u8BE5\u7C7B\u5FC5\u987B\u7EE7\u627F"com.fr.script.AbstractFunction"\u3002\u5E94\u5C06\u7F16\u8BD1\u540E\u7684\u7C7B\u6587\u4EF6\u62F7\u8D1D\u5230\nJ2EE\u670D\u52A1\u5668 "{R1}WEB-INF{R2}classes" \u76EE\u5F55\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8BDD\u5C06class\u5BF9\u5E94\u7684java\u6E90\u6587\u4EF6\u4E5F\u653E\u7F6E\u5230\u8BE5\u76EE\u5F55\u4E0B\u65B9\u4FBF\u7F16\u8F91\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R3}classes
FR-Designer_PageSetup_Horizontal=\u6A2A\u5411 FR-Designer_PageSetup_Horizontal=\u6A2A\u5411
@ -558,11 +567,9 @@ FR-Designer_Show_As_Download=\u7528\u4E0B\u8F7D\u94FE\u63A5\u663E\u793A\u4E8C\u8
FR-Designer_File_Name_For_Download=\u4E0B\u8F7D\u6587\u4EF6\u540D FR-Designer_File_Name_For_Download=\u4E0B\u8F7D\u6587\u4EF6\u540D
FR-Designer_No=\u5426 FR-Designer_No=\u5426
FR-Designer_Pagination=\u5206\u9875 FR-Designer_Pagination=\u5206\u9875
FR-Designer-Move_Tab_First=\u79FB\u52A8\u5230\u9996\u4F4D
FR-Designer-Move_Tab_End=\u79FB\u52A8\u5230\u672B\u5C3E
FR-Designer-Move_Tab_Next=\u5F80\u540E\u79FB\u52A8
FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52A8
FR-Designer_Role=\u89D2\u8272
FR-Designer_DS_TableData=\u6570\u636E\u96C6 FR-Designer_DS_TableData=\u6570\u636E\u96C6
FR-Designer_Parameter-Formula=\u516C\u5F0F FR-Designer_Parameter-Formula=\u516C\u5F0F
FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u63D2\u4EF6\u7248\u672C\u8FC7\u4F4E, \u5B58\u5728API\u4E0D\u517C\u5BB9, \u8BF7\u8054\u7CFB\u5F00\u53D1\u8005\u5347\u7EA7\u63D2\u4EF6 FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u63D2\u4EF6\u7248\u672C\u8FC7\u4F4E, \u5B58\u5728API\u4E0D\u517C\u5BB9, \u8BF7\u8054\u7CFB\u5F00\u53D1\u8005\u5347\u7EA7\u63D2\u4EF6
FR-Designer_WidgetOrder=\u63A7\u4EF6\u987A\u5E8F
FR-Designer_Mobile_Form_Analysis_Annotation=\u6CE8\u91CA\uFF1A\u53EF\u4EE5\u901A\u8FC7\u8BE5\u5C5E\u6027\u63A7\u5236\u8868\u5355\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\u3002
FR-Designer_Mobile_Report_Analysis_Annotation=\u6CE8\u91CA\: \u53EF\u4EE5\u901A\u8FC7\u8BE5\u5C5E\u6027\u63A7\u5236\u62A5\u8868\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\uFF0C\u53EA\u652F\u6301\u5206\u9875\u9884\u89C8\uFF0C\u586B\u62A5\u9884\u89C8\u65F6\u5C5E\u6027\u65E0\u6548\u3002

93
designer_base/src/com/fr/design/locale/designer_zh_TW.properties

@ -100,6 +100,7 @@ FR-Designer_FS_Close_Other_Templates=\u95DC\u9589\u5176\u4ED6\u7BC4\u672C
FR-Designer_File=\u6A94\u6848 FR-Designer_File=\u6A94\u6848
FR-Designer_Filter_Conditions=\u904E\u6FFE\u689D\u4EF6 FR-Designer_Filter_Conditions=\u904E\u6FFE\u689D\u4EF6
FR-Designer_Finish-Modify-Share=\u5B8C\u6210\u4FEE\u6539\u4E26\u5206\u4EAB FR-Designer_Finish-Modify-Share=\u5B8C\u6210\u4FEE\u6539\u4E26\u5206\u4EAB
FR-Designer_Fit-App=App\u81EA\u9069\u61C9
FR-Designer_Fit=\u81EA\u9069\u61C9 FR-Designer_Fit=\u81EA\u9069\u61C9
FR-Designer_Font-Family=\u5B57\u9AD4\u540D\u7A31 FR-Designer_Font-Family=\u5B57\u9AD4\u540D\u7A31
FR-Designer_Font-Size=\u5B57\u9AD4\u5927\u5C0F FR-Designer_Font-Size=\u5B57\u9AD4\u5927\u5C0F
@ -357,6 +358,7 @@ FR-Designer_KeyPoint=\u95DC\u9375\u7BC0\u9EDE
FR-Designer_loadedTreeModel=\u52A0\u8F09\u5931\u6557,\u8ACB\u6AA2\u67E5\u5F8C\u91CD\u8A66 FR-Designer_loadedTreeModel=\u52A0\u8F09\u5931\u6557,\u8ACB\u6AA2\u67E5\u5F8C\u91CD\u8A66
FR-Designer-Failed_to_load_the_plugin=\u7121\u6CD5\u52A0\u8F09\u63D2\u4EF6\uFF0C\u8ACB\u66F4\u65B0\u63D2\u4EF6\uFF1A FR-Designer-Failed_to_load_the_plugin=\u7121\u6CD5\u52A0\u8F09\u63D2\u4EF6\uFF0C\u8ACB\u66F4\u65B0\u63D2\u4EF6\uFF1A
FR-Designer-Plugin_Please_Update_Jar=\u8ACB\u66F4\u65B0Jar\u5305, \u63D2\u4EF6\u9700\u6C42\u6700\u4F4E\u7248\u672C FR-Designer-Plugin_Please_Update_Jar=\u8ACB\u66F4\u65B0Jar\u5305, \u63D2\u4EF6\u9700\u6C42\u6700\u4F4E\u7248\u672C
FR-Designer-Invalid_Page_Number=\u7121\u6548\u9801\u78BC
FR-Designer_Get-CubeGetting=\u7372\u53D6cube FR-Designer_Get-CubeGetting=\u7372\u53D6cube
FR-Designer_XMLA_Database=\u8CC7\u6599\u5EAB FR-Designer_XMLA_Database=\u8CC7\u6599\u5EAB
FR-Designer_XMLA_UserName=\u5E33\u865F FR-Designer_XMLA_UserName=\u5E33\u865F
@ -451,12 +453,12 @@ FR-Designer-QQLogin-Determine=\u78BA\u5B9A
FR-Designer-QQLogin-Cancel=\u53D6\u6D88 FR-Designer-QQLogin-Cancel=\u53D6\u6D88
FR-Designer-Reuse_Manager=\u7D44\u4EF6\u7BA1\u7406 FR-Designer-Reuse_Manager=\u7D44\u4EF6\u7BA1\u7406
FR-Designer_TableData-Default-Para=\u6578\u64DA\u96C6\u9ED8\u8A8D\u53C3\u6578 FR-Designer_TableData-Default-Para=\u6578\u64DA\u96C6\u9ED8\u8A8D\u53C3\u6578
FR-Designer_Layout_Block_Absolute= FR-Designer_Layout_Block_Absolute=\u7D55\u5C0D\u756B\u5E03\u584A
FR-Designer_Layout_Block_Tab= FR-Designer_Layout_Block_Tab=Tab\u584A
FR-Designer_Layout_Block_Blank= FR-Designer_Layout_Block_Blank=\u7A7A\u767D\u584A
FR-Designer_Attr_Layout= FR-Designer_Attr_Layout=\u4F48\u5C40
FR-Designer_Attr_Layout_Type= FR-Designer_Attr_Layout_Type=\u4F48\u5C40\u65B9\u5F0F
FR-Designer_Attr_Bidirectional_Adaptive= FR-Designer_Attr_Bidirectional_Adaptive=\u96D9\u5411\u81EA\u9069\u61C9
FR-Designer_Mobile-Refresh=\u5237\u65B0 FR-Designer_Mobile-Refresh=\u5237\u65B0
FR-Designer_Mobile-ToolBar=\u5DE5\u5177\u6B04 FR-Designer_Mobile-ToolBar=\u5DE5\u5177\u6B04
FR-Designer_WLayout-Absolute-ToolTips=\u81EA\u7531\u5F0F\u5E03\u5C40\uFF0C\u53EF\u4EE5\u5728\u5E03\u5C40\u5167\u4EFB\u610F\u4F4D\u7F6E\u65B0\u589E\u63A7\u5236\u9805 FR-Designer_WLayout-Absolute-ToolTips=\u81EA\u7531\u5F0F\u5E03\u5C40\uFF0C\u53EF\u4EE5\u5728\u5E03\u5C40\u5167\u4EFB\u610F\u4F4D\u7F6E\u65B0\u589E\u63A7\u5236\u9805
@ -478,6 +480,10 @@ FR-Designer-LayerPageReport_Define_PageQuerySQL=\u5B9A\u7FA9\u5206\u9801\u67E5\u
FR-Designer_Is_Share_DBTableData=\u662F\u5426\u5171\u4EAB\u8CC7\u6599\u96C6 FR-Designer_Is_Share_DBTableData=\u662F\u5426\u5171\u4EAB\u8CC7\u6599\u96C6
FR-Designer_Properties=\u5C6C\u6027 FR-Designer_Properties=\u5C6C\u6027
FR-Designer_Event=\u4E8B\u4EF6 FR-Designer_Event=\u4E8B\u4EF6
FR-Designer_Permissions_Edition=\u6B0A\u9650\u7DE8\u8F2F
FR-Designer_Export_Excel_Page=\u5206\u9801\u532F\u51FA
FR-Designer_Export_Excel_Simple=\u539F\u6A23\u532F\u51FA
FR-Designer_Export_Excel_PageToSheet=\u5206\u9801\u5206Sheet\u532F\u51FA
FR-Designer_Export_failed=\u532F\u51FA\u5931\u6557 FR-Designer_Export_failed=\u532F\u51FA\u5931\u6557
FR-Designer_Exported_successfully=\u532F\u51FA\u6210\u529F FR-Designer_Exported_successfully=\u532F\u51FA\u6210\u529F
FR-Designer_Exporting=\u6B63\u5728\u532F\u51FA... FR-Designer_Exporting=\u6B63\u5728\u532F\u51FA...
@ -485,23 +491,39 @@ FR-Designer_Export-PDF=PDF\u683C\u5F0F
FR-Designer_Properties_Mobile=\u624B\u6A5F\u5C6C\u6027 FR-Designer_Properties_Mobile=\u624B\u6A5F\u5C6C\u6027
FR-Designer_Button_OK=\u78BA\u5B9A FR-Designer_Button_OK=\u78BA\u5B9A
FR-Designer_Button_Cancel=\u53D6\u6D88 FR-Designer_Button_Cancel=\u53D6\u6D88
FR-Designer_JavaScript= FR-Designer_JavaScript=JavaScript\u8173\u672C
FR-Designer_JavaScript_Form_Submit= FR-Designer_JavaScript_Form_Submit=\u8868\u55AE\u63D0\u4EA4
FR-Designer_JavaScript_Commit_to_Database= FR-Designer_JavaScript_Commit_to_Database=\u63D0\u4EA4\u5165\u5EAB
FR-Designer_JavaScript_Custom= FR-Designer_JavaScript_Custom=\u81EA\u5B9A\u7FA9
FR-Designer_RWA_Submit= FR-Designer_RWA_Submit=\u63D0\u4EA4
FR-Designer_Event_Name= FR-Designer_Event_Name=\u4E8B\u4EF6\u540D
FR-Designer_Event_Type= FR-Designer_Event_Type=\u4E8B\u4EF6\u985E\u578B
FR-Designer_Event_Name_Type= FR-Designer_Event_Name_Type=\u4E8B\u4EF6\u540D\u5B57\u548C\u985E\u578B
FR-Designer_JavaScript_Set= FR-Designer_JavaScript_Set=JS\u8A2D\u7F6E
FR-Designer_Attribute= FR-Designer_Attribute=\u5C6C\u6027
FR-Designer_Form_Editing_Listeners= FR-Designer_Form_Editing_Listeners=\u4E8B\u4EF6\u7DE8\u8F2F
FR-Designer_Form_Basic_Properties= FR-Designer_Form_Basic_Properties=\u57FA\u672C\u5C6C\u6027
FR-Designer_DS_Dictionary= FR-Designer_DS_Dictionary=\u6578\u64DA\u5B57\u5178
FR-Designer_Create_Tree= FR-Designer_Create_Tree=\u69CB\u5EFA\u6A39
FR-Designer_Set_Callback_Function= FR-Designer_Set_Callback_Function=\u8A2D\u7F6E\u56DE\u8ABF\u51FD\u6578
FR-Designer_ConfirmDialog_Content= FR-Designer_ConfirmDialog_Content=\u662F\u5426\u78BA\u5B9A\u522A\u9664TAB\u63A7\u4EF6
FR-Designer_ConfirmDialog_Title= FR-Designer_ConfirmDialog_Title=FineReport 8.0
FR-Designer_FormulaPane_Tips=\u63D0\u793A\:\u60A8\u53EF\u4EE5\u901A\u904E\u8F38\u5165B1\u4F86\u5BEB\u5165\u7B2C\u4E00\u5217\u7B2C\u4E8C\u6B04\u7684\u8CC7\u6599\u3002
FR-Designer_FormulaPane_Variables=\u8B8A\u91CF
FR-Designer_FormulaPane_Formula_Description=\u516C\u5F0F\u8AAA\u660E
FR-Designer_FormulaPane_Function_Detail=\u51FD\u6578\u660E\u7D30
FR-Designer_FormulaPane_Search=\u641C\u7D22
FR-Designer_Tab_carousel=Tab\u8F2A\u64AD
FR-Designer_setCarousel=\u958B\u555F\u8F2A\u64AD
FR-Designer_carouselInterval=\u8F2A\u64AD\u9593\u9694
FR-Designer_ClassName_panel=\u985E\u540D
FR-Designer_Description_panel=\u63CF\u8FF0
FR-Designer_Edit_panel=\u7DE8\u8F2F
FR-Designer_Property_panel=\u5C6C\u6027
FR-Designer_Select_panel=\u9078\u64C7
FR-Designer_LayoutTable_Column_Width=160 FR-Designer_LayoutTable_Column_Width=160
FR-Designer_Set_BG_Of_Current_Row=\u586B\u5831\u7576\u524D\u7DE8\u8F2F\u5217\u80CC\u666F\u8A2D\u5B9A FR-Designer_Set_BG_Of_Current_Row=\u586B\u5831\u7576\u524D\u7DE8\u8F2F\u5217\u80CC\u666F\u8A2D\u5B9A
FR-Designer_Unload_Check=\u672A\u63D0\u4EA4\u96E2\u958B\u63D0\u793A FR-Designer_Unload_Check=\u672A\u63D0\u4EA4\u96E2\u958B\u63D0\u793A
@ -509,20 +531,6 @@ FR-Designer_ReportColumns_Columns_Optional=\u5831\u8868\u6B04\u4F4D
FR-Designer_Row_Icon_File_Name=row.png FR-Designer_Row_Icon_File_Name=row.png
FR-Designer_Center_Display=\u7F6E\u4E2D\u986F\u793A FR-Designer_Center_Display=\u7F6E\u4E2D\u986F\u793A
FR-Designer_Left_Display=\u5DE6\u986F\u793A FR-Designer_Left_Display=\u5DE6\u986F\u793A
FR-Designer_Background_Null=
FR-Designer_Background_Color=
FR-Designer_Background_Texture=
FR-Designer_Background_Pattern=
FR-Designer_Background_Gradient_Color=
FR-Designer_Background_Image=
FR-Designer_Background_Clear=
FR-Designer_Background_Image_Select=
FR-Designer_Tab_carousel=
FR-Designer_setCarousel=
FR-Designer_carouselInterval=
FR-Designer_Initial_Background_Tips=
FR-Designer_Mouse_Move_Tips=
FR-Designer_Mouse_Click_Tips=
FR-Designer_About_Version=\u7248\u672C FR-Designer_About_Version=\u7248\u672C
FR-Designer_About_CopyRight=\u7248\u6B0A\u6240\u6709 FR-Designer_About_CopyRight=\u7248\u6B0A\u6240\u6709
FR-Designer_Service_Phone=\u670D\u52D9\u96FB\u8A71\uFF1A FR-Designer_Service_Phone=\u670D\u52D9\u96FB\u8A71\uFF1A
@ -531,6 +539,7 @@ FR-Designer_PageSetup_Page=\u9801\u9762
FR-Designer_Custom_Job_Description=\u63CF\u8FF0 FR-Designer_Custom_Job_Description=\u63CF\u8FF0
FR-Designer_Property=\u5C6C\u6027 FR-Designer_Property=\u5C6C\u6027
FR-Designer_ClassName=\u985E\u540D FR-Designer_ClassName=\u985E\u540D
FR-Designer_Polyblock_Edit=\u805A\u5408\u584A\u7DE8\u8F2F FR-Designer_Polyblock_Edit=\u805A\u5408\u584A\u7DE8\u8F2F
FR-Designer_Function_Description_Area_Text=\u8A72\u985E\u5FC5\u9808\u7E7C\u627F"com.fr.script.AbstractFunction"\u3002\u61C9\u5C07\u7DE8\u8B6F\u5F8C\u7684\u985E\u6A94\u6848\u62F7\u8C9D\u5230\nJ2EE\u4F3A\u670D\u5668 "{R1}WEB-INF{R2}classes" \u76EE\u9304\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8A71\u5C07class\u5C0D\u61C9\u7684java\u539F\u59CB\u6A94\u6848\u4E5F\u653E\u7F6E\u5230\u8A72\u76EE\u9304\u4E0B\u65B9\u4FBF\u7DE8\u8F2F\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R3}classes FR-Designer_Function_Description_Area_Text=\u8A72\u985E\u5FC5\u9808\u7E7C\u627F"com.fr.script.AbstractFunction"\u3002\u61C9\u5C07\u7DE8\u8B6F\u5F8C\u7684\u985E\u6A94\u6848\u62F7\u8C9D\u5230\nJ2EE\u4F3A\u670D\u5668 "{R1}WEB-INF{R2}classes" \u76EE\u9304\uFF0C\u5982\u679C\u5FC5\u8981\u7684\u8A71\u5C07class\u5C0D\u61C9\u7684java\u539F\u59CB\u6A94\u6848\u4E5F\u653E\u7F6E\u5230\u8A72\u76EE\u9304\u4E0B\u65B9\u4FBF\u7DE8\u8F2F\u548C\u67E5\u770B\u3002\n\u4F8B\u5982\uFF1A{R3}classes
FR-Designer_PageSetup_Horizontal=\u6A2A\u5411 FR-Designer_PageSetup_Horizontal=\u6A2A\u5411
@ -546,11 +555,9 @@ FR-Designer_Show_As_Download=\u7528\u4E0B\u8F09\u93C8\u63A5\u986F\u793A\u4E8C\u9
FR-Designer_File_Name_For_Download=\u4E0B\u8F09\u6A94\u6848\u540D FR-Designer_File_Name_For_Download=\u4E0B\u8F09\u6A94\u6848\u540D
FR-Designer_No=\u5426 FR-Designer_No=\u5426
FR-Designer_Pagination=\u5206\u9801 FR-Designer_Pagination=\u5206\u9801
FR-Designer-Move_Tab_First=\u79FB\u52D5\u5230\u9996\u4F4D
FR-Designer-Move_Tab_End=\u79FB\u52D5\u5230\u672B\u5C3E
FR-Designer-Move_Tab_Next=\u5F80\u5F8C\u79FB\u52D5
FR-Designer-Move_Tab_Prev=\u5F80\u524D\u79FB\u52D5
FR-Designer_Role=
FR-Designer_DS_TableData=\u8CC7\u6599\u96C6 FR-Designer_DS_TableData=\u8CC7\u6599\u96C6
FR-Designer_Parameter-Formula=\u516C\u5F0F FR-Designer_Parameter-Formula=\u516C\u5F0F
FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u633F\u4EF6\u7248\u672C\u904E\u4F4E\uFF0C\u5B58\u5728API\u4E0D\u76F8\u5BB9\uFF0C\u8ACB\u806F\u7CFB\u958B\u767C\u8005\u965E\u7D1A\u633F\u4EF6 FR-Designer_Plugin_Should_Update_Please_Contact_Developer=\u63D2\u4EF6\u7248\u672C\u904E\u4F4E, \u5B58\u5728API\u4E0D\u517C\u5BB9, \u8ACB\u806F\u7E6B\u958B\u767C\u8005\u5347\u7D1A\u63D2\u4EF6
FR-Designer_WidgetOrder=\u63A7\u4EF6\u9806\u5E8F
FR-Designer_Mobile_Form_Analysis_Annotation=\u6CE8\u91CB\uFF1A\u53EF\u4EE5\u901A\u904E\u8A72\u5C6C\u6027\u63A7\u5236\u8868\u55AE\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\u3002
FR-Designer_Mobile_Report_Analysis_Annotation=\u6CE8\u91CB\uFF1A\u53EF\u4EE5\u901A\u904E\u8A72\u5C6C\u6027\u63A7\u5236\u5831\u8868\u5728APP\u4E2D\u7684\u89E3\u6790\u65B9\u5F0F\uFF0C\u53EA\u652F\u6301\u5206\u9801\u9810\u89BD\uFF0C\u586B\u5831\u9810\u89BD\u6642\u5C6C\u6027\u7121\u6548\u3002

3
designer_base/src/com/fr/design/mainframe/DesignerFrame.java

@ -169,7 +169,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
/** /**
* 初始menuPane的方法 方便OEM时修改该组件 * 初始menuPane的方法 方便OEM时修改该组件
* @param ad
*/ */
protected void initMenuPane(){ protected void initMenuPane(){
menuPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); menuPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
@ -189,7 +188,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
final JPanel northEastPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); final JPanel northEastPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
GeneralContext.addPluginReadListener(new PluginReadListener() { GeneralContext.addPluginReadListener(new PluginReadListener() {
@Override @Override
public void success() { public void success(Status status) {
TitlePlaceProcessor processor = ExtraDesignClassManager.getInstance().getSingle(TitlePlaceProcessor.MARK_STRING); TitlePlaceProcessor processor = ExtraDesignClassManager.getInstance().getSingle(TitlePlaceProcessor.MARK_STRING);
if (processor == null) { if (processor == null) {
processor = new DefaultTitlePlace(); processor = new DefaultTitlePlace();

2
designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -29,6 +29,7 @@ import com.fr.file.filetree.FileNode;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.plugin.proxy.PluginProxyCompatibleUtils;
import com.fr.stable.CoreConstants; import com.fr.stable.CoreConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
@ -131,6 +132,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
} }
toolbarDef.addShortCut(delFileAction); toolbarDef.addShortCut(delFileAction);
Set<ShortCut> extraShortCuts = ExtraDesignClassManager.getInstance().getArray(ShortCut.TEMPLATE_TREE); Set<ShortCut> extraShortCuts = ExtraDesignClassManager.getInstance().getArray(ShortCut.TEMPLATE_TREE);
extraShortCuts = PluginProxyCompatibleUtils.toOriObjectHashSet(extraShortCuts);
for (ShortCut shortCut : extraShortCuts){ for (ShortCut shortCut : extraShortCuts){
toolbarDef.addShortCut(shortCut); toolbarDef.addShortCut(shortCut);
} }

2
designer_base/src/com/fr/design/mainframe/WestRegionContainerPane.java

@ -29,7 +29,7 @@ public class WestRegionContainerPane extends UIResizableContainer {
super(DesignerFrameFileDealerPane.getInstance(), Constants.RIGHT); super(DesignerFrameFileDealerPane.getInstance(), Constants.RIGHT);
GeneralContext.addPluginReadListener(new PluginReadListener() { GeneralContext.addPluginReadListener(new PluginReadListener() {
@Override @Override
public void success() { public void success(Status status) {
setDownPane(TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter())); setDownPane(TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()));
} }
}); });

6
designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -10,7 +10,9 @@ import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.community.*; import com.fr.design.actions.community.*;
import com.fr.design.actions.file.*; import com.fr.design.actions.file.*;
import com.fr.design.actions.help.*; import com.fr.design.actions.help.AboutAction;
import com.fr.design.actions.help.TutorialAction;
import com.fr.design.actions.help.WebDemoAction;
import com.fr.design.actions.server.*; import com.fr.design.actions.server.*;
import com.fr.design.file.NewTemplatePane; import com.fr.design.file.NewTemplatePane;
import com.fr.design.fun.MenuHandler; import com.fr.design.fun.MenuHandler;
@ -28,7 +30,6 @@ import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.env.RemoteEnv; import com.fr.env.RemoteEnv;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.GeneralContext;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
@ -161,6 +162,7 @@ public abstract class ToolBarMenuDock {
return new Locale[]{ return new Locale[]{
Locale.CHINA, Locale.CHINA,
Locale.TAIWAN, Locale.TAIWAN,
Locale.US
}; };
} }

7
designer_base/src/com/fr/design/style/color/ColorPicker.java

@ -7,11 +7,14 @@ package com.fr.design.style.color;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.geom.Ellipse2D; import java.awt.geom.Ellipse2D;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import javax.swing.*;
/** /**
* 取色框 * 取色框

1
designer_base/src/com/fr/design/style/color/ColorSelectBox.java

@ -63,6 +63,7 @@ public class ColorSelectBox extends AbstractSelectBox<Color> implements UIObserv
fireDisplayComponent(ColorBackground.getInstance(color)); fireDisplayComponent(ColorBackground.getInstance(color));
} }
}); });
colorPane.setColor(color);
return colorPane; return colorPane;
} }

4
designer_base/src/com/fr/env/RemoteEnv.java vendored

@ -1483,6 +1483,8 @@ public class RemoteEnv implements Env {
* @throws Exception 异常 * @throws Exception 异常
*/ */
public boolean writeSvgFile(SvgProvider svgFile) throws Exception { public boolean writeSvgFile(SvgProvider svgFile) throws Exception {
testServerConnection();
HashMap<String, String> para = new HashMap<String, String>(); HashMap<String, String> para = new HashMap<String, String>();
para.put("op", "fr_remote_design"); para.put("op", "fr_remote_design");
para.put("cmd", "design_save_svg"); para.put("cmd", "design_save_svg");
@ -1534,6 +1536,8 @@ public class RemoteEnv implements Env {
*/ */
@Override @Override
public boolean writeResource(XMLFileManagerProvider mgr) throws Exception { public boolean writeResource(XMLFileManagerProvider mgr) throws Exception {
testServerConnection();
HashMap<String, String> para = new HashMap<String, String>(); HashMap<String, String> para = new HashMap<String, String>();
para.put("op", "fr_remote_design"); para.put("op", "fr_remote_design");
para.put("cmd", "design_save_resource"); para.put("cmd", "design_save_resource");

2
designer_chart/src/com/fr/design/ChartTypeInterfaceManager.java

@ -75,7 +75,7 @@ public class ChartTypeInterfaceManager extends XMLFileManager implements ExtraCh
static { static {
GeneralContext.addPluginReadListener(new PluginReadListener() { GeneralContext.addPluginReadListener(new PluginReadListener() {
@Override @Override
public void success() { public void success(Status status) {
//重新注册designModuleFactory //重新注册designModuleFactory
DesignModuleFactory.registerExtraWidgetOptions(initWidgetOption()); DesignModuleFactory.registerExtraWidgetOptions(initWidgetOption());
} }

2
designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane.java

@ -245,7 +245,7 @@ public class GisMapTableDataContentPane extends FurtherBasicBeanPane<GisMapTable
if(addressNameBox.getSelectedItem() != null){ if(addressNameBox.getSelectedItem() != null){
String adName = Utils.objectToString(addressNameBox.getSelectedItem()); String adName = Utils.objectToString(addressNameBox.getSelectedItem());
if(ArrayUtils.contains(ChartConstants.NONE_KEYS, adName)) { if(ArrayUtils.contains(ChartConstants.getNoneKeys(), adName)) {
definition.setAddressName(StringUtils.EMPTY); definition.setAddressName(StringUtils.EMPTY);
} else { } else {
definition.setAddressName(adName); definition.setAddressName(adName);

2
designer_chart/src/com/fr/design/chart/report/GisMapTableDataContentPane4Chart.java

@ -226,7 +226,7 @@ public class GisMapTableDataContentPane4Chart extends FurtherBasicBeanPane<GisMa
if (addressNameBox.getSelectedItem() != null) { if (addressNameBox.getSelectedItem() != null) {
String adName = Utils.objectToString(addressNameBox.getSelectedItem()); String adName = Utils.objectToString(addressNameBox.getSelectedItem());
if (ArrayUtils.contains(ChartConstants.NONE_KEYS, adName)) { if (ArrayUtils.contains(ChartConstants.getNoneKeys(), adName)) {
definition.setAddressName(StringUtils.EMPTY); definition.setAddressName(StringUtils.EMPTY);
} else { } else {
definition.setAddressName(adName); definition.setAddressName(adName);

4
designer_chart/src/com/fr/design/chart/report/MapCubeLayerPane.java

@ -188,7 +188,7 @@ public class MapCubeLayerPane extends BasicBeanPane<String>{
while(names.hasNext()) { while(names.hasNext()) {
Object name = names.next(); Object name = names.next();
String layName = editingAttr.getLayerTo(Utils.objectToString(name)); String layName = editingAttr.getLayerTo(Utils.objectToString(name));
if(ArrayUtils.contains(ChartConstants.NONE_KEYS, layName)) {// kunsnat: 考虑切换设计器语言. if(ArrayUtils.contains(ChartConstants.getNoneKeys(), layName)) {// kunsnat: 考虑切换设计器语言.
layName = StringUtils.EMPTY; layName = StringUtils.EMPTY;
} }
list.add(new Object[]{name, layName}); list.add(new Object[]{name, layName});
@ -230,7 +230,7 @@ public class MapCubeLayerPane extends BasicBeanPane<String>{
while(names.hasNext()) { while(names.hasNext()) {
Object name = names.next(); Object name = names.next();
String layName = editingAttr.getLayerTo(Utils.objectToString(name)); String layName = editingAttr.getLayerTo(Utils.objectToString(name));
if(ArrayUtils.contains(ChartConstants.NONE_KEYS, layName)) {// kunsnat: 考虑切换设计器语言. if(ArrayUtils.contains(ChartConstants.getNoneKeys(), layName)) {// kunsnat: 考虑切换设计器语言.
layName = StringUtils.EMPTY; layName = StringUtils.EMPTY;
} }
list.add(new Object[]{name, layName}); list.add(new Object[]{name, layName});

7
designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java

@ -425,6 +425,8 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
private void deleteAButton() { private void deleteAButton() {
//先重构属性,在重构面板,否则面板在重构过程中,会重新将属性中的切换图表加到indexList中,导致面板无法删除 //先重构属性,在重构面板,否则面板在重构过程中,会重新将属性中的切换图表加到indexList中,导致面板无法删除
//记录改变前的plotID
String lastPlotID = editingCollection == null ? StringUtils.EMPTY : editingCollection.getSelectedChart().getPlot().getPlotID();
if (editingCollection != null) { if (editingCollection != null) {
int count = editingCollection.getChartCount(); int count = editingCollection.getChartCount();
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
@ -447,6 +449,11 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
checkoutChange(); checkoutChange();
relayoutPane(); relayoutPane();
//重构面板
if (parent != null ){
parent.reLayoutEditPane(lastPlotID, editingCollection);
}
} }
private void relayoutPane() { private void relayoutPane() {

11
designer_chart/src/com/fr/design/mainframe/chart/gui/ChartTypePane.java

@ -206,6 +206,8 @@ public class ChartTypePane extends AbstractChartAttrPane{
} }
//第一步就是重构cardNames //第一步就是重构cardNames
cardNames = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID); cardNames = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID);
//下拉框重构开始。为了防止重构是触发update
((FlexibleComboBox)jcb).setItemEvenType(ItemEventType.REACTOR);
//重构下拉框选项 //重构下拉框选项
reactorComboBox(); reactorComboBox();
//重新选择选中的下拉项 //重新选择选中的下拉项
@ -213,6 +215,8 @@ public class ChartTypePane extends AbstractChartAttrPane{
String plotID = chart.getPlot().getPlotID(); String plotID = chart.getPlot().getPlotID();
Object item = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID, plotID); Object item = ChartTypeInterfaceManager.getInstance().getTitle4PopupWindow(chartID, plotID);
jcb.setSelectedItem(item); jcb.setSelectedItem(item);
//下拉框重构结束
((FlexibleComboBox)jcb).setItemEvenType(ItemEventType.DEFAULT);
//重新选中 //重新选中
checkPlotPane(); checkPlotPane();
} }
@ -223,13 +227,10 @@ public class ChartTypePane extends AbstractChartAttrPane{
} }
private void reactorComboBox() { private void reactorComboBox() {
FlexibleComboBox fcb = (FlexibleComboBox)jcb; jcb.removeAllItems();
fcb.setItemEvenType(ItemEventType.REACTOR);
fcb.removeAllItems();
for (int i = 0; i < this.cardNames.length; i++) { for (int i = 0; i < this.cardNames.length; i++) {
fcb.addItem(cardNames[i]); jcb.addItem(cardNames[i]);
} }
fcb.setItemEvenType(ItemEventType.DEFAULT);
} }
@Override @Override

2
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/BubblePlotTableDataContentPane.java

@ -137,7 +137,7 @@ public class BubblePlotTableDataContentPane extends AbstractTableDataContentPane
Object resultY = yCombox.getSelectedItem(); Object resultY = yCombox.getSelectedItem();
Object resultSize = bubbleSize.getSelectedItem(); Object resultSize = bubbleSize.getSelectedItem();
if(resultName == null || ArrayUtils.contains(ChartConstants.NONE_KEYS, resultName)) { if(resultName == null || ArrayUtils.contains(ChartConstants.getNoneKeys(), resultName)) {
definition.setSeriesName(StringUtils.EMPTY); definition.setSeriesName(StringUtils.EMPTY);
} else { } else {
definition.setSeriesName(resultName.toString()); definition.setSeriesName(resultName.toString());

2
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/CategoryPlotTableDataContentPane.java

@ -113,7 +113,7 @@ public class CategoryPlotTableDataContentPane extends AbstractTableDataContentPa
} }
Object categoryName = categoryCombox.getSelectedItem(); Object categoryName = categoryCombox.getSelectedItem();
if(ArrayUtils.contains(ChartConstants.NONE_KEYS, categoryName)) { if(ArrayUtils.contains(ChartConstants.getNoneKeys(), categoryName)) {
dataDefinition.setCategoryName(StringUtils.EMPTY); dataDefinition.setCategoryName(StringUtils.EMPTY);
} else { } else {
dataDefinition.setCategoryName(categoryName == null ? null : categoryName.toString()); dataDefinition.setCategoryName(categoryName == null ? null : categoryName.toString());

2
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/StockPlotTableDataContentPane.java

@ -160,7 +160,7 @@ public class StockPlotTableDataContentPane extends AbstractTableDataContentPane
openLabel.setText(stockLabel.getOpenLabel()); openLabel.setText(stockLabel.getOpenLabel());
highLabel.setText(stockLabel.getHighLabel()); highLabel.setText(stockLabel.getHighLabel());
lowLabel.setText(stockLabel.getLowLabel()); lowLabel.setText(stockLabel.getLowLabel());
closeLabel.setText(stockLabel.getLowLabel()); closeLabel.setText(stockLabel.getCloseLabel());
combineCustomEditValue(axisBox, stock.getCateTime()); combineCustomEditValue(axisBox, stock.getCateTime());
combineCustomEditValue(volumeBox, stock.getVolumnString()); combineCustomEditValue(volumeBox, stock.getVolumnString());

2
designer_chart/src/com/fr/design/mainframe/chart/gui/data/table/XYScatterPlotTableDataContentPane.java

@ -107,7 +107,7 @@ public class XYScatterPlotTableDataContentPane extends AbstractTableDataContentP
Object resultX = xCombox.getSelectedItem(); Object resultX = xCombox.getSelectedItem();
Object resultY = yCombox.getSelectedItem(); Object resultY = yCombox.getSelectedItem();
if(resultName == null || ArrayUtils.contains(ChartConstants.NONE_KEYS, resultName)) { if(resultName == null || ArrayUtils.contains(ChartConstants.getNoneKeys(), resultName)) {
definition.setSeriesName(StringUtils.EMPTY); definition.setSeriesName(StringUtils.EMPTY);
} else { } else {
definition.setSeriesName(resultName.toString()); definition.setSeriesName(resultName.toString());

16
designer_chart/src/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

@ -11,6 +11,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.chart.base.TextAttr; import com.fr.chart.base.TextAttr;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.event.UIObserverListener;
import com.fr.design.gui.ibutton.UIColorButton; import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIToggleButton; import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.UIComboBox; import com.fr.design.gui.icombobox.UIComboBox;
@ -71,6 +72,8 @@ public class ChartTextAttrPane extends BasicPane {
} }
public void populate(FRFont frFont) { public void populate(FRFont frFont) {
UIObserverListener listener = fontNameComboBox == null ? null : fontNameComboBox.getUiObserverListener();
removeAllComboBoxListener();
if (frFont == null) { if (frFont == null) {
return; return;
} }
@ -83,6 +86,19 @@ public class ChartTextAttrPane extends BasicPane {
if (fontColor != null) { if (fontColor != null) {
fontColor.setColor(frFont.getForeground()); fontColor.setColor(frFont.getForeground());
} }
//更新结束后,注册监听器
registerAllComboBoxListener(listener);
}
private void removeAllComboBoxListener() {
fontNameComboBox.removeChangeListener();
fontSizeComboBox.removeChangeListener();
}
private void registerAllComboBoxListener(UIObserverListener listener) {
fontNameComboBox.registerChangeListener(listener);
fontSizeComboBox.registerChangeListener(listener);
} }
/** /**

2
designer_form/build.dev.gradle

@ -4,7 +4,7 @@ tasks.withType(JavaCompile){
options.encoding = 'UTF-8' options.encoding = 'UTF-8'
} }
//jdk版本 //jdk版本
sourceCompatibility=1.8 sourceCompatibility=1.7
//jar包版本 //jar包版本
version='8.0' version='8.0'

13
designer_form/src/com/fr/design/designer/beans/ConnectorCreator.java

@ -6,15 +6,14 @@ import java.util.ArrayList;
import java.util.PriorityQueue; import java.util.PriorityQueue;
import com.fr.form.ui.container.WLayout; import com.fr.form.ui.container.WLayout;
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import com.fr.form.ui.widget.BoundsWidget;
public class ConnectorCreator { public class ConnectorCreator {
public static final int UNIT = 10; public static final int UNIT = 10;
public static final int SIDE = 2; public static final int SIDE = 2;
public static final int CORNER_LOSS = 20; public static final int CORNER_LOSS = 20;
public static final int vector[][] = { { UNIT, 0 }, { -UNIT, 0 }, { 0, UNIT }, { 0, -UNIT } }; public static final int VECTOR[][] = { { UNIT, 0 }, { -UNIT, 0 }, { 0, UNIT }, { 0, -UNIT } };
private long timeOut = 200; private long timeOut = 200;
private boolean beyond; private boolean beyond;
@ -179,8 +178,8 @@ public class ConnectorCreator {
} }
void pushInto() { void pushInto() {
for (int i = 0; i < vector.length; i++) { for (int i = 0; i < VECTOR.length; i++) {
Point temp = new Point(p.x + vector[i][0], p.y + vector[i][1]); Point temp = new Point(p.x + VECTOR[i][0], p.y + VECTOR[i][1]);
if (parent != null && parent.x == temp.x && parent.y == temp.y) { if (parent != null && parent.x == temp.x && parent.y == temp.y) {
continue; continue;
} }
@ -192,8 +191,8 @@ public class ConnectorCreator {
} }
boolean reCheck() { boolean reCheck() {
for (int i = 0; i < vector.length; i++) { for (int i = 0; i < VECTOR.length; i++) {
Point temp = new Point(p.x + SIDE * vector[i][0], p.y + SIDE * vector[i][1]); Point temp = new Point(p.x + SIDE * VECTOR[i][0], p.y + SIDE * VECTOR[i][1]);
AssessedPoint ap = new AssessedPoint(temp, this, loss(temp)); AssessedPoint ap = new AssessedPoint(temp, this, loss(temp));
if (check(temp)) { if (check(temp)) {
open.add(ap); open.add(ap);

4
designer_form/src/com/fr/design/designer/beans/adapters/layout/FRAbsoluteLayoutAdapter.java

@ -12,7 +12,7 @@ import com.fr.design.designer.properties.FRAbsoluteLayoutPropertiesGroupModel;
import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WAbsoluteLayout;
import com.fr.design.utils.ComponentUtils; import com.fr.design.utils.ComponentUtils;
import com.fr.design.utils.gui.LayoutUtils; import com.fr.design.utils.gui.LayoutUtils;
import com.fr.form.ui.container.WBodyLayoutType; import com.fr.form.ui.widget.BoundsWidget;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
@ -111,7 +111,7 @@ public class FRAbsoluteLayoutAdapter extends FRBodyLayoutAdapter {
Rectangle curRec = new Rectangle(creatorX, creatorY, creator.getWidth(), creator.getHeight()); Rectangle curRec = new Rectangle(creatorX, creatorY, creator.getWidth(), creator.getHeight());
WAbsoluteLayout wAbsoluteLayout = (WAbsoluteLayout)topLayout.toData(); WAbsoluteLayout wAbsoluteLayout = (WAbsoluteLayout)topLayout.toData();
for (int i = 0, count = wAbsoluteLayout.getWidgetCount(); i < count; i++) { for (int i = 0, count = wAbsoluteLayout.getWidgetCount(); i < count; i++) {
WAbsoluteLayout.BoundsWidget temp = (WAbsoluteLayout.BoundsWidget) wAbsoluteLayout.getWidget(i); BoundsWidget temp = (BoundsWidget) wAbsoluteLayout.getWidget(i);
Rectangle rectangle = temp.getBounds(); Rectangle rectangle = temp.getBounds();
if (curRec.intersects(rectangle)){ if (curRec.intersects(rectangle)){
return false; return false;

8
designer_form/src/com/fr/design/designer/beans/adapters/layout/FRFitLayoutAdapter.java

@ -26,9 +26,9 @@ import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.mainframe.JForm; import com.fr.design.mainframe.JForm;
import com.fr.design.utils.ComponentUtils; import com.fr.design.utils.ComponentUtils;
import com.fr.form.ui.LayoutBorderStyle; import com.fr.form.ui.LayoutBorderStyle;
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget;
import com.fr.form.ui.container.WLayout; import com.fr.form.ui.container.WLayout;
import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout;
import com.fr.form.ui.widget.BoundsWidget;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
/** /**
@ -277,6 +277,10 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
super.clearCompsList(); super.clearCompsList();
} }
protected Rectangle getLayoutBound(XWCardMainBorderLayout mainLayout){
return mainLayout.getBounds();
}
private Rectangle adjustBackupBound(Rectangle backupBound, XWCardMainBorderLayout mainLayout) { private Rectangle adjustBackupBound(Rectangle backupBound, XWCardMainBorderLayout mainLayout) {
// 参数界面高度对纵坐标产生的影响 // 参数界面高度对纵坐标产生的影响
JForm jform = (JForm) (HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()); JForm jform = (JForm) (HistoryTemplateListPane.getInstance().getCurrentEditingTemplate());
@ -284,7 +288,7 @@ public class FRFitLayoutAdapter extends FRBodyLayoutAdapter {
backupBound.y -= jform.getFormDesign().getParaHeight(); backupBound.y -= jform.getFormDesign().getParaHeight();
} }
Rectangle rec = mainLayout.getBounds(); Rectangle rec = getLayoutBound(mainLayout);
// XWTabLayout里面的横纵坐标收到外层XWCardMainBorderLayout的横纵坐标影响 // XWTabLayout里面的横纵坐标收到外层XWCardMainBorderLayout的横纵坐标影响
// 减掉之后可以按照它原来的逻辑执行 // 减掉之后可以按照它原来的逻辑执行
backupBound.x -= rec.x; backupBound.x -= rec.x;

9
designer_form/src/com/fr/design/designer/beans/adapters/layout/FRTabFitLayoutAdapter.java

@ -4,13 +4,12 @@
package com.fr.design.designer.beans.adapters.layout; package com.fr.design.designer.beans.adapters.layout;
import java.awt.Rectangle;
import com.fr.design.beans.GroupModel; import com.fr.design.beans.GroupModel;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWidgetCreator; import com.fr.design.designer.creator.XWidgetCreator;
import com.fr.design.designer.creator.cardlayout.XWCardLayout; import com.fr.design.designer.creator.cardlayout.XWCardLayout;
import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout;
import com.fr.design.designer.creator.cardlayout.XWTabFitLayout; import com.fr.design.designer.creator.cardlayout.XWTabFitLayout;
import com.fr.design.designer.properties.FRTabFitLayoutPropertiesGroupModel; import com.fr.design.designer.properties.FRTabFitLayoutPropertiesGroupModel;
import com.fr.design.utils.ComponentUtils; import com.fr.design.utils.ComponentUtils;
@ -18,6 +17,8 @@ import com.fr.form.ui.LayoutBorderStyle;
import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import java.awt.*;
/** /**
* tab布局tabFit适配器 * tab布局tabFit适配器
* *
@ -91,4 +92,8 @@ public class FRTabFitLayoutAdapter extends FRFitLayoutAdapter {
} }
return y; return y;
} }
protected Rectangle getLayoutBound(XWCardMainBorderLayout mainLayout){
return ComponentUtils.getRelativeBounds(mainLayout);
}
} }

8
designer_form/src/com/fr/design/designer/beans/location/AccessDirection.java

@ -11,9 +11,10 @@ import com.fr.design.designer.creator.*;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.FormSelection; import com.fr.design.mainframe.FormSelection;
import com.fr.design.utils.ComponentUtils; import com.fr.design.utils.ComponentUtils;
import com.fr.form.main.Form;
import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WAbsoluteLayout;
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget;
import com.fr.form.ui.container.WParameterLayout; import com.fr.form.ui.container.WParameterLayout;
import com.fr.form.ui.widget.BoundsWidget;
/** /**
* @author richer * @author richer
@ -66,10 +67,8 @@ public abstract class AccessDirection implements Direction {
protected void sorptionPoint(Point point, Rectangle current_bounds,FormDesigner designer) { protected void sorptionPoint(Point point, Rectangle current_bounds,FormDesigner designer) {
boolean findInX = current_bounds.getWidth() <= MoveUtils.SORPTION_UNIT ? true : false; boolean findInX = current_bounds.getWidth() <= MoveUtils.SORPTION_UNIT ? true : false;
boolean findInY = current_bounds.getHeight() <= MoveUtils.SORPTION_UNIT ? true : false; boolean findInY = current_bounds.getHeight() <= MoveUtils.SORPTION_UNIT ? true : false;
WAbsoluteLayout layout =getLayout(designer); WAbsoluteLayout layout =getLayout(designer);
FormSelection selection = designer.getSelectionModel().getSelection(); FormSelection selection = designer.getSelectionModel().getSelection();
boolean isWidgetsIntersect = false; boolean isWidgetsIntersect = false;
for (int i = 0, count = layout.getWidgetCount(); i < count; i++) { for (int i = 0, count = layout.getWidgetCount(); i < count; i++) {
BoundsWidget temp = (BoundsWidget) layout.getWidget(i); BoundsWidget temp = (BoundsWidget) layout.getWidget(i);
@ -111,7 +110,10 @@ public abstract class AccessDirection implements Direction {
} }
} }
processRectangleIntersects(designer, point.x, point.y, isWidgetsIntersect); processRectangleIntersects(designer, point.x, point.y, isWidgetsIntersect);
setDesignerStateModelProperties(designer, findInX, findInY, current_bounds, point);
}
private void setDesignerStateModelProperties (FormDesigner designer, boolean findInX, boolean findInY, Rectangle current_bounds, Point point) {
designer.getStateModel().setXAbsorptionline(findInX && current_bounds.getWidth() > MoveUtils.SORPTION_UNIT ? Absorptionline.createXAbsorptionline(point.x) : null); designer.getStateModel().setXAbsorptionline(findInX && current_bounds.getWidth() > MoveUtils.SORPTION_UNIT ? Absorptionline.createXAbsorptionline(point.x) : null);
designer.getStateModel().setYAbsorptionline(findInY && current_bounds.getHeight() > MoveUtils.SORPTION_UNIT ? Absorptionline.createYAbsorptionline(point.y) : null); designer.getStateModel().setYAbsorptionline(findInY && current_bounds.getHeight() > MoveUtils.SORPTION_UNIT ? Absorptionline.createYAbsorptionline(point.y) : null);
designer.getStateModel().setEquidistantLine(null); designer.getStateModel().setEquidistantLine(null);

165
designer_form/src/com/fr/design/designer/beans/location/Inner.java

@ -9,9 +9,8 @@ import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.FormSelection; import com.fr.design.mainframe.FormSelection;
import com.fr.design.utils.ComponentUtils; import com.fr.design.utils.ComponentUtils;
import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WAbsoluteLayout;
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget; import com.fr.form.ui.widget.BoundsWidget;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.third.com.lowagie.text.*;
import java.awt.*; import java.awt.*;
import java.awt.Rectangle; import java.awt.Rectangle;
@ -47,89 +46,97 @@ public class Inner extends AccessDirection {
return new Point(x, y); return new Point(x, y);
} }
@Override private class RectDesigner implements RectangleDesigner {
protected void sorptionPoint(Point point, Rectangle current_bounds, final FormDesigner designer) { private FormDesigner designer = null;
RectangleDesigner rd = new RectangleDesigner() {
public void setXAbsorptionline(Absorptionline line) {
designer.getStateModel().setXAbsorptionline(line);
}
public void setYAbsorptionline(Absorptionline line) {
designer.getStateModel().setYAbsorptionline(line);
}
/**
* 获取当前选中块的水平线数组
*
* @return 块的水平线数组
*
*/
public int[] getHorizontalLine(){
return ArrayUtils.EMPTY_INT_ARRAY;
}
/**
* 获取当前选中块的垂直线数组
*
* @return 块的垂直线数组
*
*/
public int[] getVerticalLine(){
return ArrayUtils.EMPTY_INT_ARRAY;
}
public RectangleIterator createRectangleIterator() {
return getRectangleIterator(designer);
}
/** public RectDesigner(FormDesigner designer) {
* 设置designer内部组件是否重叠的标志位 this.designer = designer;
* }
* @param isIntersects 是否重叠
*/
@Override
public void setWidgetsIntersects(boolean isIntersects) {
designer.setWidgetsIntersect(isIntersects);
}
/** public void setXAbsorptionline(Absorptionline line) {
* 获取designer内部组件是否重叠的标志位 designer.getStateModel().setXAbsorptionline(line);
* }
* @return 重叠 public void setYAbsorptionline(Absorptionline line) {
*/ designer.getStateModel().setYAbsorptionline(line);
@Override }
public boolean getWidgetsIntersects() {
return designer.isWidgetsIntersect();
}
/** /**
* 获取designer相对屏幕的位置 * 获取当前选中块的水平线数组
* *
* @return 位置 * @return 块的水平线数组
*/ *
@Override */
public Point getDesignerLocationOnScreen() { public int[] getHorizontalLine(){
return designer.getLocationOnScreen(); return ArrayUtils.EMPTY_INT_ARRAY;
} }
/** /**
* 设置等距线 * 获取当前选中块的垂直线数组
* *
* @param line 吸附线 * @return 块的垂直线数组
*/ *
@Override */
public void setEquidistantLine(Absorptionline line) { public int[] getVerticalLine(){
designer.getStateModel().setEquidistantLine(line); return ArrayUtils.EMPTY_INT_ARRAY;
} }
public RectangleIterator createRectangleIterator() {
return getRectangleIterator(designer);
}
@Override /**
public int getDesignerScrollHorizontalValue() { * 设置designer内部组件是否重叠的标志位
return designer.getArea().getHorizontalValue(); *
} * @param isIntersects 是否重叠
*/
@Override
public void setWidgetsIntersected(boolean isIntersects) {
designer.setWidgetsIntersect(isIntersects);
}
@Override /**
public int getDesignerScrollVerticalValue() { * 获取designer内部组件是否重叠的标志位
return designer.getArea().getVerticalValue(); *
} * @return 重叠
}; */
@Override
public boolean isWidgetsIntersected() {
return designer.isWidgetsIntersect();
}
/**
* 获取designer相对屏幕的位置
*
* @return 位置
*/
@Override
public Point getDesignerLocationOnScreen() {
return designer.getLocationOnScreen();
}
/**
* 设置等距线
*
* @param line 吸附线
*/
@Override
public void setEquidistantLine(Absorptionline line) {
designer.getStateModel().setEquidistantLine(line);
}
@Override
public int getDesignerScrollHorizontalValue() {
return designer.getArea().getHorizontalValue();
}
@Override
public int getDesignerScrollVerticalValue() {
return designer.getArea().getVerticalValue();
}
}
@Override
protected void sorptionPoint(Point point, Rectangle current_bounds, final FormDesigner designer) {
RectDesigner rd = new RectDesigner(designer);
//判断当前操作的是不是参数面板,要特殊处理 //判断当前操作的是不是参数面板,要特殊处理
boolean isParameterLayout = ((XCreator)(designer.getSelectionModel().getSelection().getSelectedCreator().getParent())).acceptType(XWParameterLayout.class); boolean isParameterLayout = ((XCreator)(designer.getSelectionModel().getSelection().getSelectedCreator().getParent())).acceptType(XWParameterLayout.class);
point.setLocation(MoveUtils.sorption(point.x, point.y, current_bounds.width, current_bounds.height, rd, isParameterLayout)); point.setLocation(MoveUtils.sorption(point.x, point.y, current_bounds.width, current_bounds.height, rd, isParameterLayout));

16
designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java

@ -8,39 +8,25 @@ import java.awt.event.ContainerEvent;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
import java.beans.IntrospectionException; import java.beans.IntrospectionException;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.ComponentAdapter;
import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.LayoutAdapter;
import com.fr.design.designer.beans.adapters.layout.AbsoluteLayoutAdapter;
import com.fr.design.designer.beans.adapters.layout.FRAbsoluteLayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRAbsoluteLayoutAdapter;
import com.fr.design.designer.beans.location.Direction; import com.fr.design.designer.beans.location.Direction;
import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.creator.cardlayout.XWTabFitLayout;
import com.fr.design.form.layout.FRAbsoluteLayout; import com.fr.design.form.layout.FRAbsoluteLayout;
import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.icon.IconPathConstants; import com.fr.design.icon.IconPathConstants;
import com.fr.design.mainframe.*; import com.fr.design.mainframe.*;
import com.fr.design.mainframe.widget.editors.PaddingMarginEditor;
import com.fr.design.mainframe.widget.editors.WLayoutBorderStyleEditor;
import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer;
import com.fr.design.mainframe.widget.renderer.PaddingMarginCellRenderer;
import com.fr.form.ui.Connector; import com.fr.form.ui.Connector;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WAbsoluteLayout; import com.fr.form.ui.container.WAbsoluteLayout;
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget;
import com.fr.form.ui.container.WFitLayout;
import com.fr.form.ui.container.WLayout; import com.fr.form.ui.container.WLayout;
import com.fr.form.ui.widget.BoundsWidget;
import com.fr.general.FRScreen; import com.fr.general.FRScreen;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.core.PropertyChangeAdapter;
import org.eclipse.swt.internal.gdip.Rect;
import javax.swing.*;
/** /**
* @author richer * @author richer

2
designer_form/src/com/fr/design/designer/creator/XWFitLayout.java

@ -20,10 +20,10 @@ import com.fr.design.mainframe.FormArea;
import com.fr.design.utils.gui.LayoutUtils; import com.fr.design.utils.gui.LayoutUtils;
import com.fr.form.ui.PaddingMargin; import com.fr.form.ui.PaddingMargin;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget;
import com.fr.form.ui.container.WBodyLayoutType; import com.fr.form.ui.container.WBodyLayoutType;
import com.fr.form.ui.container.WFitLayout; import com.fr.form.ui.container.WFitLayout;
import com.fr.form.ui.container.WLayout; import com.fr.form.ui.container.WLayout;
import com.fr.form.ui.widget.BoundsWidget;
import com.fr.general.FRScreen; import com.fr.general.FRScreen;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;

2
designer_form/src/com/fr/design/designer/creator/XWScaleLayout.java

@ -11,8 +11,8 @@ import com.fr.design.designer.beans.LayoutAdapter;
import com.fr.design.designer.beans.adapters.layout.FRScaleLayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRScaleLayoutAdapter;
import com.fr.design.form.layout.FRScaleLayout; import com.fr.design.form.layout.FRScaleLayout;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget;
import com.fr.form.ui.container.WScaleLayout; import com.fr.form.ui.container.WScaleLayout;
import com.fr.form.ui.widget.BoundsWidget;
/** /**
* 自适应布局中添加组件时部分控件如数字文本下拉等需要保持控件默认高度21 用此容器来实现 * 自适应布局中添加组件时部分控件如数字文本下拉等需要保持控件默认高度21 用此容器来实现

2
designer_form/src/com/fr/design/designer/creator/XWTitleLayout.java

@ -10,8 +10,8 @@ import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.form.ui.Label; import com.fr.form.ui.Label;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.form.ui.WidgetTitle; import com.fr.form.ui.WidgetTitle;
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget;
import com.fr.form.ui.container.WTitleLayout; import com.fr.form.ui.container.WTitleLayout;
import com.fr.form.ui.widget.BoundsWidget;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import java.awt.*; import java.awt.*;

80
designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveAction.java

@ -0,0 +1,80 @@
package com.fr.design.designer.creator.cardlayout;
import com.fr.design.designer.beans.actions.FormUndoableAction;
import com.fr.design.mainframe.FormDesigner;
import com.fr.form.ui.CardSwitchButton;
import com.fr.form.ui.container.cardlayout.WTabFitLayout;
import com.fr.general.FRLogger;
/**
* Created by zhouping on 2017/2/17.
*/
public class TabMoveAction extends FormUndoableAction {
private XCardSwitchButton xCardSwitchButton;
public TabMoveAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) {
super(t);
this.xCardSwitchButton = xCardSwitchButton;
}
@Override
public boolean executeActionReturnUndoRecordNeeded() {
XCardSwitchButton xCardSwitchButton = getxCardSwitchButton();
XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout();
XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout();
CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData();
try {
int currentIndex = currentButton.getIndex();
int maxIndex = xwCardTagLayout.getComponentCount();
XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex);
WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData();
xwCardTagLayout.setSwitchingTab(true);
changeTabIndex(xwCardTagLayout, xwCardLayout, currentIndex, maxIndex);
moveTabAction(xwCardTagLayout, currentButton, xCurrentTab, currentTab);
xwCardTagLayout.setSwitchingTab(false);
}catch (Exception e){
xwCardTagLayout.setSwitchingTab(false);
FRLogger.getLogger().error(e.getMessage());
return false;
}
return true;
}
private void moveTabAction(XWCardTagLayout xwCardTagLayout, CardSwitchButton currentButton, XWTabFitLayout xCurrentTab, WTabFitLayout currentTab) {
int move2Index = getTabMoveIndex(currentButton);
XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout();
xwCardTagLayout.remove(xCardSwitchButton);
xwCardTagLayout.add(xCardSwitchButton, move2Index);
xwCardLayout.remove(xCurrentTab);
xwCardLayout.add(xCurrentTab, move2Index);
currentButton.setIndex(move2Index);
currentTab.setIndex(move2Index);
currentTab.setTabNameIndex(move2Index);
xwCardLayout.toData().setShowIndex(move2Index);
xwCardLayout.showCard();
}
//改变Tab的索引号
protected void changeTabIndex(XWCardTagLayout xwCardTagLayout, XWCardLayout xwCardLayout, int currentIndex, int maxIndex) {
}
/**
* 获取tab移动的目的索引首位末尾下一个上一个
* @param currentButton 当前按钮
* @return 索引
*/
protected int getTabMoveIndex(CardSwitchButton currentButton) {
return currentButton.getIndex();
}
public XCardSwitchButton getxCardSwitchButton() {
return xCardSwitchButton;
}
public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) {
this.xCardSwitchButton = xCardSwitchButton;
}
}

23
designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveCustomAction.java

@ -1,32 +1,17 @@
package com.fr.design.designer.creator.cardlayout; package com.fr.design.designer.creator.cardlayout;
import com.fr.base.BaseUtils;
import com.fr.design.designer.beans.actions.FormUndoableAction;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.general.IOUtils;
/** /**
* Created by zhouping on 2017/2/9. * Created by zhouping on 2017/2/9.
*/ */
public class TabMoveCustomAction extends FormUndoableAction { public class TabMoveCustomAction extends TabMoveAction {
private XCardSwitchButton xCardSwitchButton;
public TabMoveCustomAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { public TabMoveCustomAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) {
super(t); super(t, xCardSwitchButton);
this.setName(""); this.setName("");
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/control/refresh.png")); this.setSmallIcon(IOUtils.readIcon("/com/fr/design/images/control/refresh.png"));
this.xCardSwitchButton = xCardSwitchButton;
} }
@Override
public boolean executeActionReturnUndoRecordNeeded() {
return false;
}
public XCardSwitchButton getxCardSwitchButton() {
return xCardSwitchButton;
}
public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) {
this.xCardSwitchButton = xCardSwitchButton;
}
} }

62
designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveEndAction.java

@ -1,66 +1,36 @@
package com.fr.design.designer.creator.cardlayout; package com.fr.design.designer.creator.cardlayout;
import com.fr.base.BaseUtils;
import com.fr.design.designer.beans.actions.FormUndoableAction;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.CardSwitchButton;
import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.form.ui.container.cardlayout.WTabFitLayout;
import com.fr.general.FRLogger; import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
/** /**
* Created by zhouping on 2017/2/9. * Created by zhouping on 2017/2/9.
*/ */
public class TabMoveEndAction extends FormUndoableAction { public class TabMoveEndAction extends TabMoveAction {
private XCardSwitchButton xCardSwitchButton;
public TabMoveEndAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { public TabMoveEndAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) {
super(t); super(t, xCardSwitchButton);
this.setName(Inter.getLocText("FR-Designer-Move_Tab_End")); this.setName(Inter.getLocText("FR-Designer-Move_Tab_End"));
this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/control/rightright.png")); this.setSmallIcon(IOUtils.readIcon("com/fr/design/images/control/rightright.png"));
this.xCardSwitchButton = xCardSwitchButton;
} }
@Override //改变Tab的索引号
public boolean executeActionReturnUndoRecordNeeded() { protected void changeTabIndex(XWCardTagLayout xwCardTagLayout, XWCardLayout xwCardLayout, int currentIndex, int maxIndex) {
XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); //修改当前tab往后所有tab的索引号
XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); for (int i = currentIndex + 1; i < maxIndex; i++) {
CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); CardSwitchButton tempBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(i).toData();
try { tempBtn.setIndex(i - 1);
int currentIndex = currentButton.getIndex(); WTabFitLayout tempTab = (WTabFitLayout) xwCardLayout.getXCreator(i).toData();
int maxIndex = xwCardTagLayout.getComponentCount(); tempTab.setIndex(i - 1);
XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); tempTab.setTabNameIndex(i - 1);
WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData();
xwCardTagLayout.setSwitchingTab(true);
//修改当前tab往后所有tab的索引号
for (int i = currentIndex + 1; i < maxIndex; i++) {
CardSwitchButton tempBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(i).toData();
tempBtn.setIndex(i - 1);
WTabFitLayout tempTab = (WTabFitLayout) xwCardLayout.getXCreator(i).toData();
tempTab.setIndex(i - 1);
tempTab.setTabNameIndex(i - 1);
}
xwCardTagLayout.remove(xCardSwitchButton);
xwCardTagLayout.add(xCardSwitchButton);
xwCardLayout.remove(xCurrentTab);
xwCardLayout.add(xCurrentTab);
currentButton.setIndex(maxIndex - 1);
currentTab.setIndex(maxIndex - 1);
currentTab.setTabNameIndex(maxIndex - 1);
xwCardTagLayout.setSwitchingTab(false);
}catch (Exception e){
xwCardTagLayout.setSwitchingTab(false);
FRLogger.getLogger().error(e.getMessage());
return false;
} }
return true;
}
public XCardSwitchButton getxCardSwitchButton() {
return xCardSwitchButton;
} }
public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { @Override
this.xCardSwitchButton = xCardSwitchButton; protected int getTabMoveIndex(CardSwitchButton btn) {
return getxCardSwitchButton().getTagLayout().getComponentCount() - 1;
} }
} }

59
designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveFirstAction.java

@ -1,65 +1,36 @@
package com.fr.design.designer.creator.cardlayout; package com.fr.design.designer.creator.cardlayout;
import com.fr.base.BaseUtils;
import com.fr.design.designer.beans.actions.FormUndoableAction;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.CardSwitchButton;
import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.form.ui.container.cardlayout.WTabFitLayout;
import com.fr.general.FRLogger; import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
/** /**
* Created by zhouping on 2017/2/9. * Created by zhouping on 2017/2/9.
*/ */
public class TabMoveFirstAction extends FormUndoableAction { public class TabMoveFirstAction extends TabMoveAction {
private XCardSwitchButton xCardSwitchButton;
public TabMoveFirstAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { public TabMoveFirstAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) {
super(t); super(t, xCardSwitchButton);
this.setName(Inter.getLocText("FR-Designer-Move_Tab_First")); this.setName(Inter.getLocText("FR-Designer-Move_Tab_First"));
this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/control/leftleft.png")); this.setSmallIcon(IOUtils.readIcon("com/fr/design/images/control/leftleft.png"));
this.xCardSwitchButton = xCardSwitchButton;
} }
@Override @Override
public boolean executeActionReturnUndoRecordNeeded() { protected void changeTabIndex(XWCardTagLayout xwCardTagLayout, XWCardLayout xwCardLayout, int currentIndex, int maxIndex) {
XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); //修改当前tab往前所有tab的索引号
XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); for (int i = currentIndex - 1; i >= 0; i--) {
CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); CardSwitchButton tempBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(i).toData();
try { tempBtn.setIndex(i + 1);
int currentIndex = currentButton.getIndex(); WTabFitLayout tempTab = (WTabFitLayout) xwCardLayout.getXCreator(i).toData();
XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); tempTab.setIndex(i + 1);
WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData(); tempTab.setTabNameIndex(i + 1);
xwCardTagLayout.setSwitchingTab(true);
//修改当前tab往前所有tab的索引号
for (int i = currentIndex - 1; i >= 0; i--) {
CardSwitchButton tempBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(i).toData();
tempBtn.setIndex(i + 1);
WTabFitLayout tempTab = (WTabFitLayout) xwCardLayout.getXCreator(i).toData();
tempTab.setIndex(i + 1);
tempTab.setTabNameIndex(i + 1);
}
xwCardTagLayout.remove(xCardSwitchButton);
xwCardTagLayout.add(xCardSwitchButton, 0);
xwCardLayout.remove(xCurrentTab);
xwCardLayout.add(xCurrentTab, 0);
currentButton.setIndex(0);
currentTab.setIndex(0);
currentTab.setTabNameIndex(0);
xwCardTagLayout.setSwitchingTab(false);
}catch (Exception e){
xwCardTagLayout.setSwitchingTab(false);
FRLogger.getLogger().error(e.getMessage());
return false;
} }
return true;
} }
public XCardSwitchButton getxCardSwitchButton() { @Override
return xCardSwitchButton; protected int getTabMoveIndex(CardSwitchButton btn) {
} return 0;
public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) {
this.xCardSwitchButton = xCardSwitchButton;
} }
} }

58
designer_form/src/com/fr/design/designer/creator/cardlayout/TabMoveNextAction.java

@ -1,64 +1,34 @@
package com.fr.design.designer.creator.cardlayout; package com.fr.design.designer.creator.cardlayout;
import com.fr.base.BaseUtils;
import com.fr.design.designer.beans.actions.FormUndoableAction;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.CardSwitchButton;
import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.form.ui.container.cardlayout.WTabFitLayout;
import com.fr.general.FRLogger; import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
/** /**
* Created by zhouping on 2017/2/9. * Created by zhouping on 2017/2/9.
*/ */
public class TabMoveNextAction extends FormUndoableAction { public class TabMoveNextAction extends TabMoveAction {
private XCardSwitchButton xCardSwitchButton;
public TabMoveNextAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { public TabMoveNextAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) {
super(t); super(t, xCardSwitchButton);
this.setName(Inter.getLocText("FR-Designer-Move_Tab_Next")); this.setName(Inter.getLocText("FR-Designer-Move_Tab_Next"));
this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/control/right.png")); this.setSmallIcon(IOUtils.readIcon("com/fr/design/images/control/right.png"));
this.xCardSwitchButton = xCardSwitchButton;
} }
@Override @Override
public boolean executeActionReturnUndoRecordNeeded() { protected void changeTabIndex(XWCardTagLayout xwCardTagLayout, XWCardLayout xwCardLayout, int currentIndex, int maxIndex) {
XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); //修改下一个tab的索引号
XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); CardSwitchButton nextBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(currentIndex + 1).toData();
CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); nextBtn.setIndex(currentIndex);
try { WTabFitLayout nextTab = (WTabFitLayout) xwCardLayout.getXCreator(currentIndex + 1).toData();
int currentIndex = currentButton.getIndex(); nextTab.setIndex(currentIndex);
XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); nextTab.setTabNameIndex(currentIndex);
WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData();
xwCardTagLayout.setSwitchingTab(true);
//修改下一个tab的索引号
CardSwitchButton nextBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(currentIndex + 1).toData();
nextBtn.setIndex(currentIndex);
WTabFitLayout nextTab = (WTabFitLayout) xwCardLayout.getXCreator(currentIndex + 1).toData();
nextTab.setIndex(currentIndex);
nextTab.setTabNameIndex(currentIndex);
xwCardTagLayout.remove(xCardSwitchButton);
xwCardTagLayout.add(xCardSwitchButton, currentIndex + 1);
xwCardLayout.remove(xCurrentTab);
xwCardLayout.add(xCurrentTab, currentIndex + 1);
currentButton.setIndex(currentIndex + 1);
currentTab.setIndex(currentIndex + 1);
currentTab.setTabNameIndex(currentIndex + 1);
xwCardTagLayout.setSwitchingTab(false);
}catch (Exception e){
xwCardTagLayout.setSwitchingTab(false);
FRLogger.getLogger().error(e.getMessage());
return false;
}
return true;
}
public XCardSwitchButton getxCardSwitchButton() {
return xCardSwitchButton;
} }
public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { @Override
this.xCardSwitchButton = xCardSwitchButton; protected int getTabMoveIndex(CardSwitchButton currentButton) {
return currentButton.getIndex() + 1;
} }
} }

58
designer_form/src/com/fr/design/designer/creator/cardlayout/TabMovePrevAction.java

@ -1,64 +1,34 @@
package com.fr.design.designer.creator.cardlayout; package com.fr.design.designer.creator.cardlayout;
import com.fr.base.BaseUtils;
import com.fr.design.designer.beans.actions.FormUndoableAction;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.CardSwitchButton;
import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.form.ui.container.cardlayout.WTabFitLayout;
import com.fr.general.FRLogger; import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
/** /**
* Created by zhouping on 2017/2/9. * Created by zhouping on 2017/2/9.
*/ */
public class TabMovePrevAction extends FormUndoableAction { public class TabMovePrevAction extends TabMoveAction {
private XCardSwitchButton xCardSwitchButton;
public TabMovePrevAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) { public TabMovePrevAction(FormDesigner t, XCardSwitchButton xCardSwitchButton) {
super(t); super(t, xCardSwitchButton);
this.setName(Inter.getLocText("FR-Designer-Move_Tab_Prev")); this.setName(Inter.getLocText("FR-Designer-Move_Tab_Prev"));
this.setSmallIcon(BaseUtils.readIcon("com/fr/design/images/control/left.png")); this.setSmallIcon(IOUtils.readIcon("com/fr/design/images/control/left.png"));
this.xCardSwitchButton = xCardSwitchButton;
} }
@Override @Override
public boolean executeActionReturnUndoRecordNeeded() { protected void changeTabIndex(XWCardTagLayout xwCardTagLayout, XWCardLayout xwCardLayout, int currentIndex, int maxIndex) {
XWCardTagLayout xwCardTagLayout = xCardSwitchButton.getTagLayout(); //修改上一个tab的索引号
XWCardLayout xwCardLayout = xCardSwitchButton.getCardLayout(); CardSwitchButton prevBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(currentIndex - 1).toData();
CardSwitchButton currentButton = (CardSwitchButton) xCardSwitchButton.toData(); prevBtn.setIndex(currentIndex);
try { WTabFitLayout prevTab = (WTabFitLayout) xwCardLayout.getXCreator(currentIndex - 1).toData();
int currentIndex = currentButton.getIndex(); prevTab.setIndex(currentIndex);
XWTabFitLayout xCurrentTab = (XWTabFitLayout) xwCardLayout.getXCreator(currentIndex); prevTab.setTabNameIndex(currentIndex);
WTabFitLayout currentTab = (WTabFitLayout) xCurrentTab.toData();
xwCardTagLayout.setSwitchingTab(true);
//修改上一个tab的索引号
CardSwitchButton prevBtn = (CardSwitchButton) xwCardTagLayout.getXCreator(currentIndex - 1).toData();
prevBtn.setIndex(currentIndex);
WTabFitLayout prevTab = (WTabFitLayout) xwCardLayout.getXCreator(currentIndex - 1).toData();
prevTab.setIndex(currentIndex);
prevTab.setTabNameIndex(currentIndex);
xwCardTagLayout.remove(xCardSwitchButton);
xwCardTagLayout.add(xCardSwitchButton, currentIndex - 1);
xwCardLayout.remove(xCurrentTab);
xwCardLayout.add(xCurrentTab, currentIndex - 1);
currentButton.setIndex(currentIndex - 1);
currentTab.setIndex(currentIndex - 1);
currentTab.setTabNameIndex(currentIndex - 1);
xwCardTagLayout.setSwitchingTab(false);
}catch (Exception e){
xwCardTagLayout.setSwitchingTab(false);
FRLogger.getLogger().error(e.getMessage());
return false;
}
return true;
}
public XCardSwitchButton getxCardSwitchButton() {
return xCardSwitchButton;
} }
public void setxCardSwitchButton(XCardSwitchButton xCardSwitchButton) { @Override
this.xCardSwitchButton = xCardSwitchButton; protected int getTabMoveIndex(CardSwitchButton currentButton) {
return currentButton.getIndex() - 1;
} }
} }

10
designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java

@ -48,7 +48,6 @@ public class XCardSwitchButton extends XButton {
//设置的图片类型 //设置的图片类型
private static final String COLOR_BACKGROUND_TYPE = "ColorBackground"; private static final String COLOR_BACKGROUND_TYPE = "ColorBackground";
private static final String DEFAULT_TYPE = "default"; private static final String DEFAULT_TYPE = "default";
private static final String DEFAULT_FONT_NAME = "SimSun";
//默认颜色 //默认颜色
public static final Color NORMAL_GRAL = new Color(236,236,236); public static final Color NORMAL_GRAL = new Color(236,236,236);
@ -67,7 +66,6 @@ public class XCardSwitchButton extends XButton {
private static final int FONT_SIZE_ADJUST = 2; private static final int FONT_SIZE_ADJUST = 2;
private static final int SIDE_OFFSET = 57; private static final int SIDE_OFFSET = 57;
private static final int FONT_SIZE = 9;
private XWCardLayout cardLayout; private XWCardLayout cardLayout;
private XWCardTagLayout tagLayout; private XWCardTagLayout tagLayout;
@ -345,10 +343,7 @@ public class XCardSwitchButton extends XButton {
// 标题部分 // 标题部分
WidgetTitle title = style.getTitle(); WidgetTitle title = style.getTitle();
FRFont font = button.getFont(); FRFont font = title.getFrFont();
if (font == null) {
font = FRFont.getInstance(DEFAULT_FONT_NAME, 0, FONT_SIZE);
}
FRFont newFont = FRFont.getInstance(font.getName(),font.getStyle(),font.getSize() + FONT_SIZE_ADJUST); FRFont newFont = FRFont.getInstance(font.getName(),font.getStyle(),font.getSize() + FONT_SIZE_ADJUST);
UILabel label = this.getContentLabel(); UILabel label = this.getContentLabel();
label.setFont(newFont); label.setFont(newFont);
@ -427,9 +422,6 @@ public class XCardSwitchButton extends XButton {
XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i); XCardSwitchButton temp = (XCardSwitchButton) this.tagLayout.getComponent(i);
CardSwitchButton cardSwitchButton = (CardSwitchButton) temp.toData(); CardSwitchButton cardSwitchButton = (CardSwitchButton) temp.toData();
FRFont frFont = cardSwitchButton.getFont(); FRFont frFont = cardSwitchButton.getFont();
if (frFont == null) {
frFont = FRFont.getInstance(DEFAULT_FONT_NAME, 0, FONT_SIZE);
}
UILabel label = temp.getContentLabel(); UILabel label = temp.getContentLabel();
label.setSize(dimension); label.setSize(dimension);
label.setFont(frFont.applyResolutionNP(ScreenResolution.getScreenResolution())); label.setFont(frFont.applyResolutionNP(ScreenResolution.getScreenResolution()));

12
designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardLayout.java

@ -295,9 +295,15 @@ public class XWCardLayout extends XLayoutContainer {
* 判断当前tab组件是不是嵌套的 * 判断当前tab组件是不是嵌套的
* @return 嵌套与否 * @return 嵌套与否
*/ */
private boolean isNested(){ private boolean isNested() {
XLayoutContainer xLayoutContainer = this.getBackupParent().getBackupParent(); XCreator xCreator = (XCreator)this.getBackupParent().getParent();
return xLayoutContainer != null && xLayoutContainer.acceptType(XWTabFitLayout.class); while (xCreator != null) {
if (xCreator.acceptType(XWCardMainBorderLayout.class)) {
return true;
}
xCreator = (XCreator) xCreator.getParent();
}
return false;
} }
public CRPropertyDescriptor[] getisCarousel() throws IntrospectionException { public CRPropertyDescriptor[] getisCarousel() throws IntrospectionException {

4
designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java

@ -18,8 +18,8 @@ import com.fr.design.icon.IconPathConstants;
import com.fr.design.mainframe.EditingMouseListener; import com.fr.design.mainframe.EditingMouseListener;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.form.ui.container.WBorderLayout; import com.fr.form.ui.container.WBorderLayout;
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget;
import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout; import com.fr.form.ui.container.cardlayout.WCardMainBorderLayout;
import com.fr.form.ui.widget.BoundsWidget;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
@ -231,7 +231,7 @@ public class XWCardMainBorderLayout extends XWBorderLayout{
); );
g2d.setColor(Color.BLACK); g2d.setColor(Color.BLACK);
//画编辑文字 //画编辑文字
g2d.drawString(Inter.getLocText("Edit"), x + w / 2 - 2, y + h / 2 + 5); g2d.drawString(Inter.getLocText("FR-Designer_Edit"), x + w / 2 - 2, y + h / 2 + 5);
} }
} }

53
designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java

@ -1,11 +1,5 @@
package com.fr.design.designer.creator.cardlayout; package com.fr.design.designer.creator.cardlayout;
import java.awt.*;
import java.beans.IntrospectionException;
import javax.swing.border.Border;
import com.fr.base.ScreenResolution;
import com.fr.base.background.ColorBackground; import com.fr.base.background.ColorBackground;
import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.LayoutAdapter;
import com.fr.design.designer.beans.adapters.layout.FRTabFitLayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRTabFitLayoutAdapter;
@ -16,25 +10,25 @@ import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.form.util.XCreatorConstants; import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.mainframe.FormDesigner; import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.FormHierarchyTreePane; import com.fr.design.mainframe.FormHierarchyTreePane;
import com.fr.design.mainframe.widget.editors.ButtonTypeEditor; import com.fr.design.mainframe.widget.editors.ButtonTypeEditor;
import com.fr.design.mainframe.widget.editors.FontEditor;
import com.fr.design.mainframe.widget.editors.ImgBackgroundEditor; import com.fr.design.mainframe.widget.editors.ImgBackgroundEditor;
import com.fr.design.mainframe.widget.renderer.FontCellRenderer;
import com.fr.design.utils.gui.LayoutUtils; import com.fr.design.utils.gui.LayoutUtils;
import com.fr.form.ui.CardSwitchButton; import com.fr.form.ui.CardSwitchButton;
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget;
import com.fr.form.ui.container.cardlayout.WCardTagLayout; import com.fr.form.ui.container.cardlayout.WCardTagLayout;
import com.fr.form.ui.container.cardlayout.WTabFitLayout; import com.fr.form.ui.container.cardlayout.WTabFitLayout;
import com.fr.form.ui.widget.BoundsWidget;
import com.fr.general.Background; import com.fr.general.Background;
import com.fr.general.FRFont;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.core.PropertyChangeAdapter; import com.fr.stable.core.PropertyChangeAdapter;
import javax.swing.border.Border;
import java.awt.*;
import java.beans.IntrospectionException;
/** /**
* @author focus * @author focus
@ -46,14 +40,10 @@ public class XWTabFitLayout extends XWFitLayout {
// tab布局在拖拽导致的缩放里(含间隔时),如果拖拽宽高大于组件宽高,会导致调整的时候找不到原来的组件 // tab布局在拖拽导致的缩放里(含间隔时),如果拖拽宽高大于组件宽高,会导致调整的时候找不到原来的组件
// 这里先将拖拽之前的宽高先做备份 // 这里先将拖拽之前的宽高先做备份
private static final Color NORMAL_GRAL = new Color(236,236,236); private static final Color NORMAL_GRAL = new Color(236,236,236);
private static final String DEFAULT_FONT_NAME = "SimSun";
public final static Font DEFAULTFT = new Font("Song_TypeFace",0,12);
public final static FRFont DEFAULT_FRFT = FRFont.getInstance(DEFAULT_FONT_NAME, 0, 9);
private Dimension referDim; private Dimension referDim;
private Background initialBackground; private Background initialBackground;
private Background overBackground; private Background overBackground;
private Background clickBackground; private Background clickBackground;
private FRFont font;
private XCardSwitchButton xCardSwitchButton; private XCardSwitchButton xCardSwitchButton;
public Dimension getReferDim() { public Dimension getReferDim() {
@ -88,15 +78,6 @@ public class XWTabFitLayout extends XWFitLayout {
this.clickBackground = clickBackground; this.clickBackground = clickBackground;
} }
@Override
public FRFont getFont() {
return font;
}
public void setFont(FRFont font) {
this.font = font;
}
public XCardSwitchButton getxCardSwitchButton() { public XCardSwitchButton getxCardSwitchButton() {
return xCardSwitchButton; return xCardSwitchButton;
} }
@ -164,21 +145,7 @@ public class XWTabFitLayout extends XWFitLayout {
cardSwitchButton.setClickBackground(clickBackground); cardSwitchButton.setClickBackground(clickBackground);
} }
} }
), )
//字体
creatNonListenerStyle(4).setPropertyChangeListener(
new PropertyChangeAdapter() {
@Override
public void propertyChange() {
font = ((WTabFitLayout) data).getFont();
CardSwitchButton cardSwitchButton = (CardSwitchButton) xCardSwitchButton.toData();
cardSwitchButton.setFont(font);
UILabel uiLabel = xCardSwitchButton.getLabel();
uiLabel.setFont(font.applyResolutionNP(ScreenResolution.getScreenResolution()));
uiLabel.setForeground(font.getForeground());
xCardSwitchButton.setLabel(uiLabel);
}
}),
}; };
} }
@ -210,9 +177,6 @@ public class XWTabFitLayout extends XWFitLayout {
XCreatorConstants.PROPERTY_CATEGORY, "Advanced"), XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
new CRPropertyDescriptor("clickBackground", this.data.getClass()).setEditorClass( new CRPropertyDescriptor("clickBackground", this.data.getClass()).setEditorClass(
ImgBackgroundEditor.class).setI18NName(Inter.getLocText("FR-Designer_Background-Click")).putKeyValue( ImgBackgroundEditor.class).setI18NName(Inter.getLocText("FR-Designer_Background-Click")).putKeyValue(
XCreatorConstants.PROPERTY_CATEGORY, "Advanced"),
new CRPropertyDescriptor("font", this.data.getClass()).setI18NName(Inter.getLocText("FR-Designer_FRFont"))
.setEditorClass(FontEditor.class).setRendererClass(FontCellRenderer.class).putKeyValue(
XCreatorConstants.PROPERTY_CATEGORY, "Advanced") XCreatorConstants.PROPERTY_CATEGORY, "Advanced")
}; };
return crPropertyDescriptors[i]; return crPropertyDescriptors[i];
@ -243,20 +207,15 @@ public class XWTabFitLayout extends XWFitLayout {
if (!isStyle) { if (!isStyle) {
this.xCardSwitchButton.setCustomStyle(false); this.xCardSwitchButton.setCustomStyle(false);
this.xCardSwitchButton.setSelectBackground(bg); this.xCardSwitchButton.setSelectBackground(bg);
this.xCardSwitchButton.getLabel().setFont(DEFAULTFT);
cardSwitchButton.setInitialBackground(null); cardSwitchButton.setInitialBackground(null);
cardSwitchButton.setClickBackground(null); cardSwitchButton.setClickBackground(null);
cardSwitchButton.setOverBackground(null); cardSwitchButton.setOverBackground(null);
cardSwitchButton.setFont(DEFAULT_FRFT);
} else { } else {
Background initialBackground = cardSwitchButton.getInitialBackground(); Background initialBackground = cardSwitchButton.getInitialBackground();
bg = initialBackground == null ? bg : initialBackground; bg = initialBackground == null ? bg : initialBackground;
this.xCardSwitchButton.setSelectBackground(bg); this.xCardSwitchButton.setSelectBackground(bg);
this.xCardSwitchButton.setCustomStyle(true); this.xCardSwitchButton.setCustomStyle(true);
cardSwitchButton.setCustomStyle(true); cardSwitchButton.setCustomStyle(true);
if (font != null) {
cardSwitchButton.setFont(font);
}
if (this.initialBackground != null){ if (this.initialBackground != null){
this.xCardSwitchButton.setSelectBackground(this.initialBackground); this.xCardSwitchButton.setSelectBackground(this.initialBackground);
cardSwitchButton.setInitialBackground(this.initialBackground); cardSwitchButton.setInitialBackground(this.initialBackground);

20
designer_form/src/com/fr/design/designer/properties/FRAbsoluteBodyLayoutPropertiesGroupModel.java

@ -26,8 +26,11 @@ import java.util.Comparator;
public class FRAbsoluteBodyLayoutPropertiesGroupModel extends FRAbsoluteLayoutPropertiesGroupModel { public class FRAbsoluteBodyLayoutPropertiesGroupModel extends FRAbsoluteLayoutPropertiesGroupModel {
private LayoutTypeEditor layoutTypeEditor; private LayoutTypeEditor layoutTypeEditor;
private LayoutTypeRenderer layoutTypeRenderer; private LayoutTypeRenderer layoutTypeRenderer;
//默认body是0,自适应布局;1,绝对布局. //默认body是0,自适应布局;1,绝对布局.
private WBodyLayoutType layoutType = WBodyLayoutType.ABSOLUTE; private WBodyLayoutType layoutType = WBodyLayoutType.ABSOLUTE;
private static final int EACH_ROW_COUNT = 4;
public FRAbsoluteBodyLayoutPropertiesGroupModel(XWAbsoluteBodyLayout xwAbsoluteBodyLayout) { public FRAbsoluteBodyLayoutPropertiesGroupModel(XWAbsoluteBodyLayout xwAbsoluteBodyLayout) {
super(xwAbsoluteBodyLayout); super(xwAbsoluteBodyLayout);
} }
@ -180,9 +183,8 @@ public class FRAbsoluteBodyLayoutPropertiesGroupModel extends FRAbsoluteLayoutPr
// 把绝对布局中的元素按规则移动到自适应布局中 // 把绝对布局中的元素按规则移动到自适应布局中
// 规则:各元素按顺序放置,其中每行最多4个元素,超出则换行,各元素均分body的高度和宽度 // 规则:各元素按顺序放置,其中每行最多4个元素,超出则换行,各元素均分body的高度和宽度
private void moveComponents2FitLayout(XWFitLayout xwFitLayout) { private void moveComponents2FitLayout(XWFitLayout xwFitLayout) {
int eachRowCount = 4;
Component[] components = xwFitLayout.getComponents(); Component[] components = xwFitLayout.getComponents();
if (components.length <= 1){ if (components.length == 0){
xwFitLayout.updateBoundsWidget(); xwFitLayout.updateBoundsWidget();
return; return;
} }
@ -191,17 +193,17 @@ public class FRAbsoluteBodyLayoutPropertiesGroupModel extends FRAbsoluteLayoutPr
int leftMargin = xwFitLayout.toData().getMargin().getLeft(); int leftMargin = xwFitLayout.toData().getMargin().getLeft();
int topMargin = xwFitLayout.toData().getMargin().getTop(); int topMargin = xwFitLayout.toData().getMargin().getTop();
xwFitLayout.toData().setCompInterval(0); xwFitLayout.toData().setCompInterval(0);
int row = (components.length / eachRowCount) + (components.length % eachRowCount == 0 ? 0 : 1); int row = (components.length / EACH_ROW_COUNT) + (components.length % EACH_ROW_COUNT == 0 ? 0 : 1);
//最后一行的列数不定 //最后一行的列数不定
int column = components.length % eachRowCount == 0 ? eachRowCount : components.length % eachRowCount; int column = components.length % EACH_ROW_COUNT == 0 ? EACH_ROW_COUNT : components.length % EACH_ROW_COUNT;
int componentWidth = layoutWidth / eachRowCount; int componentWidth = layoutWidth / EACH_ROW_COUNT;
int componentHeight = layoutHeight / row; int componentHeight = layoutHeight / row;
for(int i = 0;i < row - 1;i++){ for(int i = 0;i < row - 1;i++){
for(int j = 0;j < eachRowCount;j++){ for(int j = 0;j < EACH_ROW_COUNT;j++){
components[eachRowCount * i + j].setBounds( components[EACH_ROW_COUNT * i + j].setBounds(
leftMargin + componentWidth * j, leftMargin + componentWidth * j,
topMargin + componentHeight * i, topMargin + componentHeight * i,
j == eachRowCount - 1 ? layoutWidth - componentWidth * (eachRowCount - 1) : componentWidth, j == EACH_ROW_COUNT - 1 ? layoutWidth - componentWidth * (EACH_ROW_COUNT - 1) : componentWidth,
componentHeight componentHeight
); );
} }
@ -210,7 +212,7 @@ public class FRAbsoluteBodyLayoutPropertiesGroupModel extends FRAbsoluteLayoutPr
int lastRowWidth = layoutWidth / column; int lastRowWidth = layoutWidth / column;
int lastRowHeight = layoutHeight - componentHeight * (row - 1); int lastRowHeight = layoutHeight - componentHeight * (row - 1);
for (int i = 0;i < column;i++) { for (int i = 0;i < column;i++) {
components[eachRowCount * (row - 1) + i].setBounds( components[EACH_ROW_COUNT * (row - 1) + i].setBounds(
leftMargin + lastRowWidth * i, leftMargin + lastRowWidth * i,
topMargin + componentHeight * (row - 1), topMargin + componentHeight * (row - 1),
i == column - 1 ? layoutWidth - lastRowWidth * (column - 1) : lastRowWidth, i == column - 1 ? layoutWidth - lastRowWidth * (column - 1) : lastRowWidth,

16
designer_form/src/com/fr/design/designer/properties/BodyAppRelayoutTable.java → designer_form/src/com/fr/design/designer/properties/mobile/BodyAppRelayoutTable.java

@ -1,9 +1,9 @@
package com.fr.design.designer.properties; package com.fr.design.designer.properties.mobile;
import java.awt.*;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.beans.IntrospectionException; import java.beans.IntrospectionException;
import java.util.ArrayList; import java.util.ArrayList;
import javax.swing.table.TableModel;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.designer.beans.events.DesignerEvent;
@ -17,7 +17,9 @@ import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.widget.editors.InChangeBooleanEditor; import com.fr.design.mainframe.widget.editors.InChangeBooleanEditor;
import com.fr.general.Inter; import com.fr.general.Inter;
/**
* 将body的控件列表中再加入手机重布局选项
*/
public class BodyAppRelayoutTable extends AbstractPropertyTable { public class BodyAppRelayoutTable extends AbstractPropertyTable {
private XCreator xCreator; private XCreator xCreator;
@ -31,7 +33,6 @@ public class BodyAppRelayoutTable extends AbstractPropertyTable {
CRPropertyDescriptor[] propertyTableEditor = { CRPropertyDescriptor[] propertyTableEditor = {
new CRPropertyDescriptor("appRelayout", this.xCreator.toData().getClass()).setEditorClass(InChangeBooleanEditor.class) new CRPropertyDescriptor("appRelayout", this.xCreator.toData().getClass()).setEditorClass(InChangeBooleanEditor.class)
.setI18NName(Inter.getLocText("FR-Designer-App_ReLayout")) .setI18NName(Inter.getLocText("FR-Designer-App_ReLayout"))
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, Inter.getLocText("FR-Designer-Layout_Adaptive_Layout"))
}; };
return propertyTableEditor; return propertyTableEditor;
} }
@ -43,6 +44,7 @@ public class BodyAppRelayoutTable extends AbstractPropertyTable {
public void initPropertyGroups(Object source) { public void initPropertyGroups(Object source) {
this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner(); this.designer = WidgetPropertyPane.getInstance().getEditingFormDesigner();
this.setFillsViewportHeight(false);
groups = new ArrayList<PropertyGroup>(); groups = new ArrayList<PropertyGroup>();
CRPropertyDescriptor[] propertyTableEditor = null; CRPropertyDescriptor[] propertyTableEditor = null;
@ -55,8 +57,7 @@ public class BodyAppRelayoutTable extends AbstractPropertyTable {
groups.add(new PropertyGroup(new ReportAppPropertyGroupModel(Inter.getLocText("FR-Designer_Properties_Mobile"), xCreator, propertyTableEditor, designer))); groups.add(new PropertyGroup(new ReportAppPropertyGroupModel(Inter.getLocText("FR-Designer_Properties_Mobile"), xCreator, propertyTableEditor, designer)));
TableModel model = new BeanTableModel(); setModel(new BeanTableModel());
setModel(model);
this.repaint(); this.repaint();
} }
@ -78,8 +79,9 @@ public class BodyAppRelayoutTable extends AbstractPropertyTable {
} }
/** /**
* 待说明 * 触发控件编辑事件
*/ */
@Override
public void firePropertyEdit() { public void firePropertyEdit() {
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED); designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED);
} }

1
designer_form/src/com/fr/design/designer/properties/mobile/BodyMobilePropertyUI.java

@ -3,7 +3,6 @@ package com.fr.design.designer.properties.mobile;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XWAbsoluteBodyLayout; import com.fr.design.designer.creator.XWAbsoluteBodyLayout;
import com.fr.design.designer.creator.XWFitLayout; import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.properties.BodyAppRelayoutTable;
import com.fr.design.fun.impl.AbstractWidgetPropertyUIProvider; import com.fr.design.fun.impl.AbstractWidgetPropertyUIProvider;
import com.fr.design.gui.itable.AbstractPropertyTable; import com.fr.design.gui.itable.AbstractPropertyTable;
import com.fr.general.Inter; import com.fr.general.Inter;

2
designer_form/src/com/fr/design/form/mobile/FormMobileAttrPane.java

@ -36,7 +36,7 @@ public class FormMobileAttrPane extends BasicBeanPane<FormMobileAttr>{
jPanel2.setLayout(FRGUIPaneFactory.createBorderLayout()); jPanel2.setLayout(FRGUIPaneFactory.createBorderLayout());
jPanel2.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); jPanel2.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
this.mobileToolBarPane = new MobileToolBarPane(); this.mobileToolBarPane = new MobileToolBarPane();
this.mobileUseHtmlGroupPane = new MobileUseHtmlGroupPane(); this.mobileUseHtmlGroupPane = new MobileUseHtmlGroupPane(Inter.getLocText("FR-Designer_Mobile_Form_Analysis_Annotation"));
//设置一个JPanel包裹mobileToolBarPane这个Panel,让jPanel的高度等于mobileToolBarPane高度加10,再放入this中 //设置一个JPanel包裹mobileToolBarPane这个Panel,让jPanel的高度等于mobileToolBarPane高度加10,再放入this中
jPanel1.setPreferredSize(new Dimension(0, (int)this.mobileToolBarPane.getPreferredSize().getHeight() + PADDINGHEIGHT)); jPanel1.setPreferredSize(new Dimension(0, (int)this.mobileToolBarPane.getPreferredSize().getHeight() + PADDINGHEIGHT));
jPanel2.setPreferredSize(new Dimension(0, (int)this.mobileUseHtmlGroupPane.getPreferredSize().getHeight() + PADDINGHEIGHT)); jPanel2.setPreferredSize(new Dimension(0, (int)this.mobileUseHtmlGroupPane.getPreferredSize().getHeight() + PADDINGHEIGHT));

4
designer_form/src/com/fr/design/form/mobile/MobileUseHtmlGroupPane.java

@ -8,6 +8,10 @@ import com.fr.form.main.mobile.FormMobileAttr;
* Created by fanglei on 2016/12/28. * Created by fanglei on 2016/12/28.
*/ */
public class MobileUseHtmlGroupPane extends MobileUseHtmlGroupBeanPane<FormMobileAttr> { public class MobileUseHtmlGroupPane extends MobileUseHtmlGroupBeanPane<FormMobileAttr> {
public MobileUseHtmlGroupPane(String annotation) {
super(annotation);
}
@Override @Override
public void populateBean(FormMobileAttr mobileAttr) { public void populateBean(FormMobileAttr mobileAttr) {
if(mobileAttr != null) { if(mobileAttr != null) {

6
designer_form/src/com/fr/design/mainframe/ConnectorHelper.java

@ -7,18 +7,19 @@ import java.awt.Rectangle;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.util.ArrayList; import java.util.ArrayList;
import com.fr.form.ui.widget.BoundsWidget;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.design.designer.beans.ConnectorCreator; import com.fr.design.designer.beans.ConnectorCreator;
import com.fr.design.designer.creator.XWAbsoluteLayout; import com.fr.design.designer.creator.XWAbsoluteLayout;
import com.fr.form.ui.Connector; import com.fr.form.ui.Connector;
import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget;
public class ConnectorHelper { public class ConnectorHelper {
//这个类是用来画连接线的,暂时用不到 //这个类是用来画连接线的,暂时用不到
public static final int NEAR = 5; public static final int NEAR = 5;
private static double ratio = 0.5; private static double ratio = 0.5;
private final static int ADSORPTION = 15; // 吸附距离
private ArrayList<Point> drawingPoint; private ArrayList<Point> drawingPoint;
private FormDesigner designer; private FormDesigner designer;
private boolean drawing; private boolean drawing;
@ -67,7 +68,6 @@ public class ConnectorHelper {
ConnectorCreator cc = new ConnectorCreator(designer.getTarget().getContainer(), new Point(startPoint), new Point(endPoint)); ConnectorCreator cc = new ConnectorCreator(designer.getTarget().getContainer(), new Point(startPoint), new Point(endPoint));
ArrayList<Point> p = cc.createPointList(); ArrayList<Point> p = cc.createPointList();
long e = System.currentTimeMillis(); long e = System.currentTimeMillis();
System.out.println("useTime:" + (e - s));
return p; return p;
} }
@ -87,7 +87,7 @@ public class ConnectorHelper {
public void createDefalutLine() { public void createDefalutLine() {
if (drawingPoint != null if (drawingPoint != null
&& drawingPoint.size() > 1 && drawingPoint.size() > 1
&& ConnectorCreator.getMinimumDistance(drawingPoint.get(0), drawingPoint.get(drawingPoint.size() - 1)) > 15) { && ConnectorCreator.getMinimumDistance(drawingPoint.get(0), drawingPoint.get(drawingPoint.size() - 1)) > ADSORPTION) {
((XWAbsoluteLayout) designer.getRootComponent()).addConnector(new Connector().addAll(drawingPoint)); ((XWAbsoluteLayout) designer.getRootComponent()).addConnector(new Connector().addAll(drawingPoint));
} }
drawingPoint = null; drawingPoint = null;

5
designer_form/src/com/fr/design/mainframe/EditingMouseListener.java

@ -11,6 +11,7 @@ import com.fr.design.designer.beans.location.Location;
import com.fr.design.designer.beans.models.SelectionModel; import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.beans.models.StateModel; import com.fr.design.designer.beans.models.StateModel;
import com.fr.design.designer.creator.*; import com.fr.design.designer.creator.*;
import com.fr.design.designer.creator.cardlayout.XCardSwitchButton;
import com.fr.design.form.util.XCreatorConstants; import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.xpane.ToolTipEditor; import com.fr.design.gui.xpane.ToolTipEditor;
@ -519,6 +520,10 @@ public class EditingMouseListener extends MouseInputAdapter {
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
XCreator creator = designer.getComponentAt(e); XCreator creator = designer.getComponentAt(e);
if (e.getButton() != MouseEvent.BUTTON1 && !creator.acceptType(XCardSwitchButton.class)) {
return;
}
creator = processTopLayoutMouseClick(creator); creator = processTopLayoutMouseClick(creator);
if(creator != null){ if(creator != null){

311
designer_form/src/com/fr/design/mainframe/FormParaWidgetPane.java

@ -18,7 +18,6 @@ import com.fr.form.ui.*;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.OperatingSystem;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -27,14 +26,14 @@ import java.util.ArrayList;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
public class FormParaWidgetPane extends JPanel{ public class FormParaWidgetPane extends JPanel {
private static FormParaWidgetPane THIS; private static FormParaWidgetPane THIS;
private List<WidgetOption> predifinedwidgeList = new ArrayList<WidgetOption>(); private List<WidgetOption> predifinedwidgeList = new ArrayList<WidgetOption>();
private JWindow chartTypeWindow; private JWindow chartTypeWindow;
private JWindow widgetTypeWindow; private JWindow widgetTypeWindow;
private WidgetOption[] widgetOptions = null; private WidgetOption[] widgetOptions = null;
private WidgetOption[] chartOptions = null; private WidgetOption[] chartOptions = null;
private WidgetOption[] layoutOptions = null; private WidgetOption[] layoutOptions = null;
private int widgetButtonWidth = 22; private int widgetButtonWidth = 22;
private int widgetButtonHeight = 20; private int widgetButtonHeight = 20;
@ -46,49 +45,49 @@ public class FormParaWidgetPane extends JPanel{
//预定义控件最多显示20行 //预定义控件最多显示20行
private int preWidgetShowMaxRow = 20; private int preWidgetShowMaxRow = 20;
//显示8个图表组件 //显示8个图表组件
private static final int commonChartNum = 8; private static final int COMMON_CHAR_NUM = 8;
//显示10个普通控件 //显示10个普通控件
private int commonWidgetNum = 10; private int commonWidgetNum = 10;
private JSeparator jSeparatorPara; private JSeparator jSeparatorPara;
private JSeparator jSeparatorChart; private JSeparator jSeparatorChart;
private JSeparator jSeparatorLayout; private JSeparator jSeparatorLayout;
private UILabel paraLabel ; private UILabel paraLabel;
private FormDesigner designer; private FormDesigner designer;
public static final FormParaWidgetPane getInstance(FormDesigner designer) { public static final FormParaWidgetPane getInstance(FormDesigner designer) {
if(THIS == null) { if (THIS == null) {
THIS = new FormParaWidgetPane(); THIS = new FormParaWidgetPane();
} }
THIS.designer = designer; THIS.designer = designer;
THIS.setTarget(designer); THIS.setTarget(designer);
return THIS; return THIS;
} }
public FormParaWidgetPane() { public FormParaWidgetPane() {
setLayout(new FlowLayout(FlowLayout.LEFT)); setLayout(new FlowLayout(FlowLayout.LEFT));
DesignerContext.getDesignerFrame().getCenterTemplateCardPane().addComponentListener(new ComponentAdapter() { DesignerContext.getDesignerFrame().getCenterTemplateCardPane().addComponentListener(new ComponentAdapter() {
public void componentResized(ComponentEvent e) { public void componentResized(ComponentEvent e) {
if (FormParaWidgetPane.this.getParent() != null) { if (FormParaWidgetPane.this.getParent() != null) {
JPanel fother = (JPanel)FormParaWidgetPane.this.getParent(); JPanel fother = (JPanel) FormParaWidgetPane.this.getParent();
int delta_wdith = 0; int delta_wdith = 0;
for (int i = 0; i < fother.getComponentCount() - 1; i ++) { for (int i = 0; i < fother.getComponentCount() - 1; i++) {
delta_wdith += fother.getComponent(i).getWidth(); delta_wdith += fother.getComponent(i).getWidth();
} }
if(delta_wdith == 0){ if (delta_wdith == 0) {
return; return;
} }
Dimension d = fother.getSize(); Dimension d = fother.getSize();
setPreferredSize(new Dimension(d.width - delta_wdith, d.height)); setPreferredSize(new Dimension(d.width - delta_wdith, d.height));
LayoutUtils.layoutContainer(fother); LayoutUtils.layoutContainer(fother);
} }
} }
}); });
initFormParaComponent(); initFormParaComponent();
} }
private void initFormParaComponent() { private void initFormParaComponent() {
@ -97,16 +96,16 @@ public class FormParaWidgetPane extends JPanel{
JPanel paraPane = new JPanel(new FlowLayout()); JPanel paraPane = new JPanel(new FlowLayout());
ToolBarButton paraButton = new paraButton(FormWidgetOption.PARAMETERCONTAINER); ToolBarButton paraButton = new paraButton(FormWidgetOption.PARAMETERCONTAINER);
paraPane.add(paraButton); paraPane.add(paraButton);
add(createNormalCombinationPane(paraPane,Inter.getLocText("FR-Designer_Parameter"))); add(createNormalCombinationPane(paraPane, Inter.getLocText("FR-Designer_Parameter")));
jSeparatorPara = createJSeparator(); jSeparatorPara = createJSeparator();
add(jSeparatorPara); add(jSeparatorPara);
JPanel layoutPane = new JPanel(new FlowLayout()); JPanel layoutPane = new JPanel(new FlowLayout());
for(WidgetOption option : loadLayoutOptions()){ for (WidgetOption option : loadLayoutOptions()) {
layoutPane.add(new ToolBarButton(option)); layoutPane.add(new ToolBarButton(option));
} }
layoutPane.add(new ToolBarButton(FormWidgetOption.ELEMENTCASE)); layoutPane.add(new ToolBarButton(FormWidgetOption.ELEMENTCASE));
add(createNormalCombinationPane(layoutPane,Inter.getLocText("FR-Designer_Layout_Block_Blank"))); add(createNormalCombinationPane(layoutPane, Inter.getLocText("FR-Designer_Layout_Block_Blank")));
jSeparatorLayout = createJSeparator(); jSeparatorLayout = createJSeparator();
add(jSeparatorLayout); add(jSeparatorLayout);
@ -114,8 +113,8 @@ public class FormParaWidgetPane extends JPanel{
int totalChartNums = loadChartOptions().length; int totalChartNums = loadChartOptions().length;
if (totalChartNums > 0) { if (totalChartNums > 0) {
JPanel chartTypePane = new JPanel(new FlowLayout()); JPanel chartTypePane = new JPanel(new FlowLayout());
for (int i = 0;i < commonChartNum ;i++) { for (int i = 0; i < COMMON_CHAR_NUM; i++) {
chartTypePane.add( new ToolBarButton(loadChartOptions()[i])); chartTypePane.add(new ToolBarButton(loadChartOptions()[i]));
} }
add(createChartCombinationPane(chartTypePane, Inter.getLocText("FR-Designer-Form-ToolBar_Chart"))); add(createChartCombinationPane(chartTypePane, Inter.getLocText("FR-Designer-Form-ToolBar_Chart")));
jSeparatorChart = createJSeparator(); jSeparatorChart = createJSeparator();
@ -123,115 +122,113 @@ public class FormParaWidgetPane extends JPanel{
} }
JPanel widgetPane = new JPanel(new FlowLayout()); JPanel widgetPane = new JPanel(new FlowLayout());
for (int i = 0;i < commonWidgetNum;i++) { for (int i = 0; i < commonWidgetNum; i++) {
widgetPane.add(new ToolBarButton(loadWidgetOptions()[i])); widgetPane.add(new ToolBarButton(loadWidgetOptions()[i]));
} }
widgetPane.add(createJSeparator(20)); widgetPane.add(createJSeparator(20));
loadPredefinedWidget(); loadPredefinedWidget();
int num = Math.min(predifinedwidgeList.size(),preWidgetShowMaxNum); int num = Math.min(predifinedwidgeList.size(), preWidgetShowMaxNum);
for (int i = 0 ;i < num ;i++) { for (int i = 0; i < num; i++) {
widgetPane.add(new ToolBarButton(predifinedwidgeList.get(i))); widgetPane.add(new ToolBarButton(predifinedwidgeList.get(i)));
} }
add(createWidgetCombinationPane(widgetPane, Inter.getLocText("FR-Designer-Form-ToolBar_Widget"))); add(createWidgetCombinationPane(widgetPane, Inter.getLocText("FR-Designer-Form-ToolBar_Widget")));
add(createJSeparator()); add(createJSeparator());
} }
private void loadPredefinedWidget() { private void loadPredefinedWidget() {
predifinedwidgeList.clear(); predifinedwidgeList.clear();
if(designer != null) { if (designer != null) {
WidgetOption[] designerPre = designer.getDesignerMode().getPredefinedWidgetOptions(); WidgetOption[] designerPre = designer.getDesignerMode().getPredefinedWidgetOptions();
for(int i = 0; i < designerPre.length; i++) { for (int i = 0; i < designerPre.length; i++) {
predifinedwidgeList.add(designerPre[i]); predifinedwidgeList.add(designerPre[i]);
} }
} }
WidgetManagerProvider mgr = WidgetManager.getProviderInstance(); WidgetManagerProvider mgr = WidgetManager.getProviderInstance();
Iterator<String> nameIt = mgr.getWidgetConfigNameIterator(); Iterator<String> nameIt = mgr.getWidgetConfigNameIterator();
while (nameIt.hasNext()) { while (nameIt.hasNext()) {
String name = nameIt.next(); String name = nameIt.next();
WidgetConfig widgetConfig = mgr.getWidgetConfig(name); WidgetConfig widgetConfig = mgr.getWidgetConfig(name);
if (widgetConfig instanceof UserDefinedWidgetConfig) { if (widgetConfig instanceof UserDefinedWidgetConfig) {
Widget widget = ((UserDefinedWidgetConfig) widgetConfig).getWidget(); Widget widget = ((UserDefinedWidgetConfig) widgetConfig).getWidget();
String widgetClassName = widget.getClass().getName(); String widgetClassName = widget.getClass().getName();
if (isButtonWidget(widgetClassName)) { if (isButtonWidget(widgetClassName)) {
// ... // ...
continue; continue;
} }
if (!XCreatorUtils.createXCreator(widget).canEnterIntoParaPane()){ if (!XCreatorUtils.createXCreator(widget).canEnterIntoParaPane()) {
//预定义控件工具栏这儿不显示工具栏中没有的预定义控件 //预定义控件工具栏这儿不显示工具栏中没有的预定义控件
continue; continue;
} }
predifinedwidgeList.add(new UserDefinedWidgetOption(name)); predifinedwidgeList.add(new UserDefinedWidgetOption(name));
} }
} }
} }
private boolean isButtonWidget(String widgetClassName) { private boolean isButtonWidget(String widgetClassName) {
return widgetClassName.endsWith("DeleteRowButton") || widgetClassName.endsWith("AppendRowButton") || widgetClassName.endsWith("TreeNodeToogleButton"); return widgetClassName.endsWith("DeleteRowButton") || widgetClassName.endsWith("AppendRowButton") || widgetClassName.endsWith("TreeNodeToogleButton");
} }
private void setTarget(FormDesigner designer) { private void setTarget(FormDesigner designer) {
if (designer == null) { if (designer == null) {
return; return;
} }
initFormParaComponent(); initFormParaComponent();
} }
private JPanel createNormalCombinationPane(JComponent jComponent,String typeName){ private JPanel createNormalCombinationPane(JComponent jComponent, String typeName) {
JPanel reportPane = new JPanel(new BorderLayout(17,5)); JPanel reportPane = new JPanel(new BorderLayout(17, 5));
reportPane.add(jComponent,BorderLayout.CENTER); reportPane.add(jComponent, BorderLayout.CENTER);
JPanel labelPane = new JPanel(new BorderLayout()); JPanel labelPane = new JPanel(new BorderLayout());
UILabel label = new UILabel(typeName,UILabel.CENTER); UILabel label = new UILabel(typeName, UILabel.CENTER);
if(ComparatorUtils.equals(Inter.getLocText("FR-Designer_Parameter"),typeName )){ if (ComparatorUtils.equals(Inter.getLocText("FR-Designer_Parameter"), typeName)) {
paraLabel = label; paraLabel = label;
} }
labelPane.add(label,BorderLayout.CENTER); labelPane.add(label, BorderLayout.CENTER);
reportPane.add(labelPane,BorderLayout.SOUTH); reportPane.add(labelPane, BorderLayout.SOUTH);
reportPane.setPreferredSize(new Dimension((int)reportPane.getPreferredSize().getWidth(),(int)reportPane.getPreferredSize().getHeight())); reportPane.setPreferredSize(new Dimension((int) reportPane.getPreferredSize().getWidth(), (int) reportPane.getPreferredSize().getHeight()));
return reportPane; return reportPane;
} }
private JPanel createChartCombinationPane(JComponent jComponent,String typeName){ private JPanel createChartCombinationPane(JComponent jComponent, String typeName) {
JPanel chartPane = new JPanel(new BorderLayout(17,5)); JPanel chartPane = new JPanel(new BorderLayout(17, 5));
chartPane.add(jComponent, BorderLayout.CENTER); chartPane.add(jComponent, BorderLayout.CENTER);
JPanel labelPane = new JPanel(new BorderLayout()); JPanel labelPane = new JPanel(new BorderLayout());
labelPane.add(new UILabel(typeName,UILabel.CENTER),BorderLayout.CENTER); labelPane.add(new UILabel(typeName, UILabel.CENTER), BorderLayout.CENTER);
UIButton chartPopUpButton = createPopUpButton(); UIButton chartPopUpButton = createPopUpButton();
chartPopUpButton.addMouseListener(new MouseAdapter() { chartPopUpButton.addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if(chartTypeWindow == null) { JPanel componentsPara = new JPanel(new FlowLayout(FlowLayout.LEFT));
JPanel componentsPara = new JPanel(new FlowLayout(FlowLayout.LEFT)); WidgetOption[] chartOptions = loadChartOptions();
WidgetOption[] chartOptions = loadChartOptions(); for (WidgetOption chartOption : chartOptions) {
for (WidgetOption chartOption : chartOptions) { componentsPara.add(new ToolBarButton(chartOption));
componentsPara.add( new ToolBarButton(chartOption));
}
int x = commonChartNum * (widgetButtonWidth + smallGAP);
int y = (int)Math.ceil(chartOptions.length/((double)commonChartNum)) * (widgetButtonHeight + smallGAP);
componentsPara.setPreferredSize(new Dimension(x,y));
chartTypeWindow = new PopUpWindow(componentsPara, Inter.getLocText("FR-Designer-Form-ToolBar_Chart"));
chartTypeWindow.setLocation((int)jSeparatorLayout.getLocationOnScreen().getX() + 1, (int)jSeparatorLayout.getLocationOnScreen().getY());
chartTypeWindow.setSize(chartTypeWindow.getPreferredSize());
} }
int x = COMMON_CHAR_NUM * (widgetButtonWidth + smallGAP);
int y = (int) Math.ceil(chartOptions.length / ((double) COMMON_CHAR_NUM)) * (widgetButtonHeight + smallGAP);
componentsPara.setPreferredSize(new Dimension(x, y));
chartTypeWindow = new PopUpWindow(componentsPara, Inter.getLocText("FR-Designer-Form-ToolBar_Chart"));
chartTypeWindow.setLocation((int) jSeparatorLayout.getLocationOnScreen().getX() + 1, (int) jSeparatorLayout.getLocationOnScreen().getY());
chartTypeWindow.setSize(chartTypeWindow.getPreferredSize());
chartTypeWindow.setVisible(true); chartTypeWindow.setVisible(true);
} }
}); });
labelPane.add(chartPopUpButton,BorderLayout.EAST); labelPane.add(chartPopUpButton, BorderLayout.EAST);
chartPane.add(labelPane,BorderLayout.SOUTH); chartPane.add(labelPane, BorderLayout.SOUTH);
return chartPane; return chartPane;
} }
private JPanel createWidgetCombinationPane(JComponent jComponent,String typeName){ private JPanel createWidgetCombinationPane(JComponent jComponent, String typeName) {
JPanel widgetPane = new JPanel(new BorderLayout(17,5)); JPanel widgetPane = new JPanel(new BorderLayout(17, 5));
widgetPane.add(jComponent,BorderLayout.CENTER); widgetPane.add(jComponent, BorderLayout.CENTER);
JPanel labelPane = new JPanel(new BorderLayout()); JPanel labelPane = new JPanel(new BorderLayout());
labelPane.add(new UILabel(typeName,UILabel.CENTER),BorderLayout.CENTER); labelPane.add(new UILabel(typeName, UILabel.CENTER), BorderLayout.CENTER);
UIButton chartPopUpButton = createPopUpButton(); UIButton chartPopUpButton = createPopUpButton();
chartPopUpButton.addMouseListener(new MouseAdapter() { chartPopUpButton.addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
JPanel widgetPane = new JPanel(new FlowLayout(FlowLayout.LEFT,0,0)); JPanel widgetPane = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
loadPredefinedWidget(); loadPredefinedWidget();
int rowNum = calculateWidgetWindowRowNum(); int rowNum = calculateWidgetWindowRowNum();
JPanel westPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); JPanel westPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
@ -239,27 +236,27 @@ public class FormParaWidgetPane extends JPanel{
westPanel.add(new ToolBarButton(o)); westPanel.add(new ToolBarButton(o));
} }
int x = commonWidgetNum * (widgetButtonWidth + smallGAP); int x = commonWidgetNum * (widgetButtonWidth + smallGAP);
westPanel.setPreferredSize(new Dimension(x,(int)(rowNum * westPanel.getPreferredSize().getHeight()))); westPanel.setPreferredSize(new Dimension(x, (int) (rowNum * westPanel.getPreferredSize().getHeight())));
JPanel eastPane = new JPanel(new FlowLayout(FlowLayout.LEFT)); JPanel eastPane = new JPanel(new FlowLayout(FlowLayout.LEFT));
for (WidgetOption no : predifinedwidgeList) { for (WidgetOption no : predifinedwidgeList) {
eastPane.add(new ToolBarButton(no)); eastPane.add(new ToolBarButton(no));
} }
int maxWidth = preWidgetShowMaxNum * (widgetButtonWidth + smallGAP); int maxWidth = preWidgetShowMaxNum * (widgetButtonWidth + smallGAP);
int width = predifinedwidgeList.size() >= preWidgetShowMaxNum ? maxWidth:(int)eastPane.getPreferredSize().getWidth(); int width = predifinedwidgeList.size() >= preWidgetShowMaxNum ? maxWidth : (int) eastPane.getPreferredSize().getWidth();
eastPane.setPreferredSize(new Dimension(width,(int)(rowNum*eastPane.getPreferredSize().getHeight()))); eastPane.setPreferredSize(new Dimension(width, (int) (rowNum * eastPane.getPreferredSize().getHeight())));
UIScrollPane eastScrollPane = new UIScrollPane(eastPane); UIScrollPane eastScrollPane = new UIScrollPane(eastPane);
eastScrollPane.setBorder(null); eastScrollPane.setBorder(null);
int maxHeight = preWidgetShowMaxRow * (widgetButtonHeight + smallGAP); int maxHeight = preWidgetShowMaxRow * (widgetButtonHeight + smallGAP);
int height = predifinedwidgeList.size() >= preWidgetShowMaxNum * preWidgetShowMaxRow ? maxHeight : (int)eastPane.getPreferredSize().getHeight(); int height = predifinedwidgeList.size() >= preWidgetShowMaxNum * preWidgetShowMaxRow ? maxHeight : (int) eastPane.getPreferredSize().getHeight();
width = predifinedwidgeList.size() >= preWidgetShowMaxNum * preWidgetShowMaxRow ? (int)eastPane.getPreferredSize().getWidth() + smallGAP + jsparatorWidth : (int)eastPane.getPreferredSize().getWidth(); width = predifinedwidgeList.size() >= preWidgetShowMaxNum * preWidgetShowMaxRow ? (int) eastPane.getPreferredSize().getWidth() + smallGAP + jsparatorWidth : (int) eastPane.getPreferredSize().getWidth();
eastScrollPane.setPreferredSize(new Dimension(width,height)); eastScrollPane.setPreferredSize(new Dimension(width, height));
widgetPane.add(westPanel); widgetPane.add(westPanel);
widgetPane.add(createJSeparator(height)); widgetPane.add(createJSeparator(height));
widgetPane.add(eastScrollPane); widgetPane.add(eastScrollPane);
widgetTypeWindow = new PopUpWindow( widgetPane, Inter.getLocText("FR-Designer-Form-ToolBar_Widget")); widgetTypeWindow = new PopUpWindow(widgetPane, Inter.getLocText("FR-Designer-Form-ToolBar_Widget"));
widgetTypeWindow.setSize(widgetTypeWindow.getPreferredSize()); widgetTypeWindow.setSize(widgetTypeWindow.getPreferredSize());
if (jSeparatorChart != null) { if (jSeparatorChart != null) {
widgetTypeWindow.setLocation((int) jSeparatorChart.getLocationOnScreen().getX() + 1, (int) jSeparatorChart.getLocationOnScreen().getY()); widgetTypeWindow.setLocation((int) jSeparatorChart.getLocationOnScreen().getX() + 1, (int) jSeparatorChart.getLocationOnScreen().getY());
@ -268,59 +265,60 @@ public class FormParaWidgetPane extends JPanel{
} }
}); });
labelPane.add(chartPopUpButton,BorderLayout.EAST); labelPane.add(chartPopUpButton, BorderLayout.EAST);
widgetPane.add(labelPane,BorderLayout.SOUTH); widgetPane.add(labelPane, BorderLayout.SOUTH);
return widgetPane; return widgetPane;
} }
private int calculateWidgetWindowRowNum(){ private int calculateWidgetWindowRowNum() {
//向上取整 //向上取整
int rowNum = (int)Math.ceil((double)predifinedwidgeList.size()/(double)preWidgetShowMaxNum); int rowNum = (int) Math.ceil((double) predifinedwidgeList.size() / (double) preWidgetShowMaxNum);
rowNum = Math.max(rowNum,2); rowNum = Math.max(rowNum, 2);
rowNum = Math.min(rowNum,preWidgetShowMaxRow); rowNum = Math.min(rowNum, preWidgetShowMaxRow);
return rowNum; return rowNum;
} }
private JSeparator createJSeparator(){ private JSeparator createJSeparator() {
JSeparator jSeparator = new JSeparator(SwingConstants.VERTICAL ); JSeparator jSeparator = new JSeparator(SwingConstants.VERTICAL);
jSeparator.setPreferredSize(new Dimension(jsparatorWidth,jsparatorHeight)); jSeparator.setPreferredSize(new Dimension(jsparatorWidth, jsparatorHeight));
return jSeparator; return jSeparator;
} }
private JSeparator createJSeparator(double height){ private JSeparator createJSeparator(double height) {
JSeparator jSeparator = new JSeparator(SwingConstants.VERTICAL ); JSeparator jSeparator = new JSeparator(SwingConstants.VERTICAL);
jSeparator.setPreferredSize(new Dimension(jsparatorWidth,(int)height)); jSeparator.setPreferredSize(new Dimension(jsparatorWidth, (int) height));
return jSeparator; return jSeparator;
} }
private UIButton createPopUpButton(){ private UIButton createPopUpButton() {
UIButton popUpButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/buttonicon/arrowdown.png")); UIButton popUpButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/buttonicon/arrowdown.png"));
popUpButton.set4ToolbarButton(); popUpButton.set4ToolbarButton();
return popUpButton; return popUpButton;
} }
private UIButton createPopDownButton(){ private UIButton createPopDownButton() {
UIButton popUpButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/buttonicon/arrowup.png")); UIButton popUpButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/buttonicon/arrowup.png"));
popUpButton.set4ToolbarButton(); popUpButton.set4ToolbarButton();
return popUpButton; return popUpButton;
} }
private class paraButton extends ToolBarButton{ private class paraButton extends ToolBarButton {
public paraButton(WidgetOption no){ public paraButton(WidgetOption no) {
super(no); super(no);
this.setDisabledIcon(BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_parameter2.png")); this.setDisabledIcon(BaseUtils.readIcon("/com/fr/web/images/form/resources/layout_parameter2.png"));
if(designer != null){ if (designer != null) {
this.setEnabled(designer.getParaComponent() == null); this.setEnabled(designer.getParaComponent() == null);
} }
} }
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
if (designer.getParaComponent() != null){ if (designer.getParaComponent() != null) {
return; return;
} }
designer.addParaComponent(); designer.addParaComponent();
JPanel pane =FormWidgetDetailPane.getInstance(designer); JPanel pane = FormWidgetDetailPane.getInstance(designer);
EastRegionContainerPane.getInstance().replaceDownPane(pane); EastRegionContainerPane.getInstance().replaceDownPane(pane);
this.setEnabled(false); this.setEnabled(false);
@ -334,7 +332,7 @@ public class FormParaWidgetPane extends JPanel{
public void setEnabled(boolean b) { public void setEnabled(boolean b) {
super.setEnabled(b); super.setEnabled(b);
paraLabel.setForeground(b ? Color.BLACK : new Color(198,198,198)); paraLabel.setForeground(b ? Color.BLACK : new Color(198, 198, 198));
} }
} }
@ -347,8 +345,9 @@ public class FormParaWidgetPane extends JPanel{
} }
/** /**
* 响应界面改变事件 * 响应界面改变事件
* @param evt 事件 *
* @param evt 事件
*/ */
public void fireCreatorModified(DesignerEvent evt) { public void fireCreatorModified(DesignerEvent evt) {
button.setEnabled(designer.getParaComponent() == null); button.setEnabled(designer.getParaComponent() == null);
@ -356,14 +355,13 @@ public class FormParaWidgetPane extends JPanel{
} }
private class PopUpWindow extends JWindow { private class PopUpWindow extends JWindow {
private JPanel northPane; private JPanel northPane;
private String typeName; private String typeName;
private int LineWidth = 5; private int LineWidth = 5;
private int BarWidth = 10; private int BarWidth = 10;
public PopUpWindow(JPanel northPane,String typeName){ public PopUpWindow(JPanel northPane, String typeName) {
super(); super();
this.northPane = northPane; this.northPane = northPane;
this.typeName = typeName; this.typeName = typeName;
@ -376,17 +374,14 @@ public class FormParaWidgetPane extends JPanel{
public void eventDispatched(AWTEvent event) { public void eventDispatched(AWTEvent event) {
if (event instanceof MouseEvent) { if (event instanceof MouseEvent) {
MouseEvent mv = (MouseEvent) event; MouseEvent mv = (MouseEvent) event;
Point point = mv.getLocationOnScreen(); if (mv.getClickCount() > 0) {
double endX = PopUpWindow.this.getX() + northPane.getWidth() + LineWidth; Point point = new Point((int) (mv.getLocationOnScreen().getX()), (int) mv.getLocationOnScreen().getY());
double startX = endX - BarWidth; // 直接contains在mac下,点击内部也会消失
double startY = PopUpWindow.this.getY() + northPane.getY(); Dimension d = PopUpWindow.this.getSize();
double endY = startY + northPane.getHeight(); Point p = PopUpWindow.this.getLocation();
boolean dragBar = startX < point.getX() && endX > point.getX() && endY > point.getY(); Rectangle rect = new Rectangle(p, d);
if (!dragBar && mv.getClickCount() > 0 && mv.getID() != MouseEvent.MOUSE_RELEASED) { if (!rect.contains(point)) {
if(!ComparatorUtils.equals(mv.getSource(), PopUpWindow.this)) { PopUpWindow.this.setVisible(false);
if (!OperatingSystem.isMacOS()) {
PopUpWindow.this.setVisible(false);
}
} }
} }
} }
@ -398,9 +393,9 @@ public class FormParaWidgetPane extends JPanel{
JPanel rootPane = new EditorChoosePane(); JPanel rootPane = new EditorChoosePane();
JPanel contentPane = new JPanel(); JPanel contentPane = new JPanel();
contentPane.setLayout(new BorderLayout(17, 0)); contentPane.setLayout(new BorderLayout(17, 0));
contentPane.add(northPane,BorderLayout.CENTER); contentPane.add(northPane, BorderLayout.CENTER);
JPanel labelPane = new JPanel(new BorderLayout()); JPanel labelPane = new JPanel(new BorderLayout());
labelPane.add(new UILabel(typeName,UILabel.CENTER),BorderLayout.CENTER); labelPane.add(new UILabel(typeName, UILabel.CENTER), BorderLayout.CENTER);
JButton popUpButton = createPopDownButton(); JButton popUpButton = createPopDownButton();
popUpButton.addMouseListener(new MouseAdapter() { popUpButton.addMouseListener(new MouseAdapter() {
@Override @Override
@ -409,8 +404,8 @@ public class FormParaWidgetPane extends JPanel{
} }
}); });
labelPane.add(popUpButton, BorderLayout.EAST); labelPane.add(popUpButton, BorderLayout.EAST);
contentPane.add(labelPane,BorderLayout.SOUTH); contentPane.add(labelPane, BorderLayout.SOUTH);
rootPane.add(contentPane,BorderLayout.CENTER); rootPane.add(contentPane, BorderLayout.CENTER);
return rootPane; return rootPane;
} }
@ -421,31 +416,31 @@ public class FormParaWidgetPane extends JPanel{
private class EditorChoosePane extends JPanel { private class EditorChoosePane extends JPanel {
public EditorChoosePane() { public EditorChoosePane() {
super(); super();
((FlowLayout)this.getLayout()).setVgap(1); ((FlowLayout) this.getLayout()).setVgap(1);
} }
@Override @Override
public void paintComponent(Graphics g) { public void paintComponent(Graphics g) {
Rectangle r = this.getBounds(); Rectangle r = this.getBounds();
g.setColor(UIConstants.NORMAL_BACKGROUND); g.setColor(UIConstants.NORMAL_BACKGROUND);
g.fillRoundRect(r.x, r.y, r.width, r.height,0,0); g.fillRoundRect(r.x, r.y, r.width, r.height, 0, 0);
g.setColor(UIConstants.LINE_COLOR); g.setColor(UIConstants.LINE_COLOR);
g.drawLine(r.x, r.y, r.x, r.y+r.height); g.drawLine(r.x, r.y, r.x, r.y + r.height);
g.drawLine(r.x, r.y+r.height-1, r.x+r.width-1, r.y+r.height-1); g.drawLine(r.x, r.y + r.height - 1, r.x + r.width - 1, r.y + r.height - 1);
g.drawLine(r.x+r.width-1, r.y, r.x+r.width-1, r.y+r.height-1); g.drawLine(r.x + r.width - 1, r.y, r.x + r.width - 1, r.y + r.height - 1);
} }
} }
private WidgetOption[] loadWidgetOptions() { private WidgetOption[] loadWidgetOptions() {
if (widgetOptions == null) { if (widgetOptions == null) {
widgetOptions = (WidgetOption[])ArrayUtils.addAll(WidgetOption.getFormWidgetIntance(), ExtraDesignClassManager.getInstance().getFormWidgetOptions()); widgetOptions = (WidgetOption[]) ArrayUtils.addAll(WidgetOption.getFormWidgetIntance(), ExtraDesignClassManager.getInstance().getFormWidgetOptions());
} }
return widgetOptions; return widgetOptions;
} }
private WidgetOption[] loadLayoutOptions() { private WidgetOption[] loadLayoutOptions() {
if (layoutOptions == null) { if (layoutOptions == null) {
layoutOptions = (WidgetOption[])ArrayUtils.addAll(FormWidgetOption.getFormLayoutInstance(), ExtraDesignClassManager.getInstance().getFormWidgetContainerOptions()); layoutOptions = (WidgetOption[]) ArrayUtils.addAll(FormWidgetOption.getFormLayoutInstance(), ExtraDesignClassManager.getInstance().getFormWidgetContainerOptions());
} }
return layoutOptions; return layoutOptions;
} }

267
designer_form/src/com/fr/design/mainframe/MobileBodyWidgetTable.java

@ -1,267 +0,0 @@
package com.fr.design.mainframe;
import java.awt.Color;
import java.awt.Component;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.JTableHeader;
import javax.swing.table.TableModel;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itable.HeaderRenderer;
import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WFitLayout;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
/**
* Created with IntelliJ IDEA.
* User: zx
* Date: 14-9-15
* Time: 下午4:52
*/
public class MobileBodyWidgetTable extends JTable {
private FormDesigner designer;
protected TableModel defaultmodel;
private String[][] cellData;
private String[] headers = {Inter.getLocText("Form-Widget_Name")};
public static final int WIDGET_TABLE_ROW_HEIGHT = 22;
private UILabel moveComponent = new UILabel();
private int selectedRow = -1;
private int GAP = 10;
private boolean draging = false;
public MobileBodyWidgetTable(FormDesigner designer) {
this.designer = designer;
cellData = getData();
this.setRowHeight(WIDGET_TABLE_ROW_HEIGHT);
JTableHeader header = getTableHeader();
header.setReorderingAllowed(false);
header.setPreferredSize(new Dimension(0, WIDGET_TABLE_ROW_HEIGHT));
HeaderRenderer headerRenderer = new HeaderRenderer();
headerRenderer.setHorizontalAlignment(JLabel.CENTER);
header.setDefaultRenderer(headerRenderer);
this.setGridColor(new Color(212, 208, 200));
this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
this.setColumnSelectionAllowed(false);
this.setRowSelectionAllowed(false);
this.setFillsViewportHeight(true);
defaultmodel = new BeanTableModel();
this.setModel(defaultmodel);
this.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
this.repaint();
this.setDefaultRenderer(Object.class,new MobileWidgetTableCellRenderer());
refresh();
this.addMouseListener(mouseAdapter);
this.addMouseMotionListener(mouseAdapter);
add(moveComponent);
}
private MouseAdapter mouseAdapter = new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if(getSelectedRow() != -1){
String widgetName = cellData[getSelectedRow()][0];
if (StringUtils.isNotEmpty(widgetName)){
XLayoutContainer root = getEditingDesigner().getRootComponent();
int count = root.getXCreatorCount();
for (int i = 0;i < count ;i++){
XCreator xCreator = root.getXCreator(i).getEditingChildCreator();
Widget widget = xCreator.toData();
if (ComparatorUtils.equals(widgetName, widget.getWidgetName())) {
getEditingDesigner().getSelectionModel().setSelectedCreator(xCreator);
setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
selectedRow = getSelectedRow();
}
}
}
}
}
public void mouseExited(MouseEvent e) {
draging = false;
moveComponent.setVisible(false);
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
@Override
public void mouseMoved(MouseEvent e) {
int overRow = 0;
for (int i = 0;i < getRowCount();i++) {
if (e.getY() > i * WIDGET_TABLE_ROW_HEIGHT && e.getY() <= (i + 1) * WIDGET_TABLE_ROW_HEIGHT){
overRow = i;
}
}
if (overRow == getSelectedRow()) {
setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
} else {
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
}
@Override
public void mouseDragged(MouseEvent e) {
int width = getColumnModel().getColumn(0).getWidth();
if (getCursor().getType() == Cursor.MOVE_CURSOR){
draging = true;
//下面这句话太重要了,拖拽过程中选中的不变
getInstance().setRowSelectionInterval(selectedRow,selectedRow);
moveComponent.setText(getValueAt(getSelectedRow(), getSelectedColumn()).toString());
moveComponent.setLocation(0, e.getY() - GAP);
moveComponent.setPreferredSize(new Dimension(width, WIDGET_TABLE_ROW_HEIGHT));
moveComponent.setSize(new Dimension(width, WIDGET_TABLE_ROW_HEIGHT));
moveComponent.setVisible(true);
moveComponent.setForeground(Color.lightGray);
moveComponent.setBorder(BorderFactory.createLineBorder(Color.lightGray));
}
}
@Override
public void mouseReleased(MouseEvent e) {
if(!draging){
return;
}
draging = false;
moveComponent.setVisible(false);
int toIndex = e.getY() < GAP ? 0 : (int)Math.rint((e.getY() - GAP)/WIDGET_TABLE_ROW_HEIGHT) + 1;
((WFitLayout) designer.getRootComponent().toData()).adjustOrder(getSelectedRow(), toIndex);
getInstance().setRowSelectionInterval(0,getRowCount() - 1);
refresh();
getInstance().repaint();
designer.fireTargetModified();
}
};
public MobileBodyWidgetTable getInstance(){
return this;
}
public FormDesigner getEditingDesigner(){
return designer;
}
/**
* 刷新
*/
public void refresh(){
XCreator creator = designer.getSelectionModel().getSelection().getSelectedCreator();
cellData = getData();
if(creator != null){
String widgetName =creator.toData().getWidgetName();
int row = -1;
for (int i =0; i < cellData.length;i++){
if(ComparatorUtils.equals(widgetName, cellData[i][0])){
row = i;
break;
}
}
selectedRow = row;
changeSelection(row,0,false,false);
if(row == -1){
this.clearSelection();
}
}
}
private String[][] getData(){
if(designer.isFormParaDesigner()){
return new String[0][0];
}
XLayoutContainer paraContainer = designer.getRootComponent();
if(paraContainer == null || !paraContainer.acceptType(WFitLayout.class)){
return new String[0][0];
}
WFitLayout fitLayout = (WFitLayout) (paraContainer.toData());
ArrayList<String> strings = fitLayout.getMobileWidgetList();
String[][] widgetName = new String[strings.size()][2];
for(int i = 0;i < strings.size();i++){
widgetName[i][0] = strings.get(i);
}
return widgetName;
}
private class MobileWidgetTableCellRenderer extends DefaultTableCellRenderer {
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
boolean hasFocus, int row, int column) {
if (getCursor().getType() == Cursor.MOVE_CURSOR){
if(selectedRow > -1 && selectedRow < getRowCount()){
//拖拽过程中选中的不变
getInstance().setRowSelectionInterval(selectedRow,selectedRow);
}
}
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
return this;
}
}
public class BeanTableModel extends DefaultTableModel {
public BeanTableModel() {
super(cellData,headers);
}
@Override
public int getRowCount() {
return cellData.length;
}
@Override
public int getColumnCount() {
return 1;
}
@Override
public Object getValueAt(int row, int column) {
if (row >= getRowCount() || column >= getColumnCount()) {
return null;
}
return cellData[row][0];
}
@Override
public String getColumnName(int column) {
return headers[0];
}
@Override
public void setValueAt(Object aValue, int row, int column) {
if (row >= getRowCount() || column >= getColumnCount()) {
return;
}
if (aValue == null) {
cellData[row] = null;
return;
}
cellData[row][0] = aValue.toString();
}
/**
* 是否可编辑
* @param row 行号
* @param column 列号
* @return 是否可编辑
*/
public boolean isCellEditable(int row, int column) {
return false;
}
}
}

428
designer_form/src/com/fr/design/mainframe/MobileParaWidgetTable.java

@ -0,0 +1,428 @@
package com.fr.design.mainframe;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Component;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.geom.RoundRectangle2D;
import java.util.EventObject;
import javax.swing.AbstractCellEditor;
import javax.swing.BorderFactory;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.JTableHeader;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableColumn;
import javax.swing.table.TableModel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itable.GroupRenderer;
import com.fr.design.gui.itable.HeaderRenderer;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.form.ui.Label;
import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WParameterLayout;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
/**
* MobileParaWidgetTable主要显示参数面板容器的控件列表与MobileWidgetTable的区别就是该表多了UITextField这一列
* Created with IntelliJ IDEA.
* User: zx
* Date: 14-7-9
* Time: 上午11:26
* Modified by fanglei during 2017/1/22 - 2017/2/
*/
class MobileParaWidgetTable extends JTable {
private FormDesigner designer;
private String[][] cellData ;
private String[] headers = {Inter.getLocText("FR-Utils_Label"), Inter.getLocText("Form-Widget_Name")};
private static final int WIDGET_TABLE_ROW_HEIGHT = 22;
private static final int UITEXTFIELD_WIDTH = 40;
private UILabel moveComponent = new UILabel(); // 作为拖动时候随鼠标移动的那个半透明控件
private int selectedRow = -1;
private int selectedColumn = -1;
private int GAP = 11;
private boolean draging = false;
MobileParaWidgetTable(FormDesigner designer) {
this.designer = designer;
this.cellData = getData();
this.setTableProperties();
this.setDefaultEditor(Object.class, new MobileCellEditor());
TableModel defaultModel = new BeanTableModel();
this.setModel(defaultModel);
this.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
TableColumn tc = this.getColumn(this.getColumnName(0));
tc.setPreferredWidth(UITEXTFIELD_WIDTH);
this.repaint();
this.setDefaultRenderer(Object.class,new MobileWidgetTableCellRenderer());
refreshData();
this.addMouseListener(mouseAdapter);
this.addMouseMotionListener(mouseAdapter);
add(moveComponent);
}
private void setTableProperties() {
JTableHeader header = getTableHeader();
header.setReorderingAllowed(false);
header.setPreferredSize(new Dimension(0, WIDGET_TABLE_ROW_HEIGHT));
header.setDefaultRenderer(new HeaderRenderer());
this.setRowHeight(WIDGET_TABLE_ROW_HEIGHT);
this.setGridColor(new Color(212, 208, 200));
this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
this.setColumnSelectionAllowed(false);
this.setRowSelectionAllowed(false);
this.setFillsViewportHeight(true);
}
private MouseAdapter mouseAdapter = new MouseAdapter() {
/**
* 鼠标按下时处理的事件设置当前选中的行列
* @param e
*/
@Override
public void mousePressed(MouseEvent e) {
getInstance().setCellSelected();
}
/**
* 鼠标放开时处理的事件如果是正在拖动则执行换位操作重新绘制属性表如果不是则什么也不做
* @param e
*/
@Override
public void mouseReleased(MouseEvent e) {
if(!draging){
return;
}
draging = false;
moveComponent.setVisible(false);
int toIndex = e.getY() < GAP ? 0 : (int)Math.rint((e.getY() - GAP)/WIDGET_TABLE_ROW_HEIGHT) + 1;
//当鼠标放开时,将选中的容器调整至新的顺序
((WParameterLayout) designer.getParaComponent().toData()).adjustOrder(selectedRow, toIndex);
//拿取排序后表格数据,然后重绘表格
getInstance().refreshData();
getInstance().repaint();
designer.fireTargetModified();
getInstance().setCellSelected();
}
/**
* 设置鼠标在属性表区域移动时候的事件
* @param e
*/
@Override
public void mouseMoved(MouseEvent e) {
int overColumn = e.getX() < getColumnModel().getColumn(0).getWidth() ? 0 : 1; // 判断当前鼠标在哪一列
int overRow = -1;
for (int i = 0;i < getRowCount();i++) {
if (e.getY() > i * WIDGET_TABLE_ROW_HEIGHT && e.getY() <= (i + 1) * WIDGET_TABLE_ROW_HEIGHT) {
overRow = i; //判断当前鼠标在哪一行
}
}
//如果鼠标移动到当前选中的行列上面的时候,并且不能在第一列
if (overRow == selectedRow && overColumn == selectedColumn && overColumn !=0) {
//把当前选中的那一列行的光标改成(除了第一列)移动样式MOVE_CURSOR
setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
} else {
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
}
/**
* 鼠标拖动事件如果鼠标当前是<code>MOVE_CURSOR</code>状态则执行开始拖动的代码
* 绘制一个<code>moveComponent</code>来跟随鼠标移动
* @param e
*/
@Override
public void mouseDragged(MouseEvent e) {
int width = getColumnModel().getColumn(1).getWidth();
//如果点击选中的是第二列,就可以拖动
if (selectedColumn == 1){
setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
draging = true;
moveComponent.setText(getValueAt(selectedRow, selectedColumn).toString());
moveComponent.setLocation(getColumnModel().getColumn(0).getWidth(), e.getY() - GAP);
moveComponent.setSize(new Dimension(width, WIDGET_TABLE_ROW_HEIGHT));
moveComponent.setVisible(true);
moveComponent.setForeground(Color.lightGray);
moveComponent.setBorder(BorderFactory.createLineBorder(Color.lightGray));
}
}
/**
* 设置鼠标单击时处理的事件单击第二列的控件列表进入控件属性表
* @param e
*/
@Override
public void mouseClicked(MouseEvent e) {
if(getSelectedRow() != -1 && getSelectedColumn() == 1){
String widgetName = cellData[getSelectedRow()][getSelectedColumn()];
if (StringUtils.isNotEmpty(widgetName)){
int count = getEditingDesigner().getParaComponent().getComponentCount();
for (int i = 0; i < count; i++){
XCreator xCreator = (XCreator)getEditingDesigner().getParaComponent().getComponent(i);
Widget widget = xCreator.toData();
if (!widget.acceptType(Label.class) && ComparatorUtils.equals(widgetName,widget.getWidgetName())) {
//设置选中的component,这句代码控制点击之后跳转到相应component属性表
getEditingDesigner().getSelectionModel().setSelectedCreator(xCreator);
}
}
}
}
}
/**
* 鼠标离开属性表区域事件
* @param e
*/
@Override
public void mouseExited(MouseEvent e) {
draging = false;
moveComponent.setVisible(false);
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
};
public MobileParaWidgetTable getInstance(){
return this;
}
private FormDesigner getEditingDesigner(){
return designer;
}
/**
* 设置当前get到的行列的单元格为选中状态
*/
private void setCellSelected() {
selectedRow = getSelectedRow();
selectedColumn = getSelectedColumn();
if (selectedRow != -1) {
this.setRowSelectionInterval(selectedRow, selectedRow);
}
if (selectedColumn != -1) {
this.setColumnSelectionInterval(selectedColumn, selectedColumn);
}
}
/**
* 重新get排序后的数据
*/
public void refreshData(){
cellData = getData();
}
/**
* 获取参数面板的控件列表
*
* @return String[][] 二维数组[0][0]widgetTag, [0][1]widgetName
*/
private String[][] getData(){
XLayoutContainer paraContainer = designer.getParaComponent();
if(paraContainer == null || !paraContainer.acceptType(XWParameterLayout.class)){
return new String[0][0];
}
WParameterLayout para = (WParameterLayout) (paraContainer.toData());
return para.getWidgetNameTag();
}
/**
* 自定义的tableRender类
*/
private class MobileWidgetTableCellRenderer extends DefaultTableCellRenderer{
@Override
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
boolean hasFocus, int row, int column) {
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
if (column == 0){
UITextField uiTableTextField;
if (getSelectedColumn() == column && getSelectedRow() == row){
uiTableTextField = new UITableTextField(value.toString());
} else {
uiTableTextField = new UITextField(value.toString());
}
return uiTableTextField;
}
return this;
}
}
/**
* 自定义的tableEditor类
*/
private class MobileCellEditor extends AbstractCellEditor implements TableCellEditor {
UITableTextField uiTableTextField;
MobileCellEditor(){
uiTableTextField = new UITableTextField();
uiTableTextField.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent evt) {
stopCellEditing();
designer.fireTargetModified();
}
});
uiTableTextField.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent e) {
firePropertyChange();
}
@Override
public void removeUpdate(DocumentEvent e) {
firePropertyChange();
}
@Override
public void changedUpdate(DocumentEvent e) {
firePropertyChange();
}
});
}
/**
* cell改变相应的nametag改变
*/
private void firePropertyChange(){
((WParameterLayout) designer.getParaComponent().toData()).add2NameTagMap(uiTableTextField.getText(),
cellData[getSelectedRow()][1]);
}
@Override
public Object getCellEditorValue(){
return uiTableTextField.getText();
}
/**
* 双击以编辑, 表示只有双击的情况下才可以编辑
*/
@Override
public boolean isCellEditable(EventObject anEvent) {
return !(anEvent instanceof MouseEvent) || ((MouseEvent) anEvent).getClickCount() >= 2;
}
@Override
public Component getTableCellEditorComponent( JTable table,Object value,
boolean isSelected,int row,int column){
uiTableTextField.setText(value.toString());
return uiTableTextField;
}
}
/**
* BeanTableModel类继承DefaultTableModel类指定了表格的表头和内容
*/
private class BeanTableModel extends DefaultTableModel {
BeanTableModel() {
super(cellData, headers);
}
@Override
public int getRowCount() {
return cellData.length;
}
@Override
public int getColumnCount() {
return headers.length;
}
@Override
public Object getValueAt(int row, int column) {
if (row >= getRowCount() || column >= getColumnCount()) {
return null;
}
Object[] rowValue = cellData[row];
if (column > -1 && column < rowValue.length) {
return cellData[row][column];
}
return null;
}
@Override
public String getColumnName(int column) {
if (column == 0) {
return headers[0];
} else {
return headers[1];
}
}
@Override
public void setValueAt(Object aValue, int row, int column) {
if (row >= getRowCount() || column >= getColumnCount()) {
return;
}
if (aValue == null) {
cellData[row][column] = null;
return;
}
cellData[row][column] = aValue.toString();
}
/**
* 是否可编辑 控件标签列可以编辑控件名不可编辑
* @param row 行号
* @param column 列号
* @return 是否可编辑
*/
public boolean isCellEditable(int row, int column) {
if(column ==1){
return false;
}
return true;
}
}
/**
* 继承自JTextField类重写了编辑框的样式
*/
private class UITableTextField extends UITextField {
public UITableTextField(){
super();
}
public UITableTextField(String string){
super(string);
}
protected void paintBorder(Graphics g) {
Graphics2D g2d = (Graphics2D) g;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
if (this.isFocusOwner()) {
g2d.setStroke(new BasicStroke(1.5f));
} else {
g2d.setStroke(new BasicStroke(1f));
}
RoundRectangle2D.Double rect = new RoundRectangle2D.Double(0, 0, this.getWidth() - 2, this.getHeight() - 2, 4, 4);
g2d.setColor(Color.orange);
g2d.draw(rect);
}
}
}

449
designer_form/src/com/fr/design/mainframe/MobileWidgetTable.java

@ -1,167 +1,202 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import java.awt.*;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Component;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.geom.RoundRectangle2D; import java.util.List;
import java.util.EventObject;
import javax.swing.AbstractCellEditor;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JTable; import javax.swing.JTable;
import javax.swing.ListSelectionModel; import javax.swing.ListSelectionModel;
import javax.swing.event.DocumentEvent; import javax.swing.table.*;
import javax.swing.event.DocumentListener;
import javax.swing.table.DefaultTableCellRenderer;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.JTableHeader;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableColumn;
import javax.swing.table.TableModel;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itable.HeaderRenderer;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.gui.itable.GroupRenderer;
import com.fr.form.ui.Label;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WParameterLayout; import com.fr.form.ui.container.*;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
/** /**
* MobileWidgetTable类主要显示各种容器的控件列表bodytab绝对布局快不包括参数面板
* Created with IntelliJ IDEA. * Created with IntelliJ IDEA.
* User: zx * User: zx
* Date: 14-7-9 * Date: 14-9-15
* Time: 上午11:26 * Time: 下午4:52
* Modified by fanglei at 2017/01/23
*/ */
public class MobileWidgetTable extends JTable { public class MobileWidgetTable extends JTable {
private FormDesigner designer; private FormDesigner designer;
protected TableModel defaultmodel; private String[][] cellData;
private String[][] cellData ; private String[] headers = {Inter.getLocText("Form-Widget_Name")};
private String[] headers = {Inter.getLocText("FR-Utils_Label"),Inter.getLocText("Form-Widget_Name")}; private static final int WIDGET_TABLE_ROW_HEIGHT = 22;
public static final int WIDGET_TABLE_ROW_HEIGHT = 22; private UILabel moveComponent = new UILabel(); // 作为拖动时候随鼠标移动的那个半透明控件
private UILabel moveComponent = new UILabel();
private int selectedRow = -1; private int selectedRow = -1;
private int GAP = 10; private int GAP = 11;
private boolean draging = false; private boolean draging = false;
private boolean collapsed = false; // 控件列表是否折叠
@Override
public TableCellRenderer getCellRenderer(int row, int column) {
//第一行渲染成为标题的样子
if (row == 0) {
return new GroupRenderer();
}
return super.getCellRenderer(row, column);
}
public MobileWidgetTable(FormDesigner designer) { public MobileWidgetTable(FormDesigner designer) {
this.designer = designer; this.designer = designer;
this.cellData = getData(); cellData = getData();
this.setRowHeight(WIDGET_TABLE_ROW_HEIGHT); this.setTableProperties();
TableModel defaultModel = new BeanTableModel();
this.setModel(defaultModel);
this.repaint();
this.setDefaultRenderer(Object.class,new DefaultTableCellRenderer());
refreshData();
this.addMouseListener(mouseAdapter);
this.addMouseMotionListener(mouseAdapter);
add(moveComponent);
}
private void setTableProperties() {
JTableHeader header = getTableHeader(); JTableHeader header = getTableHeader();
header.setReorderingAllowed(false); header.setReorderingAllowed(false);
header.setPreferredSize(new Dimension(0, WIDGET_TABLE_ROW_HEIGHT)); header.setPreferredSize(new Dimension(0, 0)); // 隐藏表头
header.setDefaultRenderer(new HeaderRenderer()); GroupRenderer headerRenderer = new GroupRenderer();
headerRenderer.setPreferredSize(new Dimension(0, 0)); //这行代码隐藏表头。因为要实现折叠效果,表头不好监听事件
headerRenderer.setHorizontalAlignment(JLabel.LEFT);
header.setDefaultRenderer(headerRenderer);
this.setRowHeight(WIDGET_TABLE_ROW_HEIGHT);
this.setGridColor(new Color(212, 208, 200)); this.setGridColor(new Color(212, 208, 200));
this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); this.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
this.setColumnSelectionAllowed(false); this.setColumnSelectionAllowed(false);
this.setRowSelectionAllowed(false); this.setRowSelectionAllowed(false);
this.setFillsViewportHeight(true); this.setFillsViewportHeight(false);
this.setDefaultEditor(Object.class,new MobileCellEditor());
defaultmodel = new BeanTableModel();
this.setModel(defaultmodel);
this.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); this.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
TableColumn tc = this.getColumn(this.getColumnName(0));
tc.setPreferredWidth(30);
this.repaint();
this.setDefaultRenderer(Object.class,new MobileWidgetTableCellRenderer());
refresh();
this.addMouseListener(mouseAdapter);
this.addMouseMotionListener(mouseAdapter);
add(moveComponent);
} }
private MouseAdapter mouseAdapter = new MouseAdapter() { private MouseAdapter mouseAdapter = new MouseAdapter() {
/**
* 鼠标按下时处理的事件设置当前选中的行列
* @param e
*/
@Override @Override
public void mouseClicked(MouseEvent e) { public void mousePressed(MouseEvent e) {
if(getSelectedRow() != -1 && getSelectedColumn() == 1){ getInstance().setCellSelected();
String widgetName = cellData[getSelectedRow()][getSelectedColumn()]; if (selectedRow == 0 && !e.isPopupTrigger() && e.getClickCount() == 1 && e.getX() < WIDGET_TABLE_ROW_HEIGHT / 2){ // 如果是点击在第一行
if (StringUtils.isNotEmpty(widgetName)){ toggleCollapse();
int count = getEditingDesigner().getParaComponent().getComponentCount(); }
for (int i = 0;i < count ;i++){ }
XCreator xCreator = (XCreator)getEditingDesigner().getParaComponent().getComponent(i);
Widget widget = xCreator.toData(); /**
if (!widget.acceptType(Label.class) && ComparatorUtils.equals(widgetName,widget.getWidgetName())) { * 鼠标放开时处理的事件如果是正在拖动则执行换位操作重新绘制属性表如果不是则什么也不做
getEditingDesigner().getSelectionModel().setSelectedCreator(xCreator); * 所谓的换行就是简单的重新拿到一次表格数据然后重新绘制表格
setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); * @param e
selectedRow = getSelectedRow(); */
} @Override
} public void mouseReleased(MouseEvent e) {
} if(!draging){
} return;
} }
public void mouseExited(MouseEvent e) {
draging = false; draging = false;
moveComponent.setVisible(false); moveComponent.setVisible(false);
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); int toIndex = e.getY() < GAP ? 0 : (int)Math.rint((e.getY() - GAP)/WIDGET_TABLE_ROW_HEIGHT) + 1;
//当鼠标放开时,将选中的容器调整至新的顺序
((WSortLayout)designer.getSelectionModel().getSelection().getSelectedCreator().toData()).adjustOrder(selectedRow - 1, toIndex - 1);
//拿取排序后表格数据,然后重绘表格
getInstance().refreshData();
getInstance().repaint();
designer.fireTargetModified();
getInstance().setCellSelected();
} }
/**
* 设置鼠标在属性表区域移动时候的事件
* @param e
*/
@Override @Override
public void mouseMoved(MouseEvent e) { public void mouseMoved(MouseEvent e) {
int overColumn = e.getX() < getColumnModel().getColumn(0).getWidth() ? 0 : 1; int overRow = 0;
int overRow = -1;
for (int i = 0;i < getRowCount();i++) { for (int i = 0;i < getRowCount();i++) {
if (e.getY() > i * WIDGET_TABLE_ROW_HEIGHT && e.getY() <= (i + 1) * WIDGET_TABLE_ROW_HEIGHT){ if (e.getY() > i * WIDGET_TABLE_ROW_HEIGHT && e.getY() <= (i + 1) * WIDGET_TABLE_ROW_HEIGHT){
overRow = i; overRow = i; //判断鼠标在哪一行
} }
} }
if (overRow == getSelectedRow() && overColumn == getSelectedColumn() && overColumn !=0) { //如果鼠标移动到当前选中的行上面的时候
if (overRow == selectedRow && selectedRow > 0) {
//把当前选中的那一行的光标改成(除了第一列)移动样式MOVE_CURSOR
setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
} else { } else {
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
} }
} }
@Override /**
* 鼠标拖动事件如果鼠标当前是<code>MOVE_CURSOR</code>状态则执行开始拖动的代码
* 绘制一个<code>moveComponent</code>来跟随鼠标移动
* @param e
*/
@Override
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
if (e.getX() < getColumnModel().getColumn(0).getWidth()) { int width = getColumnModel().getColumn(0).getWidth();
draging = false; //如果当前选中的行的范围是合理的话,就可以拖动
moveComponent.setVisible(false); if (selectedRow < getRowCount() && selectedRow > 0){
setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.MOVE_CURSOR));
} draging = true;
int width = getColumnModel().getColumn(1).getWidth(); moveComponent.setText(getValueAt(selectedRow,0).toString());
if (getCursor().getType() == Cursor.MOVE_CURSOR){ moveComponent.setLocation(0, e.getY() - GAP);
draging = true; moveComponent.setSize(new Dimension(width, WIDGET_TABLE_ROW_HEIGHT));
//下面这句话太重要了,拖拽过程中选中的不变 moveComponent.setVisible(true);
getInstance().setRowSelectionInterval(selectedRow,selectedRow); moveComponent.setForeground(Color.lightGray);
moveComponent.setText(getValueAt(getSelectedRow(), getSelectedColumn()).toString()); moveComponent.setBorder(BorderFactory.createLineBorder(Color.lightGray));
moveComponent.setLocation(getColumnModel().getColumn(0).getWidth(), e.getY() - GAP); }
moveComponent.setPreferredSize(new Dimension(width, WIDGET_TABLE_ROW_HEIGHT));
moveComponent.setSize(new Dimension(width, WIDGET_TABLE_ROW_HEIGHT));
moveComponent.setVisible(true);
moveComponent.setForeground(Color.lightGray);
moveComponent.setBorder(BorderFactory.createLineBorder(Color.lightGray));
}
} }
/**
* 设置鼠标单击时处理的事件单击控件列表进入控件属性表
* @param e
*/
@Override @Override
public void mouseReleased(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if(!draging){ if(selectedRow > 0){
return; //当前点击的控件的名字
String widgetName = cellData[selectedRow][0];
if (StringUtils.isNotEmpty(widgetName)){
//当前选择的容器
XCreator selectedContainer = designer.getSelectionModel().getSelection().getSelectedCreator();
WLayout selectedWidget = (WLayout)selectedContainer.toData();
//当前选择的容器中的控件数量
int count = selectedWidget.getWidgetCount();
for (int i = 0;i < count ;i++){
XCreator xCreator = (XCreator) selectedContainer.getComponent(i);
Widget widget = xCreator.toData();
if (ComparatorUtils.equals(widgetName, widget.getWidgetName())) {
getEditingDesigner().getSelectionModel().setSelectedCreator(xCreator);
}
}
}
} else if (selectedRow == 0){ // 如果是点击在第一行
if (!e.isPopupTrigger() && e.getClickCount() > 1) {
toggleCollapse();
}
} }
}
/**
* 鼠标离开属性表区域事件
* @param e
*/
public void mouseExited(MouseEvent e) {
draging = false; draging = false;
moveComponent.setVisible(false); moveComponent.setVisible(false);
int toIndex = e.getY() < GAP ? 0 : (int)Math.rint((e.getY() - GAP)/WIDGET_TABLE_ROW_HEIGHT) + 1; setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
((WParameterLayout) designer.getParaComponent().toData()).adjustOrder(getSelectedRow(), toIndex);
getInstance().setRowSelectionInterval(0,getRowCount() - 1);
refresh();
getInstance().repaint();
designer.fireTargetModified();
} }
}; };
@ -170,130 +205,83 @@ public class MobileWidgetTable extends JTable {
} }
public FormDesigner getEditingDesigner(){ public FormDesigner getEditingDesigner(){
return designer; return designer;
} }
/** /**
* 刷新 * 设置当前get到的行列的单元格为选中状态
*/ */
public void refresh(){ private void setCellSelected() {
XCreator creator = designer.getSelectionModel().getSelection().getSelectedCreator(); selectedRow = getSelectedRow();
cellData = getData(); if (selectedRow != -1) {
if(creator != null){ this.setRowSelectionInterval(selectedRow, selectedRow);
String widgetName =creator.toData().getWidgetName(); this.setColumnSelectionInterval(0, 0);
int row = -1;
int column = -1;
for (int i =0; i < cellData.length;i++){
if(ComparatorUtils.equals(widgetName, cellData[i][0])){
row = i;
column = 0;
break;
}
if(ComparatorUtils.equals(widgetName, cellData[i][1])){
row = i;
column = 1;
break;
}
}
selectedRow = row;
changeSelection(row,column,false,false);
if(row == -1){
this.clearSelection();
}
} }
} }
private String[][] getData(){ /**
XLayoutContainer paraContainer = designer.getParaComponent(); * 切换属性组折叠属性true/false
if(paraContainer == null || !paraContainer.acceptType(XWParameterLayout.class)){ */
return new String[0][0]; private void toggleCollapse() {
} this.setCollapsed(!this.isCollapsed());
//这里获取表格的父控件是为了当表格被折叠了后,装表格的父控件也要相应的重新布局一下
WParameterLayout para = (WParameterLayout) (paraContainer.toData()); //比如折叠之后表格行数应该比原来的少,占用父容器空间应该小点,不重新布局父容器,表格大小不会改变
return para.getWidgetNameTag(); Container parent = MobileWidgetTable.this.getParent();
} if (parent != null) {
parent.revalidate();
private class MobileWidgetTableCellRenderer extends DefaultTableCellRenderer{
public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected,
boolean hasFocus, int row, int column) {
if (getCursor().getType() == Cursor.MOVE_CURSOR){
if(selectedRow > -1 && selectedRow < getRowCount()){
//拖拽过程中选中的不变
getInstance().setRowSelectionInterval(selectedRow,selectedRow);
}
}
super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
if (column == 0){
UITextField uiTableTextField;
if (getSelectedColumn() == column && getSelectedRow() == row){
uiTableTextField = new UITableTextField(value.toString());
} else {
uiTableTextField = new UITextField(value.toString());
}
return uiTableTextField;
}
return this;
} }
repaint();
} }
private class MobileCellEditor extends AbstractCellEditor implements TableCellEditor {
UITableTextField uiTableTextField;
MobileCellEditor(){
uiTableTextField = new UITableTextField();
uiTableTextField.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent evt) {
stopCellEditing();
designer.fireTargetModified();
}
});
uiTableTextField.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent e) {
firePropertyChange();
}
@Override /**
public void removeUpdate(DocumentEvent e) { * 重新get排序后的数据
firePropertyChange(); */
} public void refreshData(){
cellData = getData();
}
@Override /**
public void changedUpdate(DocumentEvent e) { * 获取选中控件的控件列表
firePropertyChange(); *
} * @return String[][] 二维数组[0][0]widgetName
}); */
private String[][] getData(){
if(designer.isFormParaDesigner()){
return new String[0][0];
} }
/** //选择的控件
* cell改变相应的nametag改变 Widget selectedModel = designer.getSelectionModel().getSelection().getSelectedCreator().toData();
*/
public void firePropertyChange(){
((WParameterLayout) designer.getParaComponent().toData()).add2NameTagMap(uiTableTextField.getText(),
cellData[getSelectedRow()][1]);
}
public Object getCellEditorValue(){ if(selectedModel == null){
return uiTableTextField.getText(); return new String[0][0];
} }
/* // 选择的控件有两种类型,一种是WLayout,代表容器,一种是Widget,代表控件
* 双击以编辑 if (selectedModel.acceptType(WSortLayout.class)) {
*/ List<String> mobileWidgetList = ((WSortLayout)selectedModel).getOrderedMobileWidgetList();
public boolean isCellEditable(EventObject anEvent) { String[][] widgetName = new String[mobileWidgetList.size() + 1][1];
if (anEvent instanceof MouseEvent) { widgetName[0][0] = Inter.getLocText("FR-Designer_WidgetOrder");
return ((MouseEvent)anEvent).getClickCount() >= 2; for (int i = 0; i < mobileWidgetList.size(); i++) {
widgetName[i + 1][0] = mobileWidgetList.get(i);
} }
return true; return widgetName;
} else {
return new String[0][0];
} }
}
public Component getTableCellEditorComponent( JTable table,Object value, public boolean isCollapsed() {
boolean isSelected,int row,int column){ return collapsed;
uiTableTextField.setText(value.toString());
return uiTableTextField;
}
} }
public void setCollapsed(boolean collapsed) {
this.collapsed = collapsed;
}
/**
* 自定义的tableEditor类
*/
public class BeanTableModel extends DefaultTableModel { public class BeanTableModel extends DefaultTableModel {
public BeanTableModel() { public BeanTableModel() {
super(cellData,headers); super(cellData,headers);
@ -301,12 +289,15 @@ public class MobileWidgetTable extends JTable {
@Override @Override
public int getRowCount() { public int getRowCount() {
if (isCollapsed()) {
return 1;
}
return cellData.length; return cellData.length;
} }
@Override @Override
public int getColumnCount() { public int getColumnCount() {
return 2; return 1;
} }
@ -315,20 +306,16 @@ public class MobileWidgetTable extends JTable {
if (row >= getRowCount() || column >= getColumnCount()) { if (row >= getRowCount() || column >= getColumnCount()) {
return null; return null;
} }
Object[] rowValue = cellData[row]; if (row == 0) {
if (column > -1 && column < rowValue.length) { return (isCollapsed()? "+" : "-") + cellData[row][0];
return cellData[row][column];
} }
return null;
return cellData[row][0];
} }
@Override @Override
public String getColumnName(int column) { public String getColumnName(int column) {
if (column == 0) { return headers[0];
return headers[0];
} else {
return headers[1];
}
} }
@ -338,10 +325,10 @@ public class MobileWidgetTable extends JTable {
return; return;
} }
if (aValue == null) { if (aValue == null) {
cellData[row][column] = null; cellData[row] = null;
return; return;
} }
cellData[row][column] = aValue.toString(); cellData[row][0] = aValue.toString();
} }
/** /**
@ -351,35 +338,9 @@ public class MobileWidgetTable extends JTable {
* @return 是否可编辑 * @return 是否可编辑
*/ */
public boolean isCellEditable(int row, int column) { public boolean isCellEditable(int row, int column) {
if(column ==1){
return false; return false;
}
return true;
} }
} }
private class UITableTextField extends UITextField {
public UITableTextField(){
super();
}
public UITableTextField(String string){
super(string);
}
protected void paintBorder(Graphics g) {
Graphics2D g2d = (Graphics2D) g;
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
if (this.isFocusOwner()) {
g2d.setStroke(new BasicStroke(1.5f));
} else {
g2d.setStroke(new BasicStroke(1f));
}
RoundRectangle2D.Double rect = new RoundRectangle2D.Double(0, 0, this.getWidth() - 2, this.getHeight() - 2, 4, 4);
g2d.setColor(Color.orange);
g2d.draw(rect);
}
}
} }

269
designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

@ -13,39 +13,41 @@ import com.fr.design.designer.properties.WidgetPropertyTable;
import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itable.AbstractPropertyTable; import com.fr.design.gui.itable.AbstractPropertyTable;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.ui.Widget;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import javax.swing.*; import javax.swing.*;
import javax.swing.border.LineBorder; import javax.swing.border.LineBorder;
import javax.swing.table.JTableHeader;
import java.awt.*; import java.awt.*;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
/** /**
* 控件属性表Docking * 控件属性表绘制
* Modified by fanglei
*/ */
public class WidgetPropertyPane extends FormDockView implements BaseWidgetPropertyPane { public class WidgetPropertyPane extends FormDockView implements BaseWidgetPropertyPane {
private WidgetPropertyTable propertyTable; private static final String PARA = "para";
private EventPropertyTable eventTable; private static final String BODY = "body";
private List<AbstractPropertyTable> widgetPropertyTables; private WidgetPropertyTable propertyTable; // 控件的属性表
private FormDesigner designer; private EventPropertyTable eventTable; // 控件的事件表
private JPanel wsp; private List<AbstractPropertyTable> widgetPropertyTables; // 这个变量应该是保存控件拓展的属性tab
private MobileWidgetTable mobileWidgetTable; private FormDesigner designer; // 当前designer
private MobileBodyWidgetTable mobileBodyWidgetTable; private UIScrollPane psp; // 用来装载属性表table的容器
private UIScrollPane downPanel; private UIScrollPane esp; //用来装载事件table的容器
private JPanel centerPane; private JPanel wsp; // 装载移动端tab的容器,包括移动端属性表和控件拓展的移动端属性表
private CardLayout cardLayout; private MobileParaWidgetTable mobileParaWidgetTable; // 参数面板的移动端属性tab(和body的移动端属性tab区别是没有标签名column)
public static final String PARA = "para"; private MobileWidgetTable mobileWidgetTable; // body的移动端属性tab
public static final String BODY = "body"; private UIScrollPane downPanel; // 这个滚动容器是用于装载centerPane的
public static final int NODE_LENGTH = 2; private JPanel centerPane; // 此centerPane采用的是cardLayout布局,装载着mobileWidgetTable和mobileBodyWidgetTable
public boolean isrefresh = true; private CardLayout cardLayout; // 卡片布局,选中参数面板时显示mobileWidgetTable,选中body时显示mobileBodyWidgetTable
private JTableHeader header;//把表头单独get出来作为一个组件
public static WidgetPropertyPane getInstance() { public static WidgetPropertyPane getInstance() {
if (HOLDER.singleton == null) { if (HOLDER.singleton == null) {
@ -68,37 +70,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
setLayout(FRGUIPaneFactory.createBorderLayout()); setLayout(FRGUIPaneFactory.createBorderLayout());
} }
public class mobileWidgetDesignerAdapter implements DesignerEditListener {
public mobileWidgetDesignerAdapter() {
}
/**
* 响应界面改变事件
* @param evt 事件
*/
public void fireCreatorModified(DesignerEvent evt) {
if (evt.getCreatorEventID() == DesignerEvent.CREATOR_RESIZED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_EDITED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_ADDED) {
int value = downPanel.getVerticalScrollBar().getValue();
if(hasSelectParaPane(getEditingFormDesigner())){
cardLayout.show(centerPane,PARA);
mobileWidgetTable.refresh();
} else {
cardLayout.show(centerPane,BODY);
mobileBodyWidgetTable.refresh();
}
//出现滚动条
downPanel.doLayout();
//控件列表选中某组件,触发表单中选中控件,选中事件又触发列表刷新,滚动条回到0
//此处设置滚动条值为刷新前
downPanel.getVerticalScrollBar().setValue(value);
}
}
}
@Override @Override
public String getViewTitle() { public String getViewTitle() {
return Inter.getLocText("Form-Widget_Property_Table"); return Inter.getLocText("Form-Widget_Property_Table");
@ -110,6 +81,9 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
} }
@Override @Override
/**
* 绘制属性表tab
*/
public void refreshDockingView() { public void refreshDockingView() {
designer = this.getEditingFormDesigner(); designer = this.getEditingFormDesigner();
removeAll(); removeAll();
@ -118,66 +92,149 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
return; return;
} }
widgetPropertyTables = new ArrayList<AbstractPropertyTable>(); widgetPropertyTables = new ArrayList<AbstractPropertyTable>();
//依次创建属性表、事件表、移动端表,再将它们整合到TabPane中去
this.createPropertyTable();
this.createEventTable();
this.createMobileWidgetTable();
this.createTabPane();
this.initTables();
}
/**
* 初始化属性表事件表移动端拓展的属性表
*/
private void initTables() {
propertyTable.initPropertyGroups(null);
eventTable.refresh();
for (AbstractPropertyTable propertyTable : widgetPropertyTables) {
propertyTable.initPropertyGroups(designer);
}
}
/**
* 创建属性表table
*/
private void createPropertyTable() {
propertyTable = new WidgetPropertyTable(designer); propertyTable = new WidgetPropertyTable(designer);
designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable)); designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable));
propertyTable.setBorder(null); propertyTable.setBorder(null);
UIScrollPane psp = new UIScrollPane(propertyTable); psp = new UIScrollPane(propertyTable); // 用来装载属性表table
psp.setBorder(null); psp.setBorder(null);
}
/**
* 创建事件表事件选项卡不是JTable
*/
private void createEventTable() {
eventTable = new EventPropertyTable(designer); eventTable = new EventPropertyTable(designer);
designer.addDesignerEditListener(new EventPropertyDesignerAdapter(eventTable)); designer.addDesignerEditListener(new EventPropertyDesignerAdapter(eventTable));
eventTable.setBorder(null); eventTable.setBorder(null);
UIScrollPane esp = new UIScrollPane(eventTable); esp = new UIScrollPane(eventTable); //用来装载事件table
esp.setBorder(null); esp.setBorder(null);
wsp = FRGUIPaneFactory.createBorderLayout_S_Pane(); }
/**
* 创建移动端控件列表
*/
private void createMobileWidgetTable() {
//加上表头后,这里不再使用borderLayout布局,而采用BoxLayout布局
wsp = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
wsp.setBorder(null); wsp.setBorder(null);
mobileParaWidgetTable = new MobileParaWidgetTable(designer);
mobileWidgetTable = new MobileWidgetTable(designer); mobileWidgetTable = new MobileWidgetTable(designer);
mobileBodyWidgetTable = new MobileBodyWidgetTable(designer);
designer.addDesignerEditListener(new mobileWidgetDesignerAdapter()); designer.addDesignerEditListener(new mobileWidgetDesignerAdapter());
centerPane = FRGUIPaneFactory.createCardLayout_S_Pane(); centerPane = FRGUIPaneFactory.createCardLayout_S_Pane();
cardLayout = (CardLayout) centerPane.getLayout(); cardLayout = (CardLayout) centerPane.getLayout();
centerPane.add(mobileWidgetTable,PARA); centerPane.add(mobileParaWidgetTable, PARA);// 采用卡片布局的容器必须指定卡片名字,如果没有卡片名字
centerPane.add(mobileBodyWidgetTable,BODY); // 就会出现:Exception in thread "main" java.lang.IllegalArgumentException:
// cannot add to layout: constraint must be a string
// 第二个参数代表卡片的名字。后来show方法调用时通过名字找到要显示的卡片
centerPane.add(mobileWidgetTable, BODY); //这两句代码,是把JTable放到一个JPanel中去了,表头不会显示,
//只有放到JScrollPanel中去表头才能正常显示,这就是MobileWidgetTable中定义了表头却没有显示的原因!
//解决方案:MobileWidgetTable实在无法直接放到JScrollPanel中去的时候,应该把表头get出来单独作为一个组件显示
if(hasSelectParaPane(designer)){ if(hasSelectParaPane(designer)){
cardLayout.show(centerPane,PARA); cardLayout.show(centerPane,PARA);
header = mobileParaWidgetTable.getTableHeader();
} else { } else {
cardLayout.show(centerPane,BODY); cardLayout.show(centerPane,BODY);
header = mobileWidgetTable.getTableHeader();
} }
downPanel = new UIScrollPane(centerPane); downPanel = new UIScrollPane(centerPane);
downPanel.setBorder(new LineBorder(Color.gray)); downPanel.setBorder(new LineBorder(Color.GRAY));
wsp.add(downPanel,BorderLayout.CENTER);
UITabbedPane tabbedPane = new UITabbedPane(); //获取拓展移动端属性tab
initTabPane(psp, esp, tabbedPane);
WidgetPropertyUIProvider[] widgetAttrProviders = getExtraPropertyUIProviders(); WidgetPropertyUIProvider[] widgetAttrProviders = getExtraPropertyUIProviders();
addWidgetAttr(widgetAttrProviders); addWidgetAttr(widgetAttrProviders);
}
/**
* 将属性表事件表移动端控件列表整合到TabPane里面去
*/
private void createTabPane() {
UITabbedPane tabbedPane = new UITabbedPane(); // tab选项卡容器
initTabPane(tabbedPane);
add(tabbedPane, BorderLayout.CENTER); add(tabbedPane, BorderLayout.CENTER);
propertyTable.initPropertyGroups(null); }
eventTable.refresh();
for (AbstractPropertyTable propertyTable : widgetPropertyTables) { /**
propertyTable.initPropertyGroups(designer); * 获取当前控件扩展的属性tab
* 来源有两个:
* 1, 各个控件从各自的Xcreator里扩展例如手机重布局的tab就是从Xcreator中扩展的;
* 2, 所有的控件从插件里扩展.
*
* @return 扩展的tab
*/
private WidgetPropertyUIProvider[] getExtraPropertyUIProviders() {
FormSelection selection = designer.getSelectionModel().getSelection();
WidgetPropertyUIProvider[] embeddedPropertyUIProviders = null;
if (selection != null && selection.getSelectedCreator() != null) {
embeddedPropertyUIProviders = selection.getSelectedCreator().getWidgetPropertyUIProviders();
} }
isrefresh = false; Set<WidgetPropertyUIProvider> set = ExtraDesignClassManager.getInstance().getArray(WidgetPropertyUIProvider.XML_TAG);
return ArrayUtils.addAll(embeddedPropertyUIProviders, set.toArray(new WidgetPropertyUIProvider[set.size()]));
} }
/**
* 判断是将拓展的tab放入属性表还是将原来的tab放入属性表
* @param widgetAttrProviders 拓展的tab
*/
private void addWidgetAttr(WidgetPropertyUIProvider[] widgetAttrProviders) { private void addWidgetAttr(WidgetPropertyUIProvider[] widgetAttrProviders) {
if (widgetAttrProviders.length == 0) { if (widgetAttrProviders.length == 0) { // 判断有没有拓展的tab,没有就使用原来的
UILabel upLabel = new UILabel(Inter.getLocText("FR-Widget_Mobile_Table"), SwingConstants.CENTER); wsp.add(header);
upLabel.setBorder(BorderFactory.createEmptyBorder(6,0,6,0)); wsp.add(downPanel);
wsp.add(upLabel, BorderLayout.NORTH);
} else { } else {
for (WidgetPropertyUIProvider widgetAttrProvider : widgetAttrProviders) { for (WidgetPropertyUIProvider widgetAttrProvider : widgetAttrProviders) {
AbstractPropertyTable propertyTable = widgetAttrProvider.createWidgetAttrTable(); AbstractPropertyTable propertyTable = widgetAttrProvider.createWidgetAttrTable();
widgetPropertyTables.add(propertyTable); widgetPropertyTables.add(propertyTable);
designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable)); designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable));
UIScrollPane uiScrollPane = new UIScrollPane(propertyTable); UIScrollPane uiScrollPane = new UIScrollPane(getExtraBodyTable(propertyTable));
uiScrollPane.setBorder(null);
wsp.add(uiScrollPane); wsp.add(uiScrollPane);
} }
} }
} }
private void initTabPane(UIScrollPane psp, UIScrollPane esp, UITabbedPane tabbedPane) { /**
* 如果是body的拓展属性表那么要额外加上一张控件顺序表
* @return
*/
private Component getExtraBodyTable(AbstractPropertyTable abstractPropertyTable) {
Widget selection = designer.getSelectionModel().getSelection().getSelectedCreator().toData();
if (selection.getWidgetName().equals("body")) {
JPanel jPanel = FRGUIPaneFactory.createY_AXISBoxInnerContainer_S_Pane();
jPanel.add(abstractPropertyTable);
MobileWidgetTable mobileWidgetTable = new MobileWidgetTable(designer);
jPanel.add(mobileWidgetTable.getTableHeader());
jPanel.add(mobileWidgetTable);
return jPanel;
}
return abstractPropertyTable;
}
private void initTabPane(UITabbedPane tabbedPane) {
tabbedPane.setOpaque(true); tabbedPane.setOpaque(true);
tabbedPane.setBorder(null); tabbedPane.setBorder(null);
tabbedPane.setTabPlacement(SwingConstants.BOTTOM); tabbedPane.setTabPlacement(SwingConstants.BOTTOM);
@ -201,31 +258,12 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
return xCreator.acceptType(XWParameterLayout.class) || container.acceptType(XWParameterLayout.class); return xCreator.acceptType(XWParameterLayout.class) || container.acceptType(XWParameterLayout.class);
} }
/**
* 获取当前控件扩展的属性tab
* 来源有两个:
* 1, 各个控件从各自的Xcreator里扩展;
* 2, 所有的控件从插件里扩展.
*
* @return 扩展的tab
*/
private WidgetPropertyUIProvider[] getExtraPropertyUIProviders() {
FormSelection selection = designer.getSelectionModel().getSelection();
WidgetPropertyUIProvider[] embeddedPropertyUIProviders = null;
if (selection != null && selection.getSelectedCreator() != null) {
embeddedPropertyUIProviders = selection.getSelectedCreator().getWidgetPropertyUIProviders();
}
Set<WidgetPropertyUIProvider> set = ExtraDesignClassManager.getInstance().getArray(WidgetPropertyUIProvider.XML_TAG);
WidgetPropertyUIProvider[] widgetAttrProviders = ArrayUtils.addAll(embeddedPropertyUIProviders, set.toArray(new WidgetPropertyUIProvider[set.size()]));
return widgetAttrProviders;
}
public void setEditingFormDesigner(BaseFormDesigner editor) { public void setEditingFormDesigner(BaseFormDesigner editor) {
FormDesigner fd = (FormDesigner) editor; FormDesigner fd = (FormDesigner) editor;
super.setEditingFormDesigner(fd); super.setEditingFormDesigner(fd);
} }
public void clearDockingView() { private void clearDockingView() {
propertyTable = null; propertyTable = null;
eventTable = null; eventTable = null;
if (widgetPropertyTables != null) { if (widgetPropertyTables != null) {
@ -236,10 +274,13 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
this.add(psp, BorderLayout.CENTER); this.add(psp, BorderLayout.CENTER);
} }
public class WidgetPropertyDesignerAdapter implements DesignerEditListener { /**
* 属性表监听界面事件(编辑删除选中改变大小)
*/
private class WidgetPropertyDesignerAdapter implements DesignerEditListener {
AbstractPropertyTable propertyTable; AbstractPropertyTable propertyTable;
public WidgetPropertyDesignerAdapter(AbstractPropertyTable propertyTable) { WidgetPropertyDesignerAdapter(AbstractPropertyTable propertyTable) {
this.propertyTable = propertyTable; this.propertyTable = propertyTable;
} }
@ -260,17 +301,19 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
} }
} }
public class EventPropertyDesignerAdapter implements DesignerEditListener { /**
* 事件表监听界面事件编辑选中
*/
private class EventPropertyDesignerAdapter implements DesignerEditListener {
EventPropertyTable propertyTable; EventPropertyTable propertyTable;
public EventPropertyDesignerAdapter(EventPropertyTable eventTable) { EventPropertyDesignerAdapter(EventPropertyTable eventTable) {
this.propertyTable = eventTable; this.propertyTable = eventTable;
} }
@Override @Override
public void fireCreatorModified(DesignerEvent evt) { public void fireCreatorModified(DesignerEvent evt) {
if (evt.getCreatorEventID() == DesignerEvent.CREATOR_EDITED if (evt.getCreatorEventID() == DesignerEvent.CREATOR_EDITED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_EDITED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED) { || evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED) {
propertyTable.refresh(); propertyTable.refresh();
} }
@ -282,6 +325,40 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
} }
} }
/**
* 移动端属性表监听界面事件改变大小编辑选中增加控件
*/
private class mobileWidgetDesignerAdapter implements DesignerEditListener {
mobileWidgetDesignerAdapter() {
}
/**
* 响应界面改变事件
* @param evt 事件
*/
public void fireCreatorModified(DesignerEvent evt) {
if (evt.getCreatorEventID() == DesignerEvent.CREATOR_RESIZED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_EDITED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_SELECTED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_ADDED) {
int value = downPanel.getVerticalScrollBar().getValue();
if(hasSelectParaPane(getEditingFormDesigner())){
cardLayout.show(centerPane,PARA);
mobileParaWidgetTable.refreshData();
} else {
cardLayout.show(centerPane,BODY);
mobileWidgetTable.refreshData();
}
//出现滚动条
downPanel.doLayout();
//控件列表选中某组件,触发表单中选中控件,选中事件又触发列表刷新,滚动条回到0
//此处设置滚动条值为刷新前
downPanel.getVerticalScrollBar().setValue(value);
}
}
}
@Override @Override
public Location preferredLocation() { public Location preferredLocation() {
return Location.WEST_BELOW; return Location.WEST_BELOW;

Loading…
Cancel
Save