Browse Source

Merge branch 'release/9.0'

# Conflicts:
#	designer/src/com/fr/design/dscolumn/SelectedDataColumnPane.java
paul 7 years ago
parent
commit
19163ec028
  1. 12
      designer/src/com/fr/design/actions/report/ReportMobileAttrAction.java
  2. 160
      designer/src/com/fr/design/dscolumn/DSColumnPane.java
  3. 10
      designer/src/com/fr/design/mainframe/ElementCasePane.java
  4. 44
      designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java
  5. 17
      designer/src/com/fr/design/mainframe/JWorkBook.java
  6. 4
      designer/src/com/fr/design/mainframe/ReportComponent.java
  7. 4
      designer/src/com/fr/design/mainframe/ReportComponentCardPane.java
  8. 7
      designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPaneNoPop.java
  9. 3
      designer/src/com/fr/design/mainframe/SheetNameTabPane.java
  10. 40
      designer/src/com/fr/design/mainframe/bbs/BBSConstants.java
  11. 132
      designer/src/com/fr/design/mainframe/bbs/BBSGuestPane.java
  12. 320
      designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java
  13. 1
      designer/src/com/fr/design/mainframe/bbs/bbs.properties
  14. 9
      designer/src/com/fr/design/mainframe/form/FormElementCaseDesigner.java
  15. 9
      designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java
  16. 5
      designer/src/com/fr/design/parameter/ParameterDefinitePane.java
  17. 120
      designer/src/com/fr/design/report/PageSetupPane.java
  18. 27
      designer/src/com/fr/design/report/ReportBackgroundPane.java
  19. 10
      designer/src/com/fr/design/report/mobile/ReportMobileAttrPane.java
  20. 102
      designer/src/com/fr/design/report/mobile/ReportMobileTemplateSettingsPane.java
  21. 2
      designer/src/com/fr/design/webattr/ReportWebWidgetConstants.java
  22. 4
      designer/src/com/fr/design/webattr/ToolBarButton.java
  23. 6
      designer/src/com/fr/grid/AbstractGridHeaderMouseHandler.java
  24. 36
      designer/src/com/fr/grid/Grid.java
  25. 4
      designer/src/com/fr/grid/GridColumnUI.java
  26. 14
      designer/src/com/fr/grid/GridMouseAdapter.java
  27. 4
      designer/src/com/fr/grid/GridRowUI.java
  28. 30
      designer/src/com/fr/grid/GridUI.java
  29. 3
      designer/src/com/fr/grid/selection/CellSelection.java
  30. 4
      designer/src/com/fr/grid/selection/FloatSelection.java
  31. 3
      designer/src/com/fr/poly/PolyComponetsBar.java
  32. 8
      designer/src/com/fr/poly/PolyDesigner.java
  33. 3
      designer/src/com/fr/poly/actions/DeleteBlockAction.java
  34. 7
      designer/src/com/fr/poly/creator/ChartBlockEditor.java
  35. 4
      designer/src/com/fr/poly/creator/ECBlockEditor.java
  36. 6
      designer/src/com/fr/poly/creator/ECBlockPane.java
  37. 8
      designer/src/com/fr/poly/hanlder/BottomCornerMouseHanlder.java
  38. 6
      designer/src/com/fr/poly/hanlder/ColumnOperationMouseHandler.java
  39. 4
      designer/src/com/fr/poly/hanlder/PolyDesignerDropTarget.java
  40. 6
      designer/src/com/fr/poly/hanlder/RowOperationMouseHandler.java
  41. 6
      designer/src/com/fr/start/Designer.java
  42. 4
      designer_base/src/com/fr/design/DesignState.java
  43. 2
      designer_base/src/com/fr/design/actions/AllowAuthorityEditAction.java
  44. 5
      designer_base/src/com/fr/design/actions/ExitAuthorityEditAction.java
  45. 53
      designer_base/src/com/fr/design/actions/help/AboutPane.java
  46. 2
      designer_base/src/com/fr/design/designer/IntervalConstants.java
  47. 3
      designer_base/src/com/fr/design/dialog/mobile/MobileRadioCheckPane.java
  48. 17
      designer_base/src/com/fr/design/extra/LoginDialog.java
  49. 53
      designer_base/src/com/fr/design/extra/WebViewDlgHelper.java
  50. 2
      designer_base/src/com/fr/design/file/MutilTempalteTabPane.java
  51. 4
      designer_base/src/com/fr/design/file/NewTemplatePane.java
  52. 467
      designer_base/src/com/fr/design/gui/controlpane/UISimpleListControlPane.java
  53. 11
      designer_base/src/com/fr/design/gui/frpane/AbstractAttrNoScrollPane.java
  54. 34
      designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java
  55. 14
      designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPaneActionProvider.java
  56. 8
      designer_base/src/com/fr/design/gui/ibutton/UISliderButtonUI.java
  57. 5
      designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java
  58. 10
      designer_base/src/com/fr/design/gui/icontainer/UIModeControlContainer.java
  59. 7
      designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java
  60. 20
      designer_base/src/com/fr/design/gui/ilable/UILabel.java
  61. 2
      designer_base/src/com/fr/design/gui/ispinner/UISpinner.java
  62. 37
      designer_base/src/com/fr/design/icon/IconPathConstants.java
  63. BIN
      designer_base/src/com/fr/design/images/buttonicon/add_press.png
  64. BIN
      designer_base/src/com/fr/design/images/buttonicon/addicon.png
  65. BIN
      designer_base/src/com/fr/design/images/control/newEdit.png
  66. 20
      designer_base/src/com/fr/design/locale/designer.properties
  67. 24
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  68. 19
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  69. 26
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  70. 30
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  71. 30
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  72. 15
      designer_base/src/com/fr/design/mainframe/DesignerFrame.java
  73. 3
      designer_base/src/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  74. 3
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java
  75. 32
      designer_base/src/com/fr/design/mainframe/JTemplate.java
  76. 6
      designer_base/src/com/fr/design/mainframe/UndoStateEdit.java
  77. 11
      designer_base/src/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  78. 4
      designer_base/src/com/fr/design/mainframe/toolbar/VcsScene.java
  79. 31
      designer_base/src/com/fr/design/mainframe/widget/BasicPropertyPane.java
  80. 3
      designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java
  81. 10
      designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java
  82. 10
      designer_base/src/com/fr/start/BaseDesigner.java
  83. 7
      designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java
  84. 10
      designer_chart/src/com/fr/plugin/chart/designer/style/background/AlertLineListControlPane.java
  85. 10
      designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java
  86. 8
      designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java
  87. 12
      designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartCatalogHyperLinkPane.java
  88. 9
      designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java
  89. 36
      designer_form/src/com/fr/design/designer/creator/XChartEditor.java
  90. 32
      designer_form/src/com/fr/design/designer/creator/XCreator.java
  91. 12
      designer_form/src/com/fr/design/designer/creator/XElementCase.java
  92. 26
      designer_form/src/com/fr/design/designer/creator/XWAbsoluteLayout.java
  93. 9
      designer_form/src/com/fr/design/designer/creator/XWFitLayout.java
  94. 7
      designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java
  95. 13
      designer_form/src/com/fr/design/designer/creator/XWTitleLayout.java
  96. 20
      designer_form/src/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java
  97. 22
      designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java
  98. 5
      designer_form/src/com/fr/design/designer/properties/mobile/BodyMobilePropertyUI.java
  99. 38
      designer_form/src/com/fr/design/designer/properties/mobile/ChartEditorPropertyUI.java
  100. 39
      designer_form/src/com/fr/design/designer/properties/mobile/ParaMobilePropertyUI.java
  101. Some files were not shown because too many files have changed in this diff Show More

12
designer/src/com/fr/design/actions/report/ReportMobileAttrAction.java

@ -11,7 +11,10 @@ import com.fr.design.report.mobile.ReportMobileAttrPane;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.main.TemplateWorkBook; import com.fr.main.TemplateWorkBook;
import com.fr.plugin.ExtraClassManager;
import com.fr.report.mobile.ElementCaseMobileAttr; import com.fr.report.mobile.ElementCaseMobileAttr;
import com.fr.stable.ReportFunctionProcessor;
import com.fr.stable.fun.FunctionProcessor;
import javax.swing.*; import javax.swing.*;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -50,8 +53,15 @@ public class ReportMobileAttrAction extends JWorkBookAction{
BasicDialog dialog = mobileAttrPane.showWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { BasicDialog dialog = mobileAttrPane.showWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() {
@Override @Override
public void doOk() { public void doOk() {
wbTpl.setReportMobileAttr(mobileAttrPane.updateBean()); ElementCaseMobileAttr elementCaseMobileAttr = mobileAttrPane.updateBean();
wbTpl.setReportMobileAttr(elementCaseMobileAttr);
jwb.fireTargetModified(); jwb.fireTargetModified();
if (elementCaseMobileAttr.isMobileCanvasSize()) {
FunctionProcessor processor = ExtraClassManager.getInstance().getFunctionProcessor();
if (processor != null) {
processor.recordFunction(ReportFunctionProcessor.MOBILE_TEMPLATE_CPT);
}
}
} }
}); });
dialog.setVisible(true); dialog.setVisible(true);

160
designer/src/com/fr/design/dscolumn/DSColumnPane.java

@ -1,26 +1,30 @@
package com.fr.design.dscolumn; package com.fr.design.dscolumn;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.data.TableDataSource; import com.fr.data.TableDataSource;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.frpane.UITabbedPane; import com.fr.design.gui.frpane.UITabbedPane;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane;
import com.fr.general.Inter;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.general.Inter;
import com.fr.report.cell.CellElement; import com.fr.report.cell.CellElement;
import com.fr.report.cell.DefaultTemplateCellElement; import com.fr.report.cell.DefaultTemplateCellElement;
import com.fr.report.cell.TemplateCellElement; import com.fr.report.cell.TemplateCellElement;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
/**
* @author null
* @version 2018年2月9日13点47分
* @since 8.0
*/
public class DSColumnPane extends BasicPane { public class DSColumnPane extends BasicPane {
private TableDataSource tplEC; private TableDataSource tplEC;
@ -29,17 +33,56 @@ public class DSColumnPane extends BasicPane {
private DSColumnConditionsPane conditionPane = null; private DSColumnConditionsPane conditionPane = null;
private DSColumnAdvancedPane advancedPane = null; private DSColumnAdvancedPane advancedPane = null;
private TemplateCellElement cellElement; private TemplateCellElement cellElement;
protected Component lastSelectedComponent; private Component lastSelectedComponent;
public static final int SETTING_ALL = 2; public static final int SETTING_ALL = 2;
public static final int SETTING_DSRELATED = 1; public static final int SETTING_DSRELATED = 1;
private ChangeListener appliedWizardTabChangeListener = new ChangeListener() {
@Override
public void stateChanged(ChangeEvent evt) {
try {
if (lastSelectedComponent == null) {
lastSelectedComponent = basicPane;
}
// selectTabComponent是正要切换到的那个Pane
Component selectTabComponent = tabbedPane.getSelectedComponent();
// denny: 如果切换Tab时上一个Pane是basicPane, 则刷新一下其他Pane,
// 因为选择的数据列可能改变, 导致后面过滤和使用公式用到的数据项改变
if (lastSelectedComponent == basicPane) {
basicPane.update(cellElement);
// denny_GUI: 刷新其他面板
refreshOtherTabs();
}
// 切换标签的时候就,确认是否有没有添加到列表中的条件
lastSelectedComponent = selectTabComponent;
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage(), e);
}
}
};
/**
* cellElement 改变时刷新一下
* 比如上边切换Tab时basicPane Update了一下可能会改变Field cellElement的值
*/
private PropertyChangeListener myPropertyChangeListener = new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
refreshOtherTabs();
}
};
public DSColumnPane() { public DSColumnPane() {
this.initComponents(SETTING_ALL); this(SETTING_ALL);
} }
public DSColumnPane(int setting) { private DSColumnPane(int setting) {
this.initComponents(setting); this.initComponents(setting);
} }
protected void initComponents(int setting) { protected void initComponents(int setting) {
@ -65,18 +108,22 @@ public class DSColumnPane extends BasicPane {
this.setPreferredSize(new Dimension(610, 400)); this.setPreferredSize(new Dimension(610, 400));
} }
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText("ExpandD-Data_Column"); return Inter.getLocText("ExpandD-Data_Column");
} }
/* /**
* populate * 更新面板信息
*
* @param tds 数据源
* @param cellElement 单元格
* @throws Exception e
*/ */
public void populate(TableDataSource tds, TemplateCellElement cellElement) throws Exception { public void populate(TableDataSource tds, TemplateCellElement cellElement) throws Exception {
this.tplEC = tds; this.tplEC = tds;
if (tds == null || cellElement == null) { if (tds == null || cellElement == null) {
// _denny: 我不认为这种情况应该出现,以防万一 // _denny: 我不认为这种情况应该出现,以防万一
this.cellElement = new DefaultTemplateCellElement(); this.cellElement = new DefaultTemplateCellElement();
@ -85,15 +132,16 @@ public class DSColumnPane extends BasicPane {
// _denny: 这边需要克隆一下,因为在设置时,可能改变字段cellElement,但改变真实值是不被期望的 // _denny: 这边需要克隆一下,因为在设置时,可能改变字段cellElement,但改变真实值是不被期望的
try { try {
this.cellElement = (TemplateCellElement) cellElement.clone(); this.cellElement = (TemplateCellElement) cellElement.clone();
} catch (CloneNotSupportedException ce) { } catch (CloneNotSupportedException ignored) {
} }
// 只更新基本设置的面板信息即可,因为从基本信息切换到其他设置的时候也还是会更新其他面板的
this.basicPane.populate(tds, this.cellElement); this.basicPane.populate(tds, this.cellElement);
this.conditionPane.populate(tds, this.cellElement);
this.advancedPane.populate(this.cellElement);
} }
/* /**
* update * update 保存
*
* @return 单元格信息
*/ */
public CellElement update() { public CellElement update() {
this.basicPane.update(cellElement); this.basicPane.update(cellElement);
@ -101,54 +149,24 @@ public class DSColumnPane extends BasicPane {
this.advancedPane.update(cellElement); this.advancedPane.update(cellElement);
return cellElement; return cellElement;
} }
public ChangeListener appliedWizardTabChangeListener = new ChangeListener() {
public void stateChanged(ChangeEvent evt) {
try {
if (lastSelectedComponent == null) {
lastSelectedComponent = basicPane;
}
//selectTabComponent是正要切换到的那个Pane
Component selectTabComponent = tabbedPane.getSelectedComponent();
// _denny: 如果切换Tab时上一个Pane是basicPane, 则刷新一下其他Pane,
// 因为选择的数据列可能改变, 导致后面过滤和使用公式用到的数据项改变
if (lastSelectedComponent == basicPane) {
basicPane.update(cellElement);
// denny_GUI: 刷新其他面板
refrushOtherTabs();
}
// 切换标签的时候就,确认是否有没有添加到列表中的条件
lastSelectedComponent = selectTabComponent;
} catch (Exception e) {
FRContext.getLogger().error(e.getMessage(), e);
}
} /**
}; * denny:当数据tab中的数据发生变化的时候刷新后面的tab
// cellElement 改变时,刷新一下 */
// 比如:上边切换Tab时,basicPane Update了一下,可能会改变Field cellElement的值 private void refreshOtherTabs() {
PropertyChangeListener myPropertyChangeListener = new PropertyChangeListener() { // deny:当JTabPane中加入一个Pane时,后面的Pane可能还没有初始化
public void propertyChange(PropertyChangeEvent evt) {
refrushOtherTabs();
}
};
//_denny:当数据tab中的数据发生变化的时候刷新后面的tab
public void refrushOtherTabs() {
// ——deny:当JTabPane中加入一个Pane时,后面的Pane可能还没有初始化
if (conditionPane == null || advancedPane == null) { if (conditionPane == null || advancedPane == null) {
return; return;
} }
this.conditionPane.populate(tplEC, cellElement); this.conditionPane.populate(tplEC, cellElement);
this.advancedPane.populate(cellElement); this.advancedPane.populate(cellElement);
} }
public void putElementcase(ElementCasePane t){
basicPane.putElementcase(t); public void putElementcase(ElementCasePane t) {
basicPane.putElementcase(t);
} }
public void putCellElement(TemplateCellElement tplCE) { public void putCellElement(TemplateCellElement tplCE) {
basicPane.putCellElement(tplCE); basicPane.putCellElement(tplCE);
} }
} }

10
designer/src/com/fr/design/mainframe/ElementCasePane.java

@ -4,12 +4,12 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList; import com.fr.base.DynamicUnitList;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.Formula; import com.fr.base.Formula;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.Style; import com.fr.base.Style;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
@ -755,7 +755,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
* @return 返回是否清除内容. * @return 返回是否清除内容.
*/ */
public boolean clearContents() { public boolean clearContents() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return false; return false;
} }
boolean b = this.selection.clear(Clear.CONTENTS, this); boolean b = this.selection.clear(Clear.CONTENTS, this);
@ -1042,7 +1042,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
*/ */
public UIPopupMenu createRowPopupMenu(MouseEvent evt, int selectedRows) { public UIPopupMenu createRowPopupMenu(MouseEvent evt, int selectedRows) {
UIPopupMenu popupMenu = new UIPopupMenu(); UIPopupMenu popupMenu = new UIPopupMenu();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
popupMenu.add(new CleanAuthorityAction(this).createMenuItem()); popupMenu.add(new CleanAuthorityAction(this).createMenuItem());
return popupMenu; return popupMenu;
} }
@ -1135,7 +1135,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
public UIPopupMenu createColumnPopupMenu(MouseEvent evt, int selectedColumn) { public UIPopupMenu createColumnPopupMenu(MouseEvent evt, int selectedColumn) {
UIPopupMenu popupMenu = new UIPopupMenu(); UIPopupMenu popupMenu = new UIPopupMenu();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
popupMenu.add(new CleanAuthorityAction(this).createMenuItem()); popupMenu.add(new CleanAuthorityAction(this).createMenuItem());
return popupMenu; return popupMenu;
} }
@ -1236,7 +1236,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
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(new String[]{"DashBoard-Potence", "Edit"})),
BaseUtils.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this), DesignerMode.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this),
}; };
} }

44
designer/src/com/fr/design/mainframe/ElementCasePaneDelegate.java

@ -1,38 +1,42 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.edit.HyperlinkAction;
import com.fr.design.fun.MenuHandler;
import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.menu.KeySetUtils;
import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.general.Inter;
import com.fr.grid.selection.FloatSelection;
import com.fr.grid.selection.Selection;
import com.fr.page.ReportSettingsProvider;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.cell.*; import com.fr.design.actions.cell.CellAttributeAction;
import com.fr.design.actions.cell.CellExpandAttrAction;
import com.fr.design.actions.cell.CellWidgetAttrAction;
import com.fr.design.actions.cell.ConditionAttributesAction;
import com.fr.design.actions.cell.GlobalStyleMenuDef;
import com.fr.design.actions.columnrow.InsertColumnAction; import com.fr.design.actions.columnrow.InsertColumnAction;
import com.fr.design.actions.columnrow.InsertRowAction; import com.fr.design.actions.columnrow.InsertRowAction;
import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.edit.HyperlinkAction;
import com.fr.design.actions.edit.merge.MergeCellAction; import com.fr.design.actions.edit.merge.MergeCellAction;
import com.fr.design.actions.edit.merge.UnmergeCellAction; import com.fr.design.actions.edit.merge.UnmergeCellAction;
import com.fr.design.actions.utils.DeprecatedActionManager; import com.fr.design.actions.utils.DeprecatedActionManager;
import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener; import com.fr.design.event.TargetModifiedListener;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.fun.MenuHandler;
import com.fr.design.gui.frpane.HyperlinkGroupPane;
import com.fr.design.mainframe.cell.QuickEditorRegion; import com.fr.design.mainframe.cell.QuickEditorRegion;
import com.fr.design.menu.KeySetUtils;
import com.fr.design.menu.MenuDef; import com.fr.design.menu.MenuDef;
import com.fr.design.menu.SeparatorDef; import com.fr.design.menu.SeparatorDef;
import com.fr.report.worksheet.WorkSheet; import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
import com.fr.design.selection.SelectionEvent; import com.fr.design.selection.SelectionEvent;
import com.fr.design.selection.SelectionListener; import com.fr.design.selection.SelectionListener;
import com.fr.general.Inter;
import com.fr.grid.selection.FloatSelection;
import com.fr.grid.selection.Selection;
import com.fr.page.ReportSettingsProvider;
import com.fr.report.worksheet.WorkSheet;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import javax.swing.*; import javax.swing.JPanel;
import java.awt.*; import java.awt.BorderLayout;
/** /**
* 类说明: 设计面板中最上方的"插入" "单元格"下拉列表Menu模块. * 类说明: 设计面板中最上方的"插入" "单元格"下拉列表Menu模块.
@ -47,7 +51,7 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
this.addSelectionChangeListener(new SelectionListener() { this.addSelectionChangeListener(new SelectionListener() {
@Override @Override
public void selectionChanged(SelectionEvent e) { public void selectionChanged(SelectionEvent e) {
if (!isEditable() && !BaseUtils.isAuthorityEditing()) { if (!isEditable() && !DesignerMode.isAuthorityEditing()) {
return; return;
} }
refreshPropertyPanes(); refreshPropertyPanes();
@ -67,7 +71,7 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
private void refreshPropertyPanes() { private void refreshPropertyPanes() {
//在编辑权限,所以要更新权限编辑面板 //在编辑权限,所以要更新权限编辑面板
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
AuthorityPropertyPane authorityPropertyPane = new AuthorityPropertyPane(ElementCasePaneDelegate.this); AuthorityPropertyPane authorityPropertyPane = new AuthorityPropertyPane(ElementCasePaneDelegate.this);
authorityPropertyPane.populate(); authorityPropertyPane.populate();
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION);
@ -79,11 +83,11 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
CellElementPropertyPane.getInstance().populate(ElementCasePaneDelegate.this); CellElementPropertyPane.getInstance().populate(ElementCasePaneDelegate.this);
QuickEditorRegion.getInstance().populate(getCurrentEditor()); QuickEditorRegion.getInstance().populate(getCurrentEditor());
JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
// 模板初始化完成后,才能初始化超级链接面板
if (editingTemplate != null && !editingTemplate.isUpMode()) { if (editingTemplate != null && !editingTemplate.isUpMode()) {
Selection editingSelection = getSelection(); Selection editingSelection = getSelection();
// 模板初始化完成后,才能初始化超级链接面板 // 获取超级链接面板并刷新显示
HyperlinkGroupPane hyperlinkGroupPane = editingTemplate.getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance()); HyperlinkGroupPane hyperlinkGroupPane = editingTemplate.getHyperLinkPane(HyperlinkGroupPaneActionImpl.getInstance());
hyperlinkGroupPane.populate(ElementCasePaneDelegate.this);
if (editingSelection instanceof FloatSelection) { if (editingSelection instanceof FloatSelection) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_FLOAT); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.REPORT_FLOAT);
JPanel floatPane = new JPanel(new BorderLayout()); JPanel floatPane = new JPanel(new BorderLayout());
@ -120,7 +124,7 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
* @return 返回MenuDef数组. * @return 返回MenuDef数组.
*/ */
public MenuDef[] menus4Target() { public MenuDef[] menus4Target() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return super.menus4Target(); return super.menus4Target();
} }
return (MenuDef[]) ArrayUtils.addAll(super.menus4Target(), new MenuDef[]{createInsertMenuDef(), createCellMenuDef()}); return (MenuDef[]) ArrayUtils.addAll(super.menus4Target(), new MenuDef[]{createInsertMenuDef(), createCellMenuDef()});

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

@ -264,7 +264,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
if (this.getEditingElementCasePane() == null) { if (this.getEditingElementCasePane() == null) {
return JWorkBook.this; return JWorkBook.this;
} }
this.getEditingElementCasePane().getGrid().setEditable(!BaseUtils.isAuthorityEditing()); this.getEditingElementCasePane().getGrid().setEditable(!DesignerMode.isAuthorityEditing());
centerPane.needToShowCoverAndHidPane(); centerPane.needToShowCoverAndHidPane();
if (centerPane.isUpEditMode()) { if (centerPane.isUpEditMode()) {
return parameterPane; return parameterPane;
@ -294,7 +294,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
} }
public JPanel getEastUpPane() { public JPanel getEastUpPane() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return allowAuthorityUpPane(); return allowAuthorityUpPane();
} else { } else {
return exitEastUpPane(); return exitEastUpPane();
@ -589,7 +589,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
*/ */
public ShortCut[] shortcut4FileMenu() { public ShortCut[] shortcut4FileMenu() {
boolean showWorkBookExportMenu = DesignerMode.isVcsMode() boolean showWorkBookExportMenu = DesignerMode.isVcsMode()
|| BaseUtils.isAuthorityEditing() || DesignerMode.isAuthorityEditing()
|| (FRContext.getCurrentEnv() instanceof RemoteEnv); || (FRContext.getCurrentEnv() instanceof RemoteEnv);
return (ShortCut[]) ArrayUtils.addAll(super.shortcut4FileMenu(), return (ShortCut[]) ArrayUtils.addAll(super.shortcut4FileMenu(),
showWorkBookExportMenu ? new ShortCut[0] : new ShortCut[]{this.createWorkBookExportMenu()} showWorkBookExportMenu ? new ShortCut[0] : new ShortCut[]{this.createWorkBookExportMenu()}
@ -634,7 +634,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
public ShortCut[] shortCuts4Authority() { public ShortCut[] shortCuts4Authority() {
return new ShortCut[]{ return new ShortCut[]{
new NameSeparator(Inter.getLocText("FR-Designer_Permissions_Edition")), new NameSeparator(Inter.getLocText("FR-Designer_Permissions_Edition")),
BaseUtils.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this), DesignerMode.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this),
}; };
} }
@ -676,7 +676,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
protected void applyUndoState(WorkBookUndoState u) { protected void applyUndoState(WorkBookUndoState u) {
try { try {
this.setTarget((WorkBook) u.getWorkBook().clone()); this.setTarget((WorkBook) u.getWorkBook().clone());
if (!BaseUtils.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
if (u.getAuthorityType() != BaseUndoState.NORMAL_STATE) { if (u.getAuthorityType() != BaseUndoState.NORMAL_STATE) {
applyAll(u); applyAll(u);
this.undoState = u; this.undoState = u;
@ -929,7 +929,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
} }
} }
} }
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION);
EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(allowAuthorityUpPane()); EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(allowAuthorityUpPane());
EastRegionContainerPane.getInstance().replaceConfiguredRolesPane(RolesAlreadyEditedPane.getInstance()); EastRegionContainerPane.getInstance().replaceConfiguredRolesPane(RolesAlreadyEditedPane.getInstance());
@ -967,6 +967,11 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
return ps; return ps;
} }
@Override
public Parameter[] getJTemplateParameters() {
return this.parameterPane.getAllParameters();
}
/** /**
* 请求单元格区域的焦点 * 请求单元格区域的焦点
*/ */

4
designer/src/com/fr/design/mainframe/ReportComponent.java

@ -5,7 +5,7 @@ package com.fr.design.mainframe;
import javax.swing.JScrollBar; import javax.swing.JScrollBar;
import com.fr.base.BaseUtils; import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.AllowAuthorityEditAction; import com.fr.design.actions.AllowAuthorityEditAction;
import com.fr.design.actions.ExitAuthorityEditAction; import com.fr.design.actions.ExitAuthorityEditAction;
import com.fr.design.actions.report.ReportBackgroundAction; import com.fr.design.actions.report.ReportBackgroundAction;
@ -68,7 +68,7 @@ public abstract class ReportComponent<T extends TemplateReport, E extends Elemen
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(new String[]{"DashBoard-Potence", "Edit"})),
BaseUtils.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this), DesignerMode.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this),
}; };
} }

4
designer/src/com/fr/design/mainframe/ReportComponentCardPane.java

@ -4,7 +4,7 @@ import java.awt.CardLayout;
import javax.swing.JComponent; import javax.swing.JComponent;
import com.fr.base.BaseUtils; import com.fr.base.vcs.DesignerMode;
import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener; import com.fr.design.event.TargetModifiedListener;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
@ -125,7 +125,7 @@ public class ReportComponentCardPane extends JComponent implements TargetModifie
} else if (tpl instanceof PolyWorkSheet) { } else if (tpl instanceof PolyWorkSheet) {
showPoly((PolyWorkSheet) tpl); showPoly((PolyWorkSheet) tpl);
} }
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
String selectedRoles = ReportAndFSManagePane.getInstance().getRoleTree().getSelectedRoleName(); String selectedRoles = ReportAndFSManagePane.getInstance().getRoleTree().getSelectedRoleName();
editingTemplate.setSheetCovered(tpl.getWorkSheetPrivilegeControl().checkInvisible(selectedRoles)); editingTemplate.setSheetCovered(tpl.getWorkSheetPrivilegeControl().checkInvisible(selectedRoles));

7
designer/src/com/fr/design/mainframe/ReportHyperlinkGroupPaneNoPop.java

@ -5,7 +5,7 @@ import com.fr.design.gui.frpane.HyperlinkGroupPaneActionProvider;
/** /**
* Created by plough on 2017/9/4. * Created by plough on 2017/9/4.
*/ */
public class ReportHyperlinkGroupPaneNoPop extends ReportHyperlinkGroupPane{ public class ReportHyperlinkGroupPaneNoPop extends ReportHyperlinkGroupPane {
private static ReportHyperlinkGroupPaneNoPop singleton; private static ReportHyperlinkGroupPaneNoPop singleton;
private ReportHyperlinkGroupPaneNoPop(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider) { private ReportHyperlinkGroupPaneNoPop(HyperlinkGroupPaneActionProvider hyperlinkGroupPaneActionProvider) {
@ -24,4 +24,9 @@ public class ReportHyperlinkGroupPaneNoPop extends ReportHyperlinkGroupPane{
protected boolean isNewStyle() { protected boolean isNewStyle() {
return false; return false;
} }
@Override
public boolean needAutoSave() {
return false;
}
} }

3
designer/src/com/fr/design/mainframe/SheetNameTabPane.java

@ -21,6 +21,7 @@ import javax.swing.UIManager;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
@ -318,7 +319,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
*/ */
public void paintComponent(Graphics g) { public void paintComponent(Graphics g) {
super.paintComponent(g); super.paintComponent(g);
isAuthorityEditing = BaseUtils.isAuthorityEditing(); isAuthorityEditing = DesignerMode.isAuthorityEditing();
showCount = 0; showCount = 0;
// 开始画那些Tab. // 开始画那些Tab.
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;

40
designer/src/com/fr/design/mainframe/bbs/BBSConstants.java

@ -23,24 +23,35 @@ public class BBSConstants {
private static final String GUEST_KEY_ONLINE = "guest.user"; private static final String GUEST_KEY_ONLINE = "guest.user";
private static final String LINK_KEY = "LINK"; private static final String LINK_KEY = "LINK";
private static final String LINK_KEY_ONLINE = "guest.link"; private static final String LINK_KEY_ONLINE = "guest.link";
private static final String JOIN_LINK_KEY = "JOIN";
private static final String JOIN_LINK_KEY_ONLINE = "guest.join";
private static Properties PROP = null; private static Properties PROP = null;
public static String[] getAllGuest() { public static String[] getAllGuest() {
return loadAllGuestsInfoOnline(GUEST_KEY_ONLINE, loadAllGuestsInfo(GUEST_KEY)); return loadArrayOnline(GUEST_KEY_ONLINE, loadAttribute(GUEST_KEY));
} }
public static String[] getAllLink() { public static String[] getAllLink() {
return loadAllGuestsInfoOnline(LINK_KEY_ONLINE, loadAllGuestsInfo(LINK_KEY)); return loadArrayOnline(LINK_KEY_ONLINE, loadAttribute(LINK_KEY));
} }
//加载所有用户的信息, 用户名, 论坛连接 public static String getHowToJoinLink() {
private static String loadAllGuestsInfo(String key) { return loadAttributeOnline(JOIN_LINK_KEY_ONLINE, loadAttribute(JOIN_LINK_KEY));
}
private static String loadAttribute(String key) {
return loadAttribute(key, StringUtils.EMPTY); return loadAttribute(key, StringUtils.EMPTY);
} }
//加载所有用户的信息, 用户名, 论坛连接 /**
private static String[] loadAllGuestsInfoOnline(String key, String defaultValue) { * 在线加载数组形式的键值值使用|分割
*
* @param key
* @param defaultValue 默认值
* @return
*/
private static String[] loadArrayOnline(String key, String defaultValue) {
String[] allGuests = new String[0]; String[] allGuests = new String[0];
String guest = SiteCenter.getInstance().acquireUrlByKind(key, defaultValue); String guest = SiteCenter.getInstance().acquireUrlByKind(key, defaultValue);
if (StringUtils.isNotEmpty(guest)) { if (StringUtils.isNotEmpty(guest)) {
@ -48,7 +59,22 @@ public class BBSConstants {
} }
return allGuests; return allGuests;
} }
/**
* 在线加载键值
*
* @param key
* @param defaultValue 默认值
* @return
*/
private static String loadAttributeOnline(String key, String defaultValue) {
String value = SiteCenter.getInstance().acquireUrlByKind(key, defaultValue);
if (StringUtils.isEmpty(value)) {
return StringUtils.EMPTY;
}
return value;
}
//如果要定制, 直接改bbs.properties就行了 //如果要定制, 直接改bbs.properties就行了
private static String loadAttribute(String key, String defaultValue) { private static String loadAttribute(String key, String defaultValue) {
if (PROP == null) { if (PROP == null) {

132
designer/src/com/fr/design/mainframe/bbs/BBSGuestPane.java

@ -1,5 +1,5 @@
/** /**
* *
*/ */
package com.fr.design.mainframe.bbs; package com.fr.design.mainframe.bbs;
@ -20,61 +20,83 @@ import java.net.URI;
/** /**
* @author neil * @author neil
*
* @date: 2015-3-13-下午12:54:45 * @date: 2015-3-13-下午12:54:45
*/ */
public class BBSGuestPane extends JPanel implements BBSGuestPaneProvider{ public class BBSGuestPane extends JPanel implements BBSGuestPaneProvider {
/** /**
* 构造函数 * 构造函数
*/ */
public BBSGuestPane() { public BBSGuestPane() {
this.setLayout(FRGUIPaneFactory.createLabelFlowLayout()); this.setLayout(FRGUIPaneFactory.createLabelFlowLayout());
initTableContent(); initTableContent();
} }
private void initTableContent(){ private void initTableContent() {
JPanel guestPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel guestPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
//感谢标签 //感谢标签
JPanel infoPane = initInfoPane(); JPanel infoPane = initInfoPane();
guestPane.add(infoPane, BorderLayout.NORTH); guestPane.add(infoPane, BorderLayout.NORTH);
//用户名+超链 //用户名+超链
JPanel userPane = initUserPane(); JPanel userPane = initUserPane();
guestPane.add(userPane, BorderLayout.CENTER); guestPane.add(userPane, BorderLayout.CENTER);
//如何加入
this.add(guestPane); JPanel howToJoin = initHowToJoinPane();
} guestPane.add(howToJoin, BorderLayout.SOUTH);
private JPanel initUserPane(){ this.add(guestPane);
double p = TableLayout.PREFERRED; }
double[] rowSize = {p, p, p, p, p};
double[] colSize = {p}; private JPanel initUserPane() {
double p = TableLayout.PREFERRED;
Component[][] components = new Component[rowSize.length][colSize.length]; double[] rowSize = {p, p, p, p, p};
String[] allGuest = BBSConstants.getAllGuest(); double[] colSize = {p};
String[] allLink = BBSConstants.getAllLink();
int min = Math.min(allGuest.length, components.length); Component[][] components = new Component[rowSize.length][colSize.length];
for (int i = 0; i < min; i++) { String[] allGuest = BBSConstants.getAllGuest();
String userName = allGuest[i]; String[] allLink = BBSConstants.getAllLink();
String url = allLink[i]; int min = Math.min(allGuest.length, components.length);
components[i][0] = getURLActionLabel(userName, url); for (int i = 0; i < min; i++) {
} String userName = allGuest[i];
String url = allLink[i];
return TableLayoutHelper.createTableLayoutPane(components, rowSize, colSize); JPanel sPane = new JPanel(FRGUIPaneFactory.createLeftZeroLayout());
} sPane.add(getURLActionLabel(userName, url));
components[i][0] = sPane;
private JPanel initInfoPane(){ }
JPanel infoPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
UILabel infoNorthLabel = new UILabel(Inter.getLocText("FR-Designer_Thank_guest")); return TableLayoutHelper.createTableLayoutPane(components, rowSize, colSize);
UILabel centerLabel = new UILabel(StringUtils.BLANK); }
infoPane.add(infoNorthLabel, BorderLayout.NORTH);
infoPane.add(centerLabel, BorderLayout.CENTER); private JPanel initInfoPane() {
JPanel infoPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
return infoPane; UILabel infoNorthLabel = new UILabel(Inter.getLocText("FR-Designer_Thank_guest"));
} UILabel centerLabel = new UILabel(StringUtils.BLANK);
infoPane.add(infoNorthLabel, BorderLayout.NORTH);
private ActionLabel getURLActionLabel(final String text, final String url){ infoPane.add(centerLabel, BorderLayout.CENTER);
ActionLabel actionLabel = new ActionLabel(text);
return infoPane;
}
/**
* Border中嵌套Flow布局Border布局为了空出间隔
* Flow布局为了下划线不会超过文字长度
*/
private JPanel initHowToJoinPane() {
// 超链文字
JPanel infoPane = FRGUIPaneFactory.createBoxFlowInnerContainer_S_Pane_First0();
UILabel infoNorthLabel = getURLActionLabel(Inter.getLocText("FR-Designer_How_To_Join"), BBSConstants.getHowToJoinLink());
infoPane.add(infoNorthLabel);
// 空白行
UILabel centerLabel = new UILabel(StringUtils.BLANK);
JPanel borderPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
borderPane.add(centerLabel, BorderLayout.NORTH);
borderPane.add(infoPane, BorderLayout.CENTER);
return borderPane;
}
private ActionLabel getURLActionLabel(final String text, final String url) {
ActionLabel actionLabel = new ActionLabel(text);
actionLabel.addActionListener(new ActionListener() { actionLabel.addActionListener(new ActionListener() {
@Override @Override
@ -86,7 +108,7 @@ public class BBSGuestPane extends JPanel implements BBSGuestPaneProvider{
} }
} }
}); });
return actionLabel; return actionLabel;
} }
} }

320
designer/src/com/fr/design/mainframe/bbs/UserInfoPane.java

@ -1,5 +1,5 @@
/** /**
* *
*/ */
package com.fr.design.mainframe.bbs; package com.fr.design.mainframe.bbs;
@ -27,157 +27,175 @@ import java.util.Date;
/** /**
* @author neil * @author neil
*
* @date: 2015-3-5-上午11:19:50 * @date: 2015-3-5-上午11:19:50
*/ */
public class UserInfoPane extends BasicPane{ public class UserInfoPane extends BasicPane {
//默认未登录颜色 /**
private static final Color UN_LOGIN_BACKGROUND = UIConstants.TEMPLATE_TAB_PANE_BACKGROUND; * 默认未登录颜色
private static final Color LOGIN_BACKGROUND = new Color(184, 220, 242); */
private static final int WIDTH = 104; private static final Color UN_LOGIN_BACKGROUND = UIConstants.TEMPLATE_TAB_PANE_BACKGROUND;
private static final int HEIGHT = 24; private static final Color LOGIN_BACKGROUND = new Color(184, 220, 242);
private static final int WIDTH = 104;
//登录成功 private static final int HEIGHT = 24;
private static final String LOGININ = "0";
/**
// 登录框弹出间隔时间 * 登录成功
private static final int LOGIN_DIFF_DAY = 7; */
// 等待国际化等相关初始化工作完成之后再弹出登录框 private static final String LOGININ = "0";
private static final int WAIT_TIME = 10000;
/**
private UserInfoLabel userInfoLabel; * 登录框弹出间隔时间
*/
private static final int LOGIN_DIFF_DAY = 7;
public UserInfoLabel getUserInfoLabel() { /**
return userInfoLabel; * 等待国际化等相关初始化工作完成之后再弹出登录框
} */
private static final int WAIT_TIME = 10000;
public void setUserInfoLabel(UserInfoLabel userInfoLabel) {
this.userInfoLabel = userInfoLabel; private UserInfoLabel userInfoLabel;
}
private static UserInfoPane instance = new UserInfoPane();
/**
* 构造函数
*/ public static UserInfoPane getInstance() {
public UserInfoPane() { return instance;
this.setPreferredSize(new Dimension(WIDTH,HEIGHT)); }
this.setLayout(new BorderLayout());
/**
this.userInfoLabel = new UserInfoLabel(this); * 构造函数
*/
this.markUnSignIn(); private UserInfoPane() {
addEnvChangedListener(); this.setPreferredSize(new Dimension(WIDTH, HEIGHT));
autoPushLoginDialog(); this.setLayout(new BorderLayout());
this.add(userInfoLabel, BorderLayout.CENTER); this.userInfoLabel = new UserInfoLabel(this);
}
this.markUnSignIn();
private void addEnvChangedListener(){ addEnvChangedListener();
GeneralContext.addEnvChangedListener(new EnvChangedListener() { autoPushLoginDialog();
@Override
public void envChanged() { this.add(userInfoLabel, BorderLayout.CENTER);
String username = ConfigManager.getProviderInstance().getBbsUsername(); }
if (StringUtils.isEmpty(username)){
markUnSignIn(); public UserInfoLabel getUserInfoLabel() {
} else { return userInfoLabel;
markSignIn(username); }
}
} public void setUserInfoLabel(UserInfoLabel userInfoLabel) {
}); this.userInfoLabel = userInfoLabel;
} }
// 计算xml保存的上次弹框时间和当前时间的时间差 /**
private int getDiffFromLastLogin(){ * 标志未登录状态, 面板设置为灰色
String lastBBSTime = DesignerEnvManager.getEnvManager().getLastShowBBSTime(); */
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); public void markUnSignIn() {
Date lastBBSDate = null; this.userInfoLabel.setText(Inter.getLocText("FR-Base_UnSignIn"));
try { this.userInfoLabel.setOpaque(true);
if(lastBBSTime != null){ this.userInfoLabel.setBackground(UN_LOGIN_BACKGROUND);
synchronized (this) { this.userInfoLabel.resetUserName();
lastBBSDate = sdf.parse(lastBBSTime); }
}
Calendar calender = Calendar.getInstance(); /**
calender.setTime(lastBBSDate); * 标志登陆状态, 面包设置为蓝色
int dayOld = calender.get(Calendar.DAY_OF_YEAR); *
calender.setTime(new Date()); * @param userName 用户名
int dayNew = calender.get(Calendar.DAY_OF_YEAR); */
return dayNew - dayOld; public void markSignIn(String userName) {
} this.userInfoLabel.setText(userName);
} catch (ParseException e) { this.userInfoLabel.setUserName(userName);
FRLogger.getLogger().error(e.getMessage()); this.userInfoLabel.setOpaque(true);
} this.userInfoLabel.setBackground(LOGIN_BACKGROUND);
return 1; }
}
@Override
private void autoPushLoginDialog(){ protected String title4PopupWindow() {
Thread showBBSThread = new Thread(new Runnable() { return StringUtils.EMPTY;
}
@Override
public void run() { private void addEnvChangedListener() {
try { GeneralContext.addEnvChangedListener(new EnvChangedListener() {
// 等国际化等加载完毕再启动线程弹出登录框 @Override
Thread.sleep(WAIT_TIME); public void envChanged() {
if(!FRContext.isChineseEnv()){ String username = ConfigManager.getProviderInstance().getBbsUsername();
return; if (StringUtils.isEmpty(username)) {
} markUnSignIn();
} else {
//七天弹一次, 如果xml中和当前时间相差小于7天, 就不弹了 markSignIn(username);
if(getDiffFromLastLogin() < LOGIN_DIFF_DAY){ }
return; }
} });
}
} catch (InterruptedException e) {
FRContext.getLogger().error(e.getMessage());
} /**
* 计算xml保存的上次弹框时间和当前时间的时间差
String userName = ConfigManager.getProviderInstance().getBbsUsername(); *
if(StringUtils.isNotEmpty(userName)){ * @return 时间差
return; */
} private int getDiffFromLastLogin() {
String lastBBSTime = DesignerEnvManager.getEnvManager().getLastShowBBSTime();
BBSLoginDialog bbsLoginDialog = userInfoLabel.getBbsLoginDialog(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
if(bbsLoginDialog == null){ Date lastBBSDate;
bbsLoginDialog = new BBSLoginDialog(DesignerContext.getDesignerFrame(),userInfoLabel); try {
userInfoLabel.setBbsLoginDialog(bbsLoginDialog); if (lastBBSTime != null) {
} synchronized (this) {
lastBBSDate = sdf.parse(lastBBSTime);
bbsLoginDialog.showWindow(); }
DesignerEnvManager.getEnvManager().setLastShowBBSTime(DateUtils.DATEFORMAT2.format(new Date())); Calendar calender = Calendar.getInstance();
} calender.setTime(lastBBSDate);
int dayOld = calender.get(Calendar.DAY_OF_YEAR);
}); calender.setTime(new Date());
showBBSThread.start(); int dayNew = calender.get(Calendar.DAY_OF_YEAR);
} return dayNew - dayOld;
}
/** } catch (ParseException e) {
* 标志未登录状态, 面板设置为灰色 FRLogger.getLogger().error(e.getMessage());
* }
*/ return 1;
public void markUnSignIn(){ }
this.userInfoLabel.setText(Inter.getLocText("FR-Base_UnSignIn"));
this.userInfoLabel.setOpaque(true); private void autoPushLoginDialog() {
this.userInfoLabel.setBackground(UN_LOGIN_BACKGROUND); Thread showBBSThread = new Thread(new Runnable() {
this.userInfoLabel.resetUserName();
} @Override
public void run() {
/** try {
* 标志登陆状态, 面包设置为蓝色 // 等国际化等加载完毕再启动线程弹出登录框
* @param userName 用户名 Thread.sleep(WAIT_TIME);
* if (!FRContext.isChineseEnv()) {
*/ return;
public void markSignIn(String userName){ }
this.userInfoLabel.setText(userName);
this.userInfoLabel.setUserName(userName); //七天弹一次, 如果xml中和当前时间相差小于7天, 就不弹了
this.userInfoLabel.setOpaque(true); if (getDiffFromLastLogin() < LOGIN_DIFF_DAY) {
this.userInfoLabel.setBackground(LOGIN_BACKGROUND); return;
} }
@Override } catch (InterruptedException e) {
protected String title4PopupWindow() { FRContext.getLogger().error(e.getMessage());
return StringUtils.EMPTY; }
}
String userName = ConfigManager.getProviderInstance().getBbsUsername();
if (StringUtils.isNotEmpty(userName)) {
return;
}
BBSLoginDialog bbsLoginDialog = userInfoLabel.getBbsLoginDialog();
if (bbsLoginDialog == null) {
bbsLoginDialog = new BBSLoginDialog(DesignerContext.getDesignerFrame(), userInfoLabel);
userInfoLabel.setBbsLoginDialog(bbsLoginDialog);
}
bbsLoginDialog.showWindow();
DesignerEnvManager.getEnvManager().setLastShowBBSTime(DateUtils.DATEFORMAT2.format(new Date()));
}
});
showBBSThread.start();
}
} }

1
designer/src/com/fr/design/mainframe/bbs/bbs.properties

@ -7,5 +7,6 @@ GET_SIGN_INFO_URL=http\://bbs.finereport.com
LINK=http\://bbs.fanruan.com/home.php?mod=space&uid=66470&do=profile|http\://bbs.fanruan.com/home.php?mod=space&uid=67190&do=profile|http\://bbs.fanruan.com/home.php?mod=space&uid=65659&do=profile|http\://bbs.fanruan.com/home.php?mod=space&uid=60352&do=profile|http\://bbs.fanruan.com/home.php?mod=space&uid=78157&do=profile LINK=http\://bbs.fanruan.com/home.php?mod=space&uid=66470&do=profile|http\://bbs.fanruan.com/home.php?mod=space&uid=67190&do=profile|http\://bbs.fanruan.com/home.php?mod=space&uid=65659&do=profile|http\://bbs.fanruan.com/home.php?mod=space&uid=60352&do=profile|http\://bbs.fanruan.com/home.php?mod=space&uid=78157&do=profile
SHARE_URL=http\://bbs.finereport.com SHARE_URL=http\://bbs.finereport.com
USER=cherishdqy\uFF08\u9093\u79CB\u4E91\uFF09|yets11\uFF08\u9676\u5B5D\u6587\uFF09|\u661F\u75D5\uFF08\u71D5\u5B8F\u4F1F\uFF09|\u9759\u542C\u7985\u9E23\uFF08\u674E\u51A0\u519B\uFF09|yiyemeiying\uFF08\u5218\u4F73\uFF09 USER=cherishdqy\uFF08\u9093\u79CB\u4E91\uFF09|yets11\uFF08\u9676\u5B5D\u6587\uFF09|\u661F\u75D5\uFF08\u71D5\u5B8F\u4F1F\uFF09|\u9759\u542C\u7985\u9E23\uFF08\u674E\u51A0\u519B\uFF09|yiyemeiying\uFF08\u5218\u4F73\uFF09
JOIN=http\://bbs.fanruan.com/thread-72652-1-1.html
VERIFY_URL=http://www.finereporthelp.com:8081/bbs/ReportServer?op=bbs&cmd=verify VERIFY_URL=http://www.finereporthelp.com:8081/bbs/ReportServer?op=bbs&cmd=verify
UPDATE_INFO_URL=http://bbs.finereport.com/source/plugin/infor/infor.html UPDATE_INFO_URL=http://bbs.finereport.com/source/plugin/infor/infor.html

9
designer/src/com/fr/design/mainframe/form/FormElementCaseDesigner.java

@ -12,8 +12,8 @@ import javax.swing.JComponent;
import javax.swing.JPanel; import javax.swing.JPanel;
import javax.swing.JScrollBar; import javax.swing.JScrollBar;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.actions.AllowAuthorityEditAction; import com.fr.design.actions.AllowAuthorityEditAction;
import com.fr.design.actions.ExitAuthorityEditAction; import com.fr.design.actions.ExitAuthorityEditAction;
@ -30,6 +30,7 @@ import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.design.present.ConditionAttributesGroupPane; import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.form.FormElementCaseProvider; import com.fr.form.FormElementCaseProvider;
import com.fr.form.main.Form;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.Selection; import com.fr.grid.selection.Selection;
@ -50,11 +51,11 @@ public class FormElementCaseDesigner<T extends FormElementCaseProvider, E extend
return elementCasePane; return elementCasePane;
} }
public FormElementCaseDesigner(T sheet) { public FormElementCaseDesigner(T sheet, Form form) {
super(sheet); super(sheet);
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
elementCasePane = new FormElementCasePaneDelegate((FormElementCase) sheet); elementCasePane = new FormElementCasePaneDelegate((FormElementCase) sheet, form);
elementCasePane.setSelection(getDefaultSelectElement()); elementCasePane.setSelection(getDefaultSelectElement());
this.add(elementCasePane, BorderLayout.CENTER); this.add(elementCasePane, BorderLayout.CENTER);
elementCasePane.addTargetModifiedListener(new TargetModifiedListener() { elementCasePane.addTargetModifiedListener(new TargetModifiedListener() {
@ -86,7 +87,7 @@ public class FormElementCaseDesigner<T extends FormElementCaseProvider, E extend
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(new String[]{"DashBoard-Potence", "Edit"})),
BaseUtils.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this), DesignerMode.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this),
}; };
} }

9
designer/src/com/fr/design/mainframe/form/FormElementCasePaneDelegate.java

@ -20,6 +20,8 @@ import com.fr.design.menu.MenuDef;
import com.fr.design.menu.ShortCut; import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef; import com.fr.design.menu.ToolBarDef;
import com.fr.design.present.ConditionAttributesGroupPane; import com.fr.design.present.ConditionAttributesGroupPane;
import com.fr.form.main.Form;
import com.fr.grid.Grid;
import com.fr.js.NameJavaScriptGroup; import com.fr.js.NameJavaScriptGroup;
import com.fr.page.ReportSettingsProvider; import com.fr.page.ReportSettingsProvider;
import com.fr.report.elementcase.TemplateElementCase; import com.fr.report.elementcase.TemplateElementCase;
@ -31,8 +33,13 @@ import com.fr.design.selection.SelectionListener;
*/ */
public class FormElementCasePaneDelegate extends ElementCasePane<FormElementCase>{ public class FormElementCasePaneDelegate extends ElementCasePane<FormElementCase>{
public FormElementCasePaneDelegate(FormElementCase sheet) { public FormElementCasePaneDelegate(FormElementCase sheet, Form form) {
super(sheet); super(sheet);
this.getGrid().setPaginateLineShowType(form.getFormMobileAttr().isMobileOnly()
? Grid.SINGLE_HORIZONTAL_PAGINATE_LINE
: Grid.NO_PAGINATE_LINE);
this.addSelectionChangeListener(new SelectionListener() { this.addSelectionChangeListener(new SelectionListener() {
@Override @Override
public void selectionChanged(SelectionEvent e) { public void selectionChanged(SelectionEvent e) {

5
designer/src/com/fr/design/parameter/ParameterDefinitePane.java

@ -4,6 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.base.parameter.ParameterUI; import com.fr.base.parameter.ParameterUI;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.actions.AllowAuthorityEditAction; import com.fr.design.actions.AllowAuthorityEditAction;
import com.fr.design.actions.ExitAuthorityEditAction; import com.fr.design.actions.ExitAuthorityEditAction;
@ -458,7 +459,7 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
* @return 文件菜单的子菜单 * @return 文件菜单的子菜单
*/ */
public ShortCut[] shortcut4FileMenu() { public ShortCut[] shortcut4FileMenu() {
return (ShortCut[]) ArrayUtils.addAll(BaseUtils.isAuthorityEditing() ? return (ShortCut[]) ArrayUtils.addAll(DesignerMode.isAuthorityEditing() ?
new ShortCut[]{new SaveTemplateAction(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()), new ShortCut[]{new SaveTemplateAction(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()),
new UndoAction(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()), new UndoAction(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()),
new RedoAction(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate())} : new RedoAction(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate())} :
@ -477,7 +478,7 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
*/ */
public MenuDef[] menus4Target() { public MenuDef[] menus4Target() {
MenuDef tplMenu = new MenuDef(KeySetUtils.TEMPLATE.getMenuKeySetName(),KeySetUtils.TEMPLATE.getMnemonic()); MenuDef tplMenu = new MenuDef(KeySetUtils.TEMPLATE.getMenuKeySetName(),KeySetUtils.TEMPLATE.getMnemonic());
if (!BaseUtils.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
tplMenu.addShortCut(new NameSeparator(Inter.getLocText("FR-Utils_WorkBook"))); tplMenu.addShortCut(new NameSeparator(Inter.getLocText("FR-Utils_WorkBook")));
tplMenu.addShortCut(new ReportParameterAction(workBook)); tplMenu.addShortCut(new ReportParameterAction(workBook));
tplMenu.addShortCut(new NameSeparator(Inter.getLocText(new String[]{"DashBoard-Potence", "Edit"}))); tplMenu.addShortCut(new NameSeparator(Inter.getLocText(new String[]{"DashBoard-Potence", "Edit"})));

120
designer/src/com/fr/design/report/PageSetupPane.java

@ -73,14 +73,6 @@ public class PageSetupPane extends BasicPane {
private OtherPane otherPane; private OtherPane otherPane;
private UILabel zeroMarginWarn; private UILabel zeroMarginWarn;
public final static PaperSize MOBILE_SMAIL_SIZE = new PaperSize(new MM(142.8f), new MM(254));
public final static PaperSize MOBILE_LARGE_SIZE = new PaperSize(new MM(190.5f), new MM(338.7f));
public static final Object[][] MOBILE_NAME_SIZE_ARRAY = {
{Inter.getLocText("FR-Designer_PaperSize-Mobile-Large"),MOBILE_LARGE_SIZE},
{Inter.getLocText("FR-Designer_PaperSize-Mobile-Small"),MOBILE_SMAIL_SIZE}
};
public PageSetupPane() { public PageSetupPane() {
this.initComponents(); this.initComponents();
} }
@ -135,12 +127,10 @@ public class PageSetupPane extends BasicPane {
private UIRadioButton landscapeRadioButton; private UIRadioButton landscapeRadioButton;
private UIRadioButton predefinedRadioButton; private UIRadioButton predefinedRadioButton;
private UIRadioButton mobileRadioButton;
private UIRadioButton customRadioButton; private UIRadioButton customRadioButton;
private UIComboBox predefinedComboBox; private UIComboBox predefinedComboBox;
private UIComboBox mobileComboBox;
private UIBasicSpinner paperWidthSpinner; private UIBasicSpinner paperWidthSpinner;
private UIBasicSpinner paperHeightSpinner; private UIBasicSpinner paperHeightSpinner;
private UIComboBox switchInch; private UIComboBox switchInch;
@ -210,20 +200,14 @@ public class PageSetupPane extends BasicPane {
predefinedRadioButton = new UIRadioButton(Inter.getLocText("PageSetup-Predefined") + ":"); predefinedRadioButton = new UIRadioButton(Inter.getLocText("PageSetup-Predefined") + ":");
predefinedRadioButton.setMnemonic('P'); predefinedRadioButton.setMnemonic('P');
predefinedRadioButton.addActionListener(previewListener); predefinedRadioButton.addActionListener(previewListener);
mobileRadioButton = new UIRadioButton(Inter.getLocText("FR-Designer_MobilePhone") + " :");
mobileRadioButton.setMnemonic('M');
mobileRadioButton.addActionListener(previewListener);
customRadioButton = new UIRadioButton(Inter.getLocText("Custom") + ":"); customRadioButton = new UIRadioButton(Inter.getLocText("Custom") + ":");
customRadioButton.setMnemonic('C'); customRadioButton.setMnemonic('C');
customRadioButton.addActionListener(previewListener); customRadioButton.addActionListener(previewListener);
predefinedComboBox = new UIComboBox(); predefinedComboBox = new UIComboBox();
mobileComboBox = new UIComboBox();
paperWidthSpinner = new UIBasicSpinner(new SpinnerNumberModel(0.0, 0.0, Double.MAX_VALUE, 1.0)); paperWidthSpinner = new UIBasicSpinner(new SpinnerNumberModel(0.0, 0.0, Double.MAX_VALUE, 1.0));
((JSpinner.DefaultEditor) paperWidthSpinner.getEditor()).getTextField().setColumns(7); ((JSpinner.DefaultEditor) paperWidthSpinner.getEditor()).getTextField().setColumns(7);
paperHeightSpinner = new UIBasicSpinner(new SpinnerNumberModel(0.0, 0.0, Double.MAX_VALUE, 1.0)); paperHeightSpinner = new UIBasicSpinner(new SpinnerNumberModel(0.0, 0.0, Double.MAX_VALUE, 1.0));
@ -239,9 +223,7 @@ public class PageSetupPane extends BasicPane {
predefinedComboBox.setRenderer(paperSizeCellRenderere); predefinedComboBox.setRenderer(paperSizeCellRenderere);
predefinedComboBox.addItemListener(paperSizeItemListener); predefinedComboBox.addItemListener(paperSizeItemListener);
mobileComboBox.setRenderer(paperSizeMobileCellRenderere);
mobileComboBox.addItemListener(paperSizeItemMobileListener);
((JSpinner.DefaultEditor) paperWidthSpinner.getEditor()).getTextField().getDocument().addDocumentListener(customTextListener); ((JSpinner.DefaultEditor) paperWidthSpinner.getEditor()).getTextField().getDocument().addDocumentListener(customTextListener);
((JSpinner.DefaultEditor) paperHeightSpinner.getEditor()).getTextField().getDocument().addDocumentListener(customTextListener); ((JSpinner.DefaultEditor) paperHeightSpinner.getEditor()).getTextField().getDocument().addDocumentListener(customTextListener);
@ -253,12 +235,6 @@ public class PageSetupPane extends BasicPane {
Object[] tmpPaperSizeNameArray = ReportConstants.PaperSizeNameSizeArray[i]; Object[] tmpPaperSizeNameArray = ReportConstants.PaperSizeNameSizeArray[i];
predefinedComboBox.addItem(tmpPaperSizeNameArray[1]); predefinedComboBox.addItem(tmpPaperSizeNameArray[1]);
} }
for(int i=0; i<MOBILE_NAME_SIZE_ARRAY.length;i++){
Object[] tmpPaperSizeNameArray = MOBILE_NAME_SIZE_ARRAY[i];
mobileComboBox.addItem(tmpPaperSizeNameArray[1]);
}
// tow radio buttons. // tow radio buttons.
JPanel radioButtonPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); JPanel radioButtonPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
@ -266,17 +242,9 @@ public class PageSetupPane extends BasicPane {
radioButtonPane.add(predefinedRadioButton); radioButtonPane.add(predefinedRadioButton);
radioButtonPane.add(predefinedComboBox); radioButtonPane.add(predefinedComboBox);
// tow radio buttons.
JPanel mobileButtonPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
innerpaperSizePane.add(mobileButtonPane);
mobileButtonPane.add(mobileRadioButton);
mobileButtonPane.add(mobileComboBox);
ButtonGroup paperSizeRadioButtonGroup = new ButtonGroup(); ButtonGroup paperSizeRadioButtonGroup = new ButtonGroup();
paperSizeRadioButtonGroup.add(predefinedRadioButton); paperSizeRadioButtonGroup.add(predefinedRadioButton);
paperSizeRadioButtonGroup.add(mobileRadioButton);
paperSizeRadioButtonGroup.add(customRadioButton); paperSizeRadioButtonGroup.add(customRadioButton);
// size and textfields. // size and textfields.
@ -457,17 +425,27 @@ public class PageSetupPane extends BasicPane {
break; break;
} }
} }
for(int i=0; i<MOBILE_NAME_SIZE_ARRAY.length; i++){
Object[] mobileNameSizeArray = MOBILE_NAME_SIZE_ARRAY[i];
if(ComparatorUtils.equals(paperSize, mobileNameSizeArray[1])){
this.mobileComboBox.setSelectedIndex(i);
this.mobileRadioButton.setSelected(true);
isCustomed = false;
break;
}
}
setAndPopulate(isCustomed, unitType); setAndPopulate(isCustomed, unitType);
populateMargin(); populateMargin();
checkMobileSetting(report);
}
private void checkMobileSetting(Report report) {
if (report.getBook().getReportMobileAttr().isMobileCanvasSize()) {
// 当勾选移动端画布大小后,自定义选项不可修改;限制宽度范围
predefinedRadioButton.setEnabled(false);
predefinedComboBox.setEnabled(false);
double maxWidth;
if (unitType == Constants.UNIT_MM) { // 毫米
maxWidth = PaperSize.PAPERSIZE_MOBILE.getWidth().toMMValue4Scale2();
} else { // 英寸
maxWidth = PaperSize.PAPERSIZE_MOBILE.getWidth().toINCHValue4Scale3();
}
maxWidth = Math.round(maxWidth * 100) / 100.0; // 保留两位小数
((SpinnerNumberModel)paperWidthSpinner.getModel()).setMaximum(maxWidth);
}
} }
private void unitSet(int unitType) { private void unitSet(int unitType) {
@ -539,13 +517,6 @@ public class PageSetupPane extends BasicPane {
} catch (CloneNotSupportedException cloneNotSupportedException) { } catch (CloneNotSupportedException cloneNotSupportedException) {
// do nothing // do nothing
} }
}else if(this.mobileRadioButton.isSelected()){
try {
psetting.setPaperSize((PaperSize) ((PaperSize) mobileComboBox.getSelectedItem()).clone());
} catch (CloneNotSupportedException cloneNotSupportedException) {
// do nothing
}
} else if (this.customRadioButton.isSelected()) { } else if (this.customRadioButton.isSelected()) {
if (unitType == Constants.UNIT_CM) { if (unitType == Constants.UNIT_CM) {
psetting.setPaperSize(new PaperSize(new CM(((Number) this.paperWidthSpinner.getValue()).floatValue()), new CM( psetting.setPaperSize(new PaperSize(new CM(((Number) this.paperWidthSpinner.getValue()).floatValue()), new CM(
@ -616,10 +587,7 @@ public class PageSetupPane extends BasicPane {
if (this.predefinedRadioButton.isSelected()) { if (this.predefinedRadioButton.isSelected()) {
ps = (PaperSize) predefinedComboBox.getSelectedItem(); ps = (PaperSize) predefinedComboBox.getSelectedItem();
showPagePaneByType(ps,ori); showPagePaneByType(ps,ori);
} else if(this.mobileRadioButton.isSelected()){ } else if (this.customRadioButton.isSelected()) {
ps = (PaperSize) mobileComboBox.getSelectedItem();
showPagePaneByType(ps, ori);
}else if (this.customRadioButton.isSelected()) {
showPagePane.populate(((Number) this.paperWidthSpinner.getValue()).doubleValue(), showPagePane.populate(((Number) this.paperWidthSpinner.getValue()).doubleValue(),
((Number) this.paperHeightSpinner.getValue()).doubleValue(), ori, unitType == Constants.UNIT_MM); ((Number) this.paperHeightSpinner.getValue()).doubleValue(), ori, unitType == Constants.UNIT_MM);
} }
@ -691,34 +659,6 @@ public class PageSetupPane extends BasicPane {
} }
sbuf.append(']'); sbuf.append(']');
} }
/**
* Paper size cell renderer.
*/
private UIComboBoxRenderer paperSizeMobileCellRenderere = new UIComboBoxRenderer() {
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (value instanceof PaperSize) {
PaperSize paperSize = (PaperSize) value;
for (int i = 0; i < MOBILE_NAME_SIZE_ARRAY.length; i++) {
Object[] tmpPaperSizeNameArray = MOBILE_NAME_SIZE_ARRAY[i];
if (ComparatorUtils.equals(paperSize, tmpPaperSizeNameArray[1])) {
StringBuffer sbuf = new StringBuffer(tmpPaperSizeNameArray[0].toString());
adjustCellRenderByType(sbuf,paperSize);
this.setText(sbuf.toString());
break;
}
}
}
return this;
}
};
/** /**
* Paper size item listener. * Paper size item listener.
@ -744,18 +684,6 @@ public class PageSetupPane extends BasicPane {
paperHeightSpinner.setValue(new Float(paperSize.getHeight().toMMValue4Scale2())); paperHeightSpinner.setValue(new Float(paperSize.getHeight().toMMValue4Scale2()));
} }
} }
/**
* Paper size item listener.
*/
private ItemListener paperSizeItemMobileListener = new ItemListener() {
public void itemStateChanged(ItemEvent evt) {
PaperSize paperSize = (PaperSize) mobileComboBox.getSelectedItem();
adjustSpinnerValueByType(paperSize);
mobileRadioButton.setSelected(true);
previewShowPagePane();
}
};
// text listener. // text listener.
DocumentListener customTextListener = new DocumentListener() { DocumentListener customTextListener = new DocumentListener() {

27
designer/src/com/fr/design/report/ReportBackgroundPane.java

@ -1,16 +1,18 @@
package com.fr.design.report; package com.fr.design.report;
import java.awt.BorderLayout; import com.fr.design.dialog.BasicPane;
import com.fr.page.ReportSettingsProvider;
import com.fr.design.gui.icheckbox.UICheckBox; import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.dialog.BasicPane;
import com.fr.general.Inter;
import com.fr.design.style.background.BackgroundPane; import com.fr.design.style.background.BackgroundPane;
import com.fr.general.Inter;
import com.fr.page.ReportSettingsProvider;
import javax.swing.JPanel;
import java.awt.BorderLayout;
public class ReportBackgroundPane extends BasicPane { public class ReportBackgroundPane extends BasicPane {
private UICheckBox isPrintBackgroundCheckBox; private UICheckBox isPrintBackgroundCheckBox;
private UICheckBox isExportBackgroundCheckBox;
private BackgroundPane backgroundPane; private BackgroundPane backgroundPane;
public ReportBackgroundPane() { public ReportBackgroundPane() {
@ -19,14 +21,17 @@ public class ReportBackgroundPane extends BasicPane {
backgroundPane = new BackgroundPane(); backgroundPane = new BackgroundPane();
this.add(backgroundPane, BorderLayout.CENTER); this.add(backgroundPane, BorderLayout.CENTER);
isPrintBackgroundCheckBox = new UICheckBox( isPrintBackgroundCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Print_Background"));
Inter.getLocText("ReportGUI-Print_Background")); isExportBackgroundCheckBox = new UICheckBox(Inter.getLocText("FR-Designer_Export_Background"));
this.add(isPrintBackgroundCheckBox, BorderLayout.SOUTH); JPanel sourth = new JPanel();
sourth.add(isExportBackgroundCheckBox);
sourth.add(isPrintBackgroundCheckBox);
this.add(sourth, BorderLayout.SOUTH);
} }
@Override @Override
protected String title4PopupWindow() { protected String title4PopupWindow() {
return Inter.getLocText(new String[]{"paper", "Background"}); return Inter.getLocText(new String[]{"paper", "Background"});
} }
/** /**
@ -35,6 +40,7 @@ public class ReportBackgroundPane extends BasicPane {
public void populate(ReportSettingsProvider reportSettings) { public void populate(ReportSettingsProvider reportSettings) {
this.backgroundPane.populate(reportSettings.getBackground()); this.backgroundPane.populate(reportSettings.getBackground());
this.isPrintBackgroundCheckBox.setSelected(reportSettings.isPrintBackground()); this.isPrintBackgroundCheckBox.setSelected(reportSettings.isPrintBackground());
this.isExportBackgroundCheckBox.setSelected(reportSettings.isExportBackground());
} }
/** /**
@ -43,5 +49,6 @@ public class ReportBackgroundPane extends BasicPane {
public void update(ReportSettingsProvider reportSettings) { public void update(ReportSettingsProvider reportSettings) {
reportSettings.setBackground(this.backgroundPane.update()); reportSettings.setBackground(this.backgroundPane.update());
reportSettings.setPrintBackground(this.isPrintBackgroundCheckBox.isSelected()); reportSettings.setPrintBackground(this.isPrintBackgroundCheckBox.isSelected());
reportSettings.setExportBackground(this.isExportBackgroundCheckBox.isSelected());
} }
} }

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

@ -12,9 +12,8 @@ import javax.swing.*;
*/ */
public class ReportMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{ public class ReportMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{
private ReportMobileTemplateSettingsPane reportMobileTemplateSettingsPane; // 模版设置面板
private AppFitBrowserPane appFitBrowserPane; private AppFitBrowserPane appFitBrowserPane;
//工具栏容器 //工具栏容器
private MobileToolBarPane mobileToolBarPane; private MobileToolBarPane mobileToolBarPane;
@ -28,6 +27,10 @@ public class ReportMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{
JPanel jPanel = new JPanel(); JPanel jPanel = new JPanel();
jPanel.setLayout(new BoxLayout(jPanel, BoxLayout.Y_AXIS)); jPanel.setLayout(new BoxLayout(jPanel, BoxLayout.Y_AXIS));
jPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10)); jPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
reportMobileTemplateSettingsPane = new ReportMobileTemplateSettingsPane();
jPanel.add(reportMobileTemplateSettingsPane);
appFitBrowserPane = new AppFitBrowserPane(); appFitBrowserPane = new AppFitBrowserPane();
appFitBrowserPane.setAppFitPreviewPane(appFitPreviewPane); appFitBrowserPane.setAppFitPreviewPane(appFitPreviewPane);
jPanel.add(appFitBrowserPane); jPanel.add(appFitBrowserPane);
@ -46,13 +49,14 @@ public class ReportMobileAttrPane extends BasicBeanPane<ElementCaseMobileAttr>{
} }
appFitBrowserPane.populateBean(ob); appFitBrowserPane.populateBean(ob);
mobileToolBarPane.populateBean(ob); mobileToolBarPane.populateBean(ob);
reportMobileTemplateSettingsPane.populateBean(ob);
} }
@Override @Override
public ElementCaseMobileAttr updateBean() { public ElementCaseMobileAttr updateBean() {
ElementCaseMobileAttr caseMobileAttr = appFitBrowserPane.updateBean(); ElementCaseMobileAttr caseMobileAttr = appFitBrowserPane.updateBean();
mobileToolBarPane.updateBean(caseMobileAttr); mobileToolBarPane.updateBean(caseMobileAttr);
reportMobileTemplateSettingsPane.updateBean(caseMobileAttr);
return caseMobileAttr; return caseMobileAttr;
} }

102
designer/src/com/fr/design/report/mobile/ReportMobileTemplateSettingsPane.java

@ -0,0 +1,102 @@
package com.fr.design.report.mobile;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.Inter;
import com.fr.report.mobile.ElementCaseMobileAttr;
import javax.swing.*;
import java.awt.*;
/**
* Created by plough on 2018/1/8.
*/
public class ReportMobileTemplateSettingsPane extends BasicBeanPane<ElementCaseMobileAttr> {
private UICheckBox mobileCanvasSizeCheck; // 设置为手机模版画布大小
public ReportMobileTemplateSettingsPane() {
this.initComponents();
}
private void initComponents() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
JPanel borderPane = FRGUIPaneFactory.createTitledBorderPane(this.title4PopupWindow());
JPanel contentPane = new JPanel(FRGUIPaneFactory.createBorderLayout());
contentPane.setBorder(BorderFactory.createEmptyBorder(0, IntervalConstants.INTERVAL_L2, 0, 0));
contentPane.add(getMobileCanvasSizeCheckPane(), BorderLayout.CENTER);
borderPane.add(contentPane);
this.add(borderPane);
}
private JPanel getMobileCanvasSizeCheckPane() {
JPanel panel = new JPanel(FRGUIPaneFactory.createBorderLayout());
mobileCanvasSizeCheck = new UICheckBox(Inter.getLocText("FR-Designer_Set_Mobile_Canvas_Size"));
panel.add(mobileCanvasSizeCheck, BorderLayout.NORTH);
panel.add(getCanvasDescPane(), BorderLayout.CENTER);
panel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, IntervalConstants.INTERVAL_L6, 0));
return panel;
}
private JPanel getCanvasDescPane() {
UILabel desc1 = createDescLabel(Inter.getLocText("FR-Designer_Mobile_Screen_Match_Desc"));
UILabel desc2 = createDescLabel(Inter.getLocText("FR-Designer_Mobile_Screen_Zoom_In_Desc"));
UILabel desc3 = createDescLabel(Inter.getLocText("FR-Designer_Mobile_Screen_Zoom_Out_Desc"));
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}};
Component[][] components = new Component[][]{
new Component[]{desc1, null},
new Component[]{desc2, null},
new Component[]{desc3, null}
};
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, IntervalConstants.INTERVAL_W0, IntervalConstants.INTERVAL_L1);
panel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L7, IntervalConstants.INTERVAL_W4, IntervalConstants.INTERVAL_L1, 0));
return panel;
}
private UILabel createDescLabel(String desc) {
UILabel label = new UILabel(desc);
label.setForeground(Color.gray);
return label;
}
@Override
public void populateBean(ElementCaseMobileAttr ob) {
if (ob == null) {
ob = new ElementCaseMobileAttr();
}
mobileCanvasSizeCheck.setSelected(ob.isMobileCanvasSize());
}
@Override
public ElementCaseMobileAttr updateBean() {
ElementCaseMobileAttr mobileAttr = new ElementCaseMobileAttr();
mobileAttr.setMobileCanvasSize(mobileCanvasSizeCheck.isSelected());
return mobileAttr;
}
@Override
public void updateBean(ElementCaseMobileAttr mobileAttr) {
if(mobileAttr != null) {
mobileAttr.setMobileCanvasSize(mobileCanvasSizeCheck.isSelected());
}
}
@Override
protected String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Template_Settings");
}
}

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

@ -32,7 +32,7 @@ public class ReportWebWidgetConstants {
public static WidgetOption[] getWriteToolBarInstance() { public static WidgetOption[] getWriteToolBarInstance() {
return new WidgetOption[]{SUBMIT, VERIFY, EMAIL, EXPORT, PDF, EXCELP, EXCELO, EXCELS, WORD, PRINT, FLASHPRINT, APPLETPRINT, PDFPRINT, IMPORTEXCELDATA, SHOWCELLVALUE, return new WidgetOption[]{SUBMIT, VERIFY, EMAIL, EXPORT, PDF, EXCELP, EXCELO, EXCELS, WORD, PRINT, FLASHPRINT, APPLETPRINT, PDFPRINT, IMPORTEXCELDATA, SHOWCELLVALUE,
APPENDCOLUMNROW, DELETECOLUMNROW, SETPRINTEROFFSET, WRITEOFFLINEHTML, CUSTOM_BUTTON, WRITESTASH, WRITESTASHCLEAR, IMPORTEXCELDATA_CUSTOMIZED, APPENDCOLUMNROW, DELETECOLUMNROW, SETPRINTEROFFSET, CUSTOM_BUTTON, WRITESTASH, WRITESTASHCLEAR, IMPORTEXCELDATA_CUSTOMIZED,
IMPORTEXCEL, IMPORTEXCEL_COVER, IMPORTEXCEL_CLEAN, IMPORTEXCEL_APPEND}; IMPORTEXCEL, IMPORTEXCEL_COVER, IMPORTEXCEL_CLEAN, IMPORTEXCEL_APPEND};
} }

4
designer/src/com/fr/design/webattr/ToolBarButton.java

@ -1,6 +1,6 @@
package com.fr.design.webattr; package com.fr.design.webattr;
import com.fr.base.BaseUtils; import com.fr.base.vcs.DesignerMode;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
@ -90,7 +90,7 @@ public class ToolBarButton extends UIButton implements MouseListener {
* @param e 鼠标点击事件 * @param e 鼠标点击事件
*/ */
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
auhtorityMouseAction(); auhtorityMouseAction();
return; return;
} }

6
designer/src/com/fr/grid/AbstractGridHeaderMouseHandler.java

@ -18,7 +18,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList; import com.fr.base.DynamicUnitList;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.Utils; import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.gui.imenu.UIPopupMenu; import com.fr.design.gui.imenu.UIPopupMenu;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
@ -417,7 +417,7 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter {
this.setToolTipText2(this.getSelectedHeaderTooltip(Math.abs(startMultiSelectIndex - endMultiSelectIndex) + 1)); this.setToolTipText2(this.getSelectedHeaderTooltip(Math.abs(startMultiSelectIndex - endMultiSelectIndex) + 1));
} else if (dragType == GridUtils.DRAG_CELL_SIZE) { } else if (dragType == GridUtils.DRAG_CELL_SIZE) {
//权限编辑状态不可以改变行列的宽度 //权限编辑状态不可以改变行列的宽度
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
if (!(isDragPermited)) { if (!(isDragPermited)) {
@ -488,7 +488,7 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter {
tmpIncreaseSize = sizeList.get(i).toPixD(resolution); tmpIncreaseSize = sizeList.get(i).toPixD(resolution);
tmpSize2 = tmpIncreaseSize <= 0 ? tmpSize1 + 1 : tmpSize1 + tmpIncreaseSize; tmpSize2 = tmpIncreaseSize <= 0 ? tmpSize1 + 1 : tmpSize1 + tmpIncreaseSize;
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
break; break;
} }

36
designer/src/com/fr/grid/Grid.java

@ -48,6 +48,9 @@ public class Grid extends BaseGridComponent {
/** /**
* If editing, the <code>Component</code> that is handling the editing. * If editing, the <code>Component</code> that is handling the editing.
*/ */
public static final int NO_PAGINATE_LINE = 0; // 不显示分页线
public static final int MULTIPLE_PAGINATE_LINE = 1; // 绘制多条分页线
public static final int SINGLE_HORIZONTAL_PAGINATE_LINE = 2; // 仅绘制一条水平分页线
private static final int VERTICAL_EXTENT_INITIAL_VALUE = 50; private static final int VERTICAL_EXTENT_INITIAL_VALUE = 50;
private static final int HORIZONTAL_EXTENT_INITIAL_VALUE = 40; private static final int HORIZONTAL_EXTENT_INITIAL_VALUE = 40;
transient protected Component editorComponent; transient protected Component editorComponent;
@ -57,7 +60,7 @@ public class Grid extends BaseGridComponent {
private boolean showGridLine = true; private boolean showGridLine = true;
private Color gridLineColor = UIConstants.RULER_LINE_COLOR; // line color. private Color gridLineColor = UIConstants.RULER_LINE_COLOR; // line color.
private boolean isShowPaginateLine = true; private int paginateLineShowType = MULTIPLE_PAGINATE_LINE; // 分页线类型
private Color paginationLineColor = Color.RED; // line color of paper private Color paginationLineColor = Color.RED; // line color of paper
private boolean isShowVerticalFrozenLine = true; private boolean isShowVerticalFrozenLine = true;
@ -202,25 +205,6 @@ public class Grid extends BaseGridComponent {
this.getElementCasePane().repaint(); this.getElementCasePane().repaint();
} }
/**
* 是否显示分页线
*
* @return 是否显示分页线
* @date 2014-12-21-下午6:31:45
*/
public boolean isShowPaginateLine() {
return isShowPaginateLine;
}
/**
* Sets to show pagination line.
*/
public void setShowPaginateLine(boolean showPaginateLine) {
this.isShowPaginateLine = showPaginateLine;
this.getElementCasePane().repaint();
}
/** /**
* Gets pagination line color. * Gets pagination line color.
*/ */
@ -1432,8 +1416,12 @@ public class Grid extends BaseGridComponent {
this.tooltipLocation.setLocation(x, y); this.tooltipLocation.setLocation(x, y);
} }
// @Override public int getPaginateLineShowType() {
// public void requestFocus() { return paginateLineShowType;
// super.requestFocus(); }
// }
public void setPaginateLineShowType(int paginateLineShowType) {
this.paginateLineShowType = paginateLineShowType;
this.getElementCasePane().repaint();
}
} }

4
designer/src/com/fr/grid/GridColumnUI.java

@ -9,10 +9,10 @@ import javax.swing.JComponent;
import javax.swing.UIManager; import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ComponentUI;
import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList; import com.fr.base.DynamicUnitList;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.cache.list.IntList; import com.fr.cache.list.IntList;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
@ -132,7 +132,7 @@ public class GridColumnUI extends ComponentUI {
} }
private void drawAuthority(ElementCase elementCase, Graphics2D g2d, double tmpWidth1, double tmpIncreaseWidth, Dimension size, int i) { private void drawAuthority(ElementCase elementCase, Graphics2D g2d, double tmpWidth1, double tmpIncreaseWidth, Dimension size, int i) {
boolean isAuthorityEdited = BaseUtils.isAuthorityEditing(); boolean isAuthorityEdited = DesignerMode.isAuthorityEditing();
if (isAuthorityEdited) { if (isAuthorityEdited) {
ColumnRowPrivilegeControl cpc = elementCase.getColumnPrivilegeControl(i); ColumnRowPrivilegeControl cpc = elementCase.getColumnPrivilegeControl(i);
String selectedRoles = ReportAndFSManagePane.getInstance().getRoleTree().getSelectedRoleName(); String selectedRoles = ReportAndFSManagePane.getInstance().getRoleTree().getSelectedRoleName();

14
designer/src/com/fr/grid/GridMouseAdapter.java

@ -3,13 +3,13 @@ package com.fr.grid;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList; import com.fr.base.DynamicUnitList;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.EastRegionContainerPane; import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.mainframe.JSliderPane; import com.fr.design.mainframe.JSliderPane;
import com.fr.design.present.CellWriteAttrPane;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.grid.selection.CellSelection; import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.FloatSelection; import com.fr.grid.selection.FloatSelection;
@ -157,7 +157,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous
* 处理左击事件 * 处理左击事件
*/ */
private void doWithLeftButtonPressed(MouseEvent evt) { private void doWithLeftButtonPressed(MouseEvent evt) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
grid.setEditable(false); grid.setEditable(false);
} }
@ -188,10 +188,10 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous
// 得到点击所在的column and row // 得到点击所在的column and row
ColumnRow columnRow = GridUtils.getEventColumnRow_withresolution(reportPane, this.oldEvtX, this.oldEvtY, this.resolution); ColumnRow columnRow = GridUtils.getEventColumnRow_withresolution(reportPane, this.oldEvtX, this.oldEvtY, this.resolution);
TemplateCellElement cellElement = report.getTemplateCellElement(columnRow.getColumn(), columnRow.getRow()); TemplateCellElement cellElement = report.getTemplateCellElement(columnRow.getColumn(), columnRow.getRow());
if (clickCount >= 2 && !BaseUtils.isAuthorityEditing()) { if (clickCount >= 2 && !DesignerMode.isAuthorityEditing()) {
grid.startEditing(); grid.startEditing();
} }
if (clickCount == 1 && cellElement != null && cellElement.getWidget() != null && !BaseUtils.isAuthorityEditing()) { if (clickCount == 1 && cellElement != null && cellElement.getWidget() != null && !DesignerMode.isAuthorityEditing()) {
showWidetWindow(cellElement, report); showWidetWindow(cellElement, report);
} }
reportPane.repaint(); reportPane.repaint();
@ -362,12 +362,12 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous
} }
Selection selection = reportPane.getSelection(); Selection selection = reportPane.getSelection();
if (selection instanceof FloatSelection && !BaseUtils.isAuthorityEditing()) { if (selection instanceof FloatSelection && !DesignerMode.isAuthorityEditing()) {
doWithFloatElementDragged(evtX, evtY, (FloatSelection) selection); doWithFloatElementDragged(evtX, evtY, (FloatSelection) selection);
grid.setDragType(GridUtils.DRAG_FLOAT); grid.setDragType(GridUtils.DRAG_FLOAT);
} else if (grid.getDragType() == GridUtils.DRAG_CELLSELECTION_BOTTOMRIGHT_CORNER && !BaseUtils.isAuthorityEditing()) { } else if (grid.getDragType() == GridUtils.DRAG_CELLSELECTION_BOTTOMRIGHT_CORNER && !DesignerMode.isAuthorityEditing()) {
doWithCellElementDragged(evtX, evtY, (CellSelection) selection); doWithCellElementDragged(evtX, evtY, (CellSelection) selection);
} else if (grid.getDragType() == GridUtils.DRAG_CELLSELECTION && !BaseUtils.isAuthorityEditing()) { } else if (grid.getDragType() == GridUtils.DRAG_CELLSELECTION && !DesignerMode.isAuthorityEditing()) {
// peter:获得调整过的Selected Column Row. // peter:获得调整过的Selected Column Row.
ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(reportPane, evtX, evtY, resolution); ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(reportPane, evtX, evtY, resolution);
if (selectedCellPoint.getColumn() != grid.getDragRectangle().x || selectedCellPoint.getRow() != grid.getDragRectangle().y) { if (selectedCellPoint.getColumn() != grid.getDragRectangle().x || selectedCellPoint.getRow() != grid.getDragRectangle().y) {

4
designer/src/com/fr/grid/GridRowUI.java

@ -8,10 +8,10 @@ import javax.swing.JComponent;
import javax.swing.UIManager; import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ComponentUI;
import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList; import com.fr.base.DynamicUnitList;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.cache.list.IntList; import com.fr.cache.list.IntList;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
@ -137,7 +137,7 @@ public class GridRowUI extends ComponentUI {
} }
private void drawAuthority(ElementCase elementCase, Graphics2D g2d, double tmpHeight1, double tmpIncreaseHeight, Dimension size, int i) { private void drawAuthority(ElementCase elementCase, Graphics2D g2d, double tmpHeight1, double tmpIncreaseHeight, Dimension size, int i) {
boolean isAuthorityEdited = BaseUtils.isAuthorityEditing(); boolean isAuthorityEdited = DesignerMode.isAuthorityEditing();
if (isAuthorityEdited) { if (isAuthorityEdited) {
ColumnRowPrivilegeControl cpc = elementCase.getRowPrivilegeControl(i); ColumnRowPrivilegeControl cpc = elementCase.getRowPrivilegeControl(i);
String selectedRoles = ReportAndFSManagePane.getInstance().getRoleTree().getSelectedRoleName(); String selectedRoles = ReportAndFSManagePane.getInstance().getRoleTree().getSelectedRoleName();

30
designer/src/com/fr/grid/GridUI.java

@ -1,7 +1,6 @@
package com.fr.grid; package com.fr.grid;
import com.fr.base.BaseFormula; import com.fr.base.BaseFormula;
import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList; import com.fr.base.DynamicUnitList;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
@ -10,6 +9,7 @@ import com.fr.base.PaperSize;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.base.background.ColorBackground; import com.fr.base.background.ColorBackground;
import com.fr.base.background.ImageBackground; import com.fr.base.background.ImageBackground;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
@ -41,9 +41,7 @@ import com.fr.report.worksheet.FormElementCase;
import com.fr.report.worksheet.WorkSheet; import com.fr.report.worksheet.WorkSheet;
import com.fr.stable.ColumnRow; import com.fr.stable.ColumnRow;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.script.CalculatorUtils;
import com.fr.stable.unit.FU; import com.fr.stable.unit.FU;
import com.fr.third.antlr.ANTLRException;
import javax.swing.*; import javax.swing.*;
import javax.swing.plaf.ComponentUI; import javax.swing.plaf.ComponentUI;
@ -127,7 +125,7 @@ public class GridUI extends ComponentUI {
// richer;聚合报表设计中,最初的ElementCase还没有加到Report中,所以elementCase.getReport()可能为空 // richer;聚合报表设计中,最初的ElementCase还没有加到Report中,所以elementCase.getReport()可能为空
ReportSettingsProvider reportSettings = getReportSettings(elementCase); ReportSettingsProvider reportSettings = getReportSettings(elementCase);
PaperSettingProvider psetting = reportSettings.getPaperSetting(); PaperSettingProvider psetting = reportSettings.getPaperSetting();
if (grid.isShowPaginateLine()) {// paint paper margin line. if (grid.getPaginateLineShowType() != Grid.NO_PAGINATE_LINE) {// paint paper margin line.
PaperSize paperSize = psetting.getPaperSize(); PaperSize paperSize = psetting.getPaperSize();
Margin margin = psetting.getMargin(); Margin margin = psetting.getMargin();
@ -173,7 +171,7 @@ public class GridUI extends ComponentUI {
private void paintScrollBackground(Graphics2D g2d, Grid grid, Background background, PaperSettingProvider psetting, ReportSettingsProvider reportSettings) { private void paintScrollBackground(Graphics2D g2d, Grid grid, Background background, PaperSettingProvider psetting, ReportSettingsProvider reportSettings) {
boolean isCanDrawImage = grid.isEditable() || isAuthority; boolean isCanDrawImage = grid.isEditable() || isAuthority;
if (isCanDrawImage && (background instanceof ImageBackground)) { if (isCanDrawImage && (background instanceof ImageBackground)) {
if (!grid.isShowPaginateLine()) { if (grid.getPaginateLineShowType() == Grid.NO_PAGINATE_LINE) {
calculatePaper(psetting, reportSettings); calculatePaper(psetting, reportSettings);
} }
@ -239,12 +237,15 @@ public class GridUI extends ComponentUI {
// 分页线 // 分页线
paginateLineList.clear(); paginateLineList.clear();
boolean isShowVerticalPaginateLine = grid.getPaginateLineShowType() == Grid.MULTIPLE_PAGINATE_LINE;
boolean isShowHorizontalPaginateLine = grid.getPaginateLineShowType() != Grid.NO_PAGINATE_LINE;
new DrawVerticalLineHelper(grid.getVerticalBeginValue(), verticalEndValue, new DrawVerticalLineHelper(grid.getVerticalBeginValue(), verticalEndValue,
grid.isShowGridLine(), grid.isShowPaginateLine(), rowHeightList, paperPaintHeight, grid.isShowGridLine(), isShowVerticalPaginateLine, rowHeightList, paperPaintHeight,
paginateLineList, realWidth, resolution).iterateStart2End(g2d); paginateLineList, realWidth, resolution).iterateStart2End(g2d);
new DrawHorizontalLineHelper(grid.getHorizontalBeginValue(), horizontalEndValue, new DrawHorizontalLineHelper(grid.getHorizontalBeginValue(), horizontalEndValue,
grid.isShowGridLine(), grid.isShowPaginateLine(), columnWidthList, paperPaintWidth, grid.isShowGridLine(), isShowHorizontalPaginateLine, columnWidthList, paperPaintWidth,
paginateLineList, realHeight, resolution).iterateStart2End(g2d); paginateLineList, realHeight, resolution).iterateStart2End(g2d);
} }
@ -583,11 +584,6 @@ public class GridUI extends ComponentUI {
} }
private void paintPaginateLines(Graphics g, Grid grid) { private void paintPaginateLines(Graphics g, Grid grid) {
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if(!jTemplate.isJWorkBook()){
//报表块无分页之说
return;
}
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
// james 画分页线 // james 画分页线
@ -614,8 +610,12 @@ public class GridUI extends ComponentUI {
//g2d.setXORMode(Utils.getXORColor(grid.getPaginationLineColor())); //g2d.setXORMode(Utils.getXORColor(grid.getPaginationLineColor()));
GraphHelper.setStroke(g2d, GraphHelper.getStroke(Constants.LINE_DASH_DOT)); GraphHelper.setStroke(g2d, GraphHelper.getStroke(Constants.LINE_DASH_DOT));
for (int i = 0, len = paginateLineList.size(); i < len; i++) { if (grid.getPaginateLineShowType() == Grid.SINGLE_HORIZONTAL_PAGINATE_LINE) {
g2d.draw((Shape) paginateLineList.get(i)); g2d.draw((Shape) paginateLineList.get(0));
} else {
for (int i = 0, len = paginateLineList.size(); i < len; i++) {
g2d.draw((Shape) paginateLineList.get(i));
}
} }
g2d.setPaintMode(); g2d.setPaintMode();
@ -1037,7 +1037,7 @@ public class GridUI extends ComponentUI {
throw new IllegalArgumentException("The component c to paint must be a Grid!"); throw new IllegalArgumentException("The component c to paint must be a Grid!");
} }
isAuthority = BaseUtils.isAuthorityEditing(); isAuthority = DesignerMode.isAuthorityEditing();
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;

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

@ -5,6 +5,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.ConfigManager; import com.fr.base.ConfigManager;
import com.fr.base.NameStyle; import com.fr.base.NameStyle;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.base.vcs.DesignerMode;
import com.fr.cache.list.IntList; import com.fr.cache.list.IntList;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.cell.CellAttributeAction; import com.fr.design.actions.cell.CellAttributeAction;
@ -463,7 +464,7 @@ public class CellSelection extends Selection {
*/ */
public UIPopupMenu createPopupMenu(ElementCasePane ePane) { public UIPopupMenu createPopupMenu(ElementCasePane ePane) {
UIPopupMenu popup = new UIPopupMenu(); UIPopupMenu popup = new UIPopupMenu();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
popup.add(new CleanAuthorityAction(ePane).createMenuItem()); popup.add(new CleanAuthorityAction(ePane).createMenuItem());
return popup; return popup;
} }

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

@ -1,7 +1,7 @@
package com.fr.grid.selection; package com.fr.grid.selection;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.cell.CleanAuthorityAction; import com.fr.design.actions.cell.CleanAuthorityAction;
import com.fr.design.actions.cell.FloatStyleAction; import com.fr.design.actions.cell.FloatStyleAction;
import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.core.ActionFactory;
@ -118,7 +118,7 @@ public class FloatSelection extends Selection {
@Override @Override
public JPopupMenu createPopupMenu(ElementCasePane ePane) { public JPopupMenu createPopupMenu(ElementCasePane ePane) {
UIPopupMenu popup = new UIPopupMenu(); UIPopupMenu popup = new UIPopupMenu();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
popup.add(new CleanAuthorityAction(ePane).createMenuItem()); popup.add(new CleanAuthorityAction(ePane).createMenuItem());
return popup; return popup;
} }

3
designer/src/com/fr/poly/PolyComponetsBar.java

@ -5,6 +5,7 @@ import com.fr.base.FRContext;
import com.fr.base.chart.BaseChart; import com.fr.base.chart.BaseChart;
import com.fr.base.chart.BaseChartGetter; import com.fr.base.chart.BaseChartGetter;
import com.fr.base.chart.BaseChartNameID; import com.fr.base.chart.BaseChartNameID;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.itooltip.MultiLineToolTip; import com.fr.design.gui.itooltip.MultiLineToolTip;
@ -53,7 +54,7 @@ public class PolyComponetsBar extends JToolBar {
*/ */
public void checkEnable() { public void checkEnable() {
for (SerIcon serIcon : serIcons) { for (SerIcon serIcon : serIcons) {
serIcon.setEnabled(!BaseUtils.isAuthorityEditing()); serIcon.setEnabled(!DesignerMode.isAuthorityEditing());
} }
} }

8
designer/src/com/fr/poly/PolyDesigner.java

@ -3,10 +3,10 @@
*/ */
package com.fr.poly; package com.fr.poly;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
@ -355,7 +355,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
//聚合块不参加权限编辑 //聚合块不参加权限编辑
if (selectElement == null) { if (selectElement == null) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jTemplate.isJWorkBook()) { if (jTemplate.isJWorkBook()) {
//清参数面板 //清参数面板
@ -715,7 +715,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
initPolyBlocks(); initPolyBlocks();
startEditing(blockName); startEditing(blockName);
if (selection == null) { if (selection == null) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION_DISABLED); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION_DISABLED);
EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(new NoSupportAuthorityEdit()); EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(new NoSupportAuthorityEdit());
} else { } else {
@ -870,7 +870,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
jt.setComposite(); jt.setComposite();
} }
DesignerContext.getDesignerFrame().resetToolkitByPlus(DesignerContext.getDesignerFrame().getSelectedJTemplate()); DesignerContext.getDesignerFrame().resetToolkitByPlus(DesignerContext.getDesignerFrame().getSelectedJTemplate());
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
EastRegionContainerPane.getInstance().replaceDownPane(RolesAlreadyEditedPane.getInstance()); EastRegionContainerPane.getInstance().replaceDownPane(RolesAlreadyEditedPane.getInstance());
} else if (isChooseBlock()) { } else if (isChooseBlock()) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.POLY_CHART); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.POLY_CHART);

3
designer/src/com/fr/poly/actions/DeleteBlockAction.java

@ -9,6 +9,7 @@ import java.awt.event.KeyEvent;
import javax.swing.KeyStroke; import javax.swing.KeyStroke;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.TemplateComponentActionInterface; import com.fr.design.actions.TemplateComponentActionInterface;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.general.Inter; import com.fr.general.Inter;
@ -30,7 +31,7 @@ public class DeleteBlockAction extends UpdateAction implements TemplateComponent
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
final PolyDesigner designer = this.getEditingComponent(); final PolyDesigner designer = this.getEditingComponent();

7
designer/src/com/fr/poly/creator/ChartBlockEditor.java

@ -10,6 +10,7 @@ import com.fr.base.chart.BaseChart;
import com.fr.base.chart.BaseChartCollection; import com.fr.base.chart.BaseChartCollection;
import com.fr.base.chart.BaseChartGetter; import com.fr.base.chart.BaseChartGetter;
import com.fr.base.chart.BaseChartNameID; import com.fr.base.chart.BaseChartNameID;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.border.UIRoundedBorder; import com.fr.design.border.UIRoundedBorder;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.chart.MiddleChartComponent; import com.fr.design.gui.chart.MiddleChartComponent;
@ -27,7 +28,6 @@ import com.fr.poly.PolyDesigner.SelectionType;
import com.fr.poly.hanlder.ColumnOperationMouseHandler; import com.fr.poly.hanlder.ColumnOperationMouseHandler;
import com.fr.poly.hanlder.RowOperationMouseHandler; import com.fr.poly.hanlder.RowOperationMouseHandler;
import com.fr.report.poly.PolyChartBlock; import com.fr.report.poly.PolyChartBlock;
import com.fr.stable.CoreGraphHelper;
import com.fr.stable.core.PropertyChangeAdapter; import com.fr.stable.core.PropertyChangeAdapter;
import javax.swing.*; import javax.swing.*;
@ -35,7 +35,6 @@ import javax.swing.border.Border;
import java.awt.*; import java.awt.*;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import java.awt.image.BufferedImage;
/** /**
* @author richer * @author richer
@ -211,7 +210,7 @@ public class ChartBlockEditor extends BlockEditor<MiddleChartComponent, PolyChar
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
BaseChart chart = null; BaseChart chart = null;
@ -274,7 +273,7 @@ public class ChartBlockEditor extends BlockEditor<MiddleChartComponent, PolyChar
public void resetSelectionAndChooseState() { public void resetSelectionAndChooseState() {
designer.setChooseType(SelectionType.CHART_INNER); designer.setChooseType(SelectionType.CHART_INNER);
// refreshChartComponent();// 选中之后 刷新下图表编辑层 // refreshChartComponent();// 选中之后 刷新下图表编辑层
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jTemplate.isJWorkBook()) { if (jTemplate.isJWorkBook()) {
//清参数面板 //清参数面板

4
designer/src/com/fr/poly/creator/ECBlockEditor.java

@ -3,8 +3,8 @@
*/ */
package com.fr.poly.creator; package com.fr.poly.creator;
import com.fr.base.BaseUtils;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener; import com.fr.design.event.TargetModifiedListener;
@ -136,7 +136,7 @@ public class ECBlockEditor extends BlockEditor<ECBlockPane, PolyECBlock> {
*/ */
public void resetSelectionAndChooseState() { public void resetSelectionAndChooseState() {
designer.setChooseType(SelectionType.INNER); designer.setChooseType(SelectionType.INNER);
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jTemplate.isJWorkBook()) { if (jTemplate.isJWorkBook()) {
//清参数面板 //清参数面板

6
designer/src/com/fr/poly/creator/ECBlockPane.java

@ -3,7 +3,7 @@
*/ */
package com.fr.poly.creator; package com.fr.poly.creator;
import com.fr.base.BaseUtils; import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.edit.HyperlinkAction; import com.fr.design.actions.edit.HyperlinkAction;
import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.KeySetUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
@ -55,7 +55,7 @@ public class ECBlockPane extends PolyElementCasePane {
if (!isEditable()) { if (!isEditable()) {
return; return;
} }
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
if (designer.getSelection().getEditingElementCasePane() == null) { if (designer.getSelection().getEditingElementCasePane() == null) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION_DISABLED); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION_DISABLED);
EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(new NoSupportAuthorityEdit()); EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(new NoSupportAuthorityEdit());
@ -106,7 +106,7 @@ public class ECBlockPane extends PolyElementCasePane {
* @return 返回MenuDef数组. * @return 返回MenuDef数组.
*/ */
public MenuDef[] menus4Target() { public MenuDef[] menus4Target() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return super.menus4Target(); return super.menus4Target();
} }
return (MenuDef[]) ArrayUtils.addAll(super.menus4Target(), new MenuDef[]{createInsertMenuDef(), createCellMenuDef()}); return (MenuDef[]) ArrayUtils.addAll(super.menus4Target(), new MenuDef[]{createInsertMenuDef(), createCellMenuDef()});

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

@ -9,8 +9,8 @@ import java.awt.event.MouseEvent;
import javax.swing.event.MouseInputAdapter; import javax.swing.event.MouseInputAdapter;
import com.fr.base.BaseUtils;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.beans.location.Absorptionline; import com.fr.design.beans.location.Absorptionline;
import com.fr.design.beans.location.MoveUtils; import com.fr.design.beans.location.MoveUtils;
import com.fr.design.beans.location.MoveUtils.RectangleDesigner; import com.fr.design.beans.location.MoveUtils.RectangleDesigner;
@ -49,7 +49,7 @@ public class BottomCornerMouseHanlder extends MouseInputAdapter {
* *
*/ */
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
designer.noAuthorityEdit(); designer.noAuthorityEdit();
} }
pressed = e.getPoint(); pressed = e.getPoint();
@ -66,7 +66,7 @@ public class BottomCornerMouseHanlder extends MouseInputAdapter {
* *
*/ */
public void mouseReleased(MouseEvent e) { public void mouseReleased(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
designer.noAuthorityEdit(); designer.noAuthorityEdit();
} }
editor.setDragging(false); editor.setDragging(false);
@ -92,7 +92,7 @@ public class BottomCornerMouseHanlder extends MouseInputAdapter {
* *
*/ */
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
designer.noAuthorityEdit(); designer.noAuthorityEdit();
return; return;
} }

6
designer/src/com/fr/poly/hanlder/ColumnOperationMouseHandler.java

@ -6,8 +6,8 @@ package com.fr.poly.hanlder;
import java.awt.Point; import java.awt.Point;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import com.fr.base.BaseUtils;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.poly.PolyDesigner; import com.fr.poly.PolyDesigner;
import com.fr.poly.PolyDesigner.SelectionType; import com.fr.poly.PolyDesigner.SelectionType;
@ -57,7 +57,7 @@ public abstract class ColumnOperationMouseHandler<T extends BlockEditor> extends
* *
*/ */
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
designer.noAuthorityEdit(); designer.noAuthorityEdit();
} }
startPoint = e.getPoint(); startPoint = e.getPoint();
@ -74,7 +74,7 @@ public abstract class ColumnOperationMouseHandler<T extends BlockEditor> extends
* *
*/ */
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
TemplateBlock block = editor.getValue(); TemplateBlock block = editor.getValue();

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

@ -15,10 +15,10 @@ import java.awt.dnd.DropTargetEvent;
import javax.swing.JScrollBar; import javax.swing.JScrollBar;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.chart.BaseChart; import com.fr.base.chart.BaseChart;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.grid.Grid; import com.fr.grid.Grid;
import com.fr.poly.PolyDesigner; import com.fr.poly.PolyDesigner;
@ -55,7 +55,7 @@ public class PolyDesignerDropTarget extends DropTargetAdapter {
*/ */
public void dragEnter(DropTargetDragEvent dtde) { public void dragEnter(DropTargetDragEvent dtde) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
// richer:避免在一次拖拽过程中重复查找 // richer:避免在一次拖拽过程中重复查找

6
designer/src/com/fr/poly/hanlder/RowOperationMouseHandler.java

@ -6,8 +6,8 @@ package com.fr.poly.hanlder;
import java.awt.Point; import java.awt.Point;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
import com.fr.base.BaseUtils;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.poly.PolyDesigner; import com.fr.poly.PolyDesigner;
import com.fr.poly.PolyDesigner.SelectionType; import com.fr.poly.PolyDesigner.SelectionType;
@ -55,7 +55,7 @@ public abstract class RowOperationMouseHandler<T extends BlockEditor> extends Bl
* *
*/ */
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
designer.noAuthorityEdit(); designer.noAuthorityEdit();
} }
startPoint = e.getPoint(); startPoint = e.getPoint();
@ -72,7 +72,7 @@ public abstract class RowOperationMouseHandler<T extends BlockEditor> extends Bl
* *
*/ */
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
TemplateBlock block = editor.getValue(); TemplateBlock block = editor.getValue();

6
designer/src/com/fr/start/Designer.java

@ -123,7 +123,7 @@ public class Designer extends BaseDesigner {
return menuDef; return menuDef;
} }
if (!BaseUtils.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
menuDef.addShortCut(SeparatorDef.DEFAULT); menuDef.addShortCut(SeparatorDef.DEFAULT);
if (FRContext.getCurrentEnv().isRoot()) { if (FRContext.getCurrentEnv().isRoot()) {
@ -320,7 +320,7 @@ public class Designer extends BaseDesigner {
@Override @Override
public JComponent resetToolBar(JComponent toolbarComponent, ToolBarMenuDockPlus plus) { public JComponent resetToolBar(JComponent toolbarComponent, ToolBarMenuDockPlus plus) {
//如果是处于权限编辑状态 //如果是处于权限编辑状态
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
if (plus instanceof JWorkBook && plus.toolbars4Target() == null) { if (plus instanceof JWorkBook && plus.toolbars4Target() == null) {
//聚合块编辑 //聚合块编辑
return super.polyToolBar(Inter.getLocText(new String[]{"Polybolck", "DashBoard-Potence", "Edit"})); return super.polyToolBar(Inter.getLocText(new String[]{"Polybolck", "DashBoard-Potence", "Edit"}));
@ -364,7 +364,7 @@ public class Designer extends BaseDesigner {
@Override @Override
public Component createBBSLoginPane() { public Component createBBSLoginPane() {
if (userInfoPane == null) { if (userInfoPane == null) {
userInfoPane = new UserInfoPane(); userInfoPane = UserInfoPane.getInstance();
} }
return userInfoPane; return userInfoPane;
} }

4
designer_base/src/com/fr/design/DesignState.java

@ -1,8 +1,8 @@
package com.fr.design; package com.fr.design;
import com.fr.base.BaseUtils;
import com.fr.base.Env; import com.fr.base.Env;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
import com.fr.env.RemoteEnv; import com.fr.env.RemoteEnv;
@ -46,7 +46,7 @@ public class DesignState {
designState += REMOTE; designState += REMOTE;
} }
isRoot = env != null && env.isRoot(); isRoot = env != null && env.isRoot();
isAuthority = BaseUtils.isAuthorityEditing(); isAuthority = DesignerMode.isAuthorityEditing();
} }
public int getDesignState() { public int getDesignState() {

2
designer_base/src/com/fr/design/actions/AllowAuthorityEditAction.java

@ -1 +1 @@
package com.fr.design.actions; import com.fr.base.BaseUtils; import com.fr.design.constants.UIConstants; import com.fr.design.menu.KeySetUtils; import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.designer.TargetComponent; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.mainframe.*; /** * Author : daisy * Date: 13-8-30 * Time: 上午10:12 */ public class AllowAuthorityEditAction extends TemplateComponentAction { public AllowAuthorityEditAction(TargetComponent t) { super(t); this.setMenuKeySet(KeySetUtils.ALLOW_AUTHORITY_EDIT); this.setName(getMenuKeySet().getMenuName()); this.setMnemonic(getMenuKeySet().getMnemonic()); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/allow_authority_edit.png")); } /** * 撤销 */ public void prepare4Undo() { HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().iniAuthorityUndoState(); } /** * 执行动作 * * @return 是否执行成功 */ public boolean executeActionReturnUndoRecordNeeded() { TargetComponent tc = getEditingComponent(); if (tc == null) { return false; } cleanAuthorityCondition(); //进入时是格式刷则取消格式刷 if (DesignerContext.getFormatState() != DesignerContext.FORMAT_STATE_NULL) { tc.cancelFormat(); } BaseUtils.setAuthorityEditing(true); ReportAndFSManagePane.getInstance().refreshDockingView(); RolesAlreadyEditedPane.getInstance().refreshDockingView(); WestRegionContainerPane.getInstance().replaceDownPane(ReportAndFSManagePane.getInstance()); DesignerContext.getDesignerFrame().setCloseMode(UIConstants.CLOSE_OF_AUTHORITY); DesignerContext.getDesignerFrame().resetToolkitByPlus(tc.getToolBarMenuDockPlus()); DesignerContext.getDesignerFrame().needToAddAuhtorityPaint(); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION); EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(tc.getEastUpPane()); DesignerContext.getDesignerFrame().refreshDottedLine(); EastRegionContainerPane.getInstance().replaceConfiguredRolesPane(RolesAlreadyEditedPane.getInstance()); EastRegionContainerPane.getInstance().removeParameterPane(); //画虚线 return true; } /** * 进入权限编辑之前将权限编辑界面重置一下工具栏 */ private void cleanAuthorityCondition() { java.util.List<JTemplate<?, ?>> opendedTemplate = HistoryTemplateListPane.getInstance().getHistoryList(); for (int i = 0; i < opendedTemplate.size(); i++) { opendedTemplate.get(i).cleanAuthorityUndo(); } } } package com.fr.design.actions; import com.fr.base.BaseUtils; import com.fr.base.vcs.DesignerMode; import com.fr.design.constants.UIConstants; import com.fr.design.menu.KeySetUtils; import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.designer.TargetComponent; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.mainframe.*; /** * Author : daisy * Date: 13-8-30 * Time: 上午10:12 */ public class AllowAuthorityEditAction extends TemplateComponentAction { public AllowAuthorityEditAction(TargetComponent t) { super(t); this.setMenuKeySet(KeySetUtils.ALLOW_AUTHORITY_EDIT); this.setName(getMenuKeySet().getMenuName()); this.setMnemonic(getMenuKeySet().getMnemonic()); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/allow_authority_edit.png")); } /** * 撤销 */ public void prepare4Undo() { HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().iniAuthorityUndoState(); } /** * 执行动作 * * @return 是否执行成功 */ public boolean executeActionReturnUndoRecordNeeded() { TargetComponent tc = getEditingComponent(); if (tc == null) { return false; } cleanAuthorityCondition(); //进入时是格式刷则取消格式刷 if (DesignerContext.getFormatState() != DesignerContext.FORMAT_STATE_NULL) { tc.cancelFormat(); } DesignerMode.setMode(DesignerMode.AUTHORITY); ReportAndFSManagePane.getInstance().refreshDockingView(); RolesAlreadyEditedPane.getInstance().refreshDockingView(); WestRegionContainerPane.getInstance().replaceDownPane(ReportAndFSManagePane.getInstance()); DesignerContext.getDesignerFrame().setCloseMode(UIConstants.CLOSE_OF_AUTHORITY); DesignerContext.getDesignerFrame().resetToolkitByPlus(tc.getToolBarMenuDockPlus()); DesignerContext.getDesignerFrame().needToAddAuhtorityPaint(); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION); EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(tc.getEastUpPane()); DesignerContext.getDesignerFrame().refreshDottedLine(); EastRegionContainerPane.getInstance().replaceConfiguredRolesPane(RolesAlreadyEditedPane.getInstance()); EastRegionContainerPane.getInstance().removeParameterPane(); //画虚线 return true; } /** * 进入权限编辑之前将权限编辑界面重置一下工具栏 */ private void cleanAuthorityCondition() { java.util.List<JTemplate<?, ?>> opendedTemplate = HistoryTemplateListPane.getInstance().getHistoryList(); for (int i = 0; i < opendedTemplate.size(); i++) { opendedTemplate.get(i).cleanAuthorityUndo(); } } }

5
designer_base/src/com/fr/design/actions/ExitAuthorityEditAction.java

@ -1,6 +1,7 @@
package com.fr.design.actions; package com.fr.design.actions;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
@ -33,8 +34,8 @@ public class ExitAuthorityEditAction extends TemplateComponentAction {
return false; return false;
} }
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
BaseUtils.setAuthorityEditing(false); DesignerMode.setMode(DesignerMode.NORMARL);
WestRegionContainerPane.getInstance().replaceDownPane(TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter())); WestRegionContainerPane.getInstance().replaceDownPane(TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()));
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane();
DesignerContext.getDesignerFrame().resetToolkitByPlus(tc.getToolBarMenuDockPlus()); DesignerContext.getDesignerFrame().resetToolkitByPlus(tc.getToolBarMenuDockPlus());

53
designer_base/src/com/fr/design/actions/help/AboutPane.java

@ -68,28 +68,36 @@ public class AboutPane extends JPanel {
Inter.getLocText("FR-Designer-Basic_Activation_Key_Copy_OK") Inter.getLocText("FR-Designer-Basic_Activation_Key_Copy_OK")
})); }));
if (shouldShowPhoneAndQQ()) { addPhoneAndQQPane(contentPane);
if (ComparatorUtils.equals(ProductConstants.APP_NAME, FINEREPORT)) {
boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("FR-Designer_Service_Phone") + ProductConstants.COMPARE_TELEPHONE); // 官网
contentPane.add(boxCenterAlignmentPane); JPanel urlActionPane = getURLActionPane(Inter.getLocText("FR-Designer_Official_Website"), SiteCenter.getInstance().acquireUrlByKind("website." + FRContext.getLocale(), ProductConstants.WEBSITE_URL));
}
boxCenterAlignmentPane = new BoxCenterAligmentPane("QQ:" + SiteCenter.getInstance().acquireUrlByKind("help.qq"));
contentPane.add(boxCenterAlignmentPane);
}
BoxCenterAligmentPane actionLabel = getURLActionLabel(SiteCenter.getInstance().acquireUrlByKind("website." + FRContext.getLocale(), ProductConstants.WEBSITE_URL)); // 支持邮箱
BoxCenterAligmentPane emailLabel = getEmailActionLabel(SiteCenter.getInstance().acquireUrlByKind("support.email", ProductConstants.SUPPORT_EMAIL)); String defaultEmail = SiteCenter.getInstance().acquireUrlByKind("support.email", ProductConstants.SUPPORT_EMAIL);
JPanel emailPane = getEmailActionPane(Inter.getLocText("FR-Designer_Support_Email"),SiteCenter.getInstance().acquireUrlByKind("support.email." + FRContext.getLocale(), defaultEmail));
contentPane.add(actionLabel); contentPane.add(urlActionPane);
contentPane.add(emailLabel); contentPane.add(emailPane);
if (shouldShowThanks()) { if (shouldShowThanks()) {
addThankPane(contentPane); addThankPane(contentPane);
} }
} }
// 是否显示服务电话和 qq private void addPhoneAndQQPane(JPanel contentPane) {
private boolean shouldShowPhoneAndQQ() { BoxCenterAligmentPane boxCenterAlignmentPane;
return !FRContext.getLocale().equals(Locale.US); // 英文版不显示服务电话和QQ
if (FRContext.getLocale().equals(Locale.US)) {
return;
}
boxCenterAlignmentPane = new BoxCenterAligmentPane(Inter.getLocText("FR-Designer_Service_Phone") + SiteCenter.getInstance().acquireUrlByKind("service.phone." + FRContext.getLocale(), ProductConstants.COMPARE_TELEPHONE));
contentPane.add(boxCenterAlignmentPane);
// 繁体版不显示QQ
if (FRContext.getLocale().equals(Locale.TAIWAN)) {
return;
}
boxCenterAlignmentPane = new BoxCenterAligmentPane("QQ: " + SiteCenter.getInstance().acquireUrlByKind("help.qq"));
contentPane.add(boxCenterAlignmentPane);
} }
// 是否显示鸣谢面板 // 是否显示鸣谢面板
@ -133,7 +141,7 @@ public class AboutPane extends JPanel {
StringUtils.BLANK, ProductConstants.RELEASE_VERSION, BUILD_PREFIX); StringUtils.BLANK, ProductConstants.RELEASE_VERSION, BUILD_PREFIX);
} }
private BoxCenterAligmentPane getEmailActionLabel(final String mailTo) { private JPanel getEmailActionPane(final String desc, final String mailTo){
ActionLabel emailLabel = new ActionLabel(mailTo); ActionLabel emailLabel = new ActionLabel(mailTo);
emailLabel.addActionListener(new ActionListener() { emailLabel.addActionListener(new ActionListener() {
@ -147,10 +155,13 @@ public class AboutPane extends JPanel {
} }
}); });
return new BoxCenterAligmentPane(emailLabel); JPanel panel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
panel.add(new UILabel(desc));
panel.add(emailLabel);
return panel;
} }
private BoxCenterAligmentPane getURLActionLabel(final String url) { private JPanel getURLActionPane(final String desc, final String url){
ActionLabel actionLabel = new ActionLabel(url); ActionLabel actionLabel = new ActionLabel(url);
actionLabel.addActionListener(new ActionListener() { actionLabel.addActionListener(new ActionListener() {
@Override @Override
@ -163,7 +174,11 @@ public class AboutPane extends JPanel {
} }
}); });
return new BoxCenterAligmentPane(actionLabel); JPanel panel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
panel.add(new UILabel(desc));
panel.add(actionLabel);
return panel;
} }
class UserLabel extends BoldFontTextLabel { class UserLabel extends BoldFontTextLabel {

2
designer_base/src/com/fr/design/designer/IntervalConstants.java

@ -27,4 +27,6 @@ public class IntervalConstants {
public static final int INTERVAL_W3 = 49; public static final int INTERVAL_W3 = 49;
public static final int INTERVAL_W4 = 22;
} }

3
designer_base/src/com/fr/design/dialog/mobile/MobileRadioCheckPane.java

@ -1,6 +1,8 @@
package com.fr.design.dialog.mobile; package com.fr.design.dialog.mobile;
import com.fr.design.beans.BasicBeanPane; import com.fr.design.beans.BasicBeanPane;
import com.fr.design.event.ChangeListener;
import com.fr.design.event.UIObserverListener;
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;
import com.fr.design.layout.TableLayout; import com.fr.design.layout.TableLayout;
@ -10,6 +12,7 @@ import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.event.ActionListener;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;

17
designer_base/src/com/fr/design/extra/LoginDialog.java

@ -4,8 +4,12 @@ import com.fr.design.dialog.UIDialog;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import javax.swing.*; import javax.swing.JPanel;
import java.awt.*; import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dialog;
import java.awt.Dimension;
import java.awt.Frame;
/** /**
* Created by vito on 2017/5/5. * Created by vito on 2017/5/5.
@ -15,6 +19,15 @@ public class LoginDialog extends UIDialog {
public LoginDialog(Frame frame, Component pane) { public LoginDialog(Frame frame, Component pane) {
super(frame); super(frame);
init(pane);
}
public LoginDialog(Dialog dialog, Component pane) {
super(dialog);
init(pane);
}
private void init(Component pane) {
if (StableUtils.getMajorJavaVersion() == 8) { if (StableUtils.getMajorJavaVersion() == 8) {
setUndecorated(true); setUndecorated(true);
} }

53
designer_base/src/com/fr/design/extra/WebViewDlgHelper.java

@ -22,6 +22,9 @@ import javax.swing.JOptionPane;
import javax.swing.SwingWorker; import javax.swing.SwingWorker;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.awt.Dialog;
import java.awt.Frame;
import java.awt.Window;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
@ -133,18 +136,22 @@ public class WebViewDlgHelper {
if (StableUtils.getMajorJavaVersion() == VERSION_8) { if (StableUtils.getMajorJavaVersion() == VERSION_8) {
File file = new File(StableUtils.pathJoin(installHome, "scripts")); File file = new File(StableUtils.pathJoin(installHome, "scripts"));
if (!file.exists()) { if (!file.exists()) {
int rv = JOptionPane.showConfirmDialog( confirmDownLoadShopJS();
null,
Inter.getLocText("FR-Designer-Plugin_Shop_Need_Install"),
Inter.getLocText("FR-Designer-Plugin_Warning"),
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE
);
if (rv == JOptionPane.OK_OPTION) {
downloadShopScripts(SHOP_SCRIPTS);
}
} else { } else {
showLoginDlg(); showLoginDlg(DesignerContext.getDesignerFrame());
updateShopScripts(SHOP_SCRIPTS);
}
}
}
public static void createLoginDialog(Window parent) {
if (StableUtils.getMajorJavaVersion() == VERSION_8) {
File file = new File(StableUtils.pathJoin(installHome, "scripts"));
if (!file.exists()) {
confirmDownLoadShopJS();
} else {
showLoginDlg(parent);
updateShopScripts(SHOP_SCRIPTS); updateShopScripts(SHOP_SCRIPTS);
} }
} }
@ -164,6 +171,20 @@ public class WebViewDlgHelper {
} }
} }
private static void confirmDownLoadShopJS() {
int rv = JOptionPane.showConfirmDialog(
null,
Inter.getLocText("FR-Designer-Plugin_Shop_Need_Install"),
Inter.getLocText("FR-Designer-Plugin_Warning"),
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.INFORMATION_MESSAGE
);
if (rv == JOptionPane.OK_OPTION) {
downloadShopScripts(SHOP_SCRIPTS);
}
}
private static void showPluginDlg(String mainJsPath) { private static void showPluginDlg(String mainJsPath) {
try { try {
Class<?> clazz = Class.forName("com.fr.design.extra.PluginWebPane"); Class<?> clazz = Class.forName("com.fr.design.extra.PluginWebPane");
@ -179,13 +200,17 @@ public class WebViewDlgHelper {
} }
} }
private static void showLoginDlg() { private static void showLoginDlg(Window window) {
try { try {
Class<?> clazz = Class.forName("com.fr.design.extra.LoginWebPane"); Class<?> clazz = Class.forName("com.fr.design.extra.LoginWebPane");
Constructor constructor = clazz.getConstructor(String.class); Constructor constructor = clazz.getConstructor(String.class);
Component webPane = (Component) constructor.newInstance(installHome); Component webPane = (Component) constructor.newInstance(installHome);
UIDialog qqdlg;
UIDialog qqdlg = new LoginDialog(DesignerContext.getDesignerFrame(), webPane); if (window instanceof Dialog) {
qqdlg = new LoginDialog((Dialog) window, webPane);
} else {
qqdlg = new LoginDialog((Frame) window, webPane);
}
LoginWebBridge.getHelper().setDialogHandle(qqdlg); LoginWebBridge.getHelper().setDialogHandle(qqdlg);
qqdlg.setVisible(true); qqdlg.setVisible(true);
} catch (Throwable ignored) { } catch (Throwable ignored) {

2
designer_base/src/com/fr/design/file/MutilTempalteTabPane.java

@ -693,7 +693,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
openedTemplate.get(selectedIndex).stopEditing(); openedTemplate.get(selectedIndex).stopEditing();
selectedIndex = getTemplateIndex(evtX); selectedIndex = getTemplateIndex(evtX);
//如果在权限编辑情况下,不允许切换到表单类型的工作簿 //如果在权限编辑情况下,不允许切换到表单类型的工作簿
if (BaseUtils.isAuthorityEditing() && !openedTemplate.get(selectedIndex).isJWorkBook()) { if (DesignerMode.isAuthorityEditing() && !openedTemplate.get(selectedIndex).isJWorkBook()) {
DesignerContext.getDesignerFrame().addAndActivateJTemplate(openedTemplate.get(tempSelectedIndex)); DesignerContext.getDesignerFrame().addAndActivateJTemplate(openedTemplate.get(tempSelectedIndex));
JOptionPane.showMessageDialog(this, Inter.getLocText("FR-Designer_Form-AuthorityEdited_Cannot_be_Supported") JOptionPane.showMessageDialog(this, Inter.getLocText("FR-Designer_Form-AuthorityEdited_Cannot_be_Supported")
+ "!", Inter.getLocText("FR-Designer_Alert"), JOptionPane.WARNING_MESSAGE); + "!", Inter.getLocText("FR-Designer_Alert"), JOptionPane.WARNING_MESSAGE);

4
designer_base/src/com/fr/design/file/NewTemplatePane.java

@ -21,7 +21,7 @@ import java.awt.geom.Rectangle2D;
public abstract class NewTemplatePane extends JComponent implements MouseListener, MouseMotionListener { public abstract class NewTemplatePane extends JComponent implements MouseListener, MouseMotionListener {
private static final Icon GRAY_NEW_CPT = BaseUtils.readIcon("/com/fr/design/images/buttonicon/additicon_grey.png"); private static final Icon GRAY_NEW_CPT = BaseUtils.readIcon("/com/fr/design/images/buttonicon/additicon_grey.png");
private static final int PRE_GAP = 0; private static final int PRE_GAP = 5;
private static final int HEIGHT = 26; private static final int HEIGHT = 26;
private Graphics2D g2d; private Graphics2D g2d;
private Icon newWorkBookIconMode = null; private Icon newWorkBookIconMode = null;
@ -148,7 +148,7 @@ public abstract class NewTemplatePane extends JComponent implements MouseListene
} }
private boolean needGrayNewCpt() { private boolean needGrayNewCpt() {
return BaseUtils.isAuthorityEditing() || DesignerMode.isVcsMode(); return DesignerMode.isAuthorityEditing() || DesignerMode.isVcsMode();
} }

467
designer_base/src/com/fr/design/gui/controlpane/UISimpleListControlPane.java

@ -0,0 +1,467 @@
package com.fr.design.gui.controlpane;
import com.fr.base.BaseUtils;
import com.fr.design.actions.UpdateAction;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ilist.ListModelElement;
import com.fr.design.gui.ilist.UIList;
import com.fr.design.gui.itoolbar.UIToolBarUI;
import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Nameable;
import com.fr.stable.StringUtils;
import sun.swing.DefaultLookup;
import javax.swing.*;
import javax.swing.border.Border;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.*;
import java.awt.event.*;
import java.util.Arrays;
import java.util.Comparator;
/**
* 简单列表面板
* Created by plough on 2018/2/1.
*/
public class UISimpleListControlPane extends BasicPane {
public static final String LIST_NAME = "UISimpleControl_List";
protected UIList nameList;
protected String selectedName;
private ShortCut4JControlPane[] shorts;
private ToolBarDef toolbarDef;
private UIToolbar toolBar;
public UISimpleListControlPane() {
initComponentPane();
}
public ShortCut4JControlPane[] getShorts() {
return shorts;
}
protected void initComponentPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.add(getContentPane(), BorderLayout.CENTER);
this.checkButtonEnabled();
}
protected JPanel getContentPane() {
JPanel contentPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
JPanel listPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
initListPane(listPane);
contentPane.add(listPane, BorderLayout.CENTER);
shorts = this.createShortcuts();
if (ArrayUtils.isEmpty(shorts)) {
return contentPane;
}
toolbarDef = new ToolBarDef();
for (ShortCut4JControlPane sj : shorts) {
toolbarDef.addShortCut(sj.getShortCut());
}
toolBar = ToolBarDef.createJToolBar();
toolBar.setUI(new UIToolBarUI(){
@Override
public void paint(Graphics g, JComponent c) {
Graphics2D g2 = (Graphics2D) g;
g2.setColor(Color.WHITE);
g2.fillRect(0, 0, c.getWidth(), c.getHeight());
}
});
toolbarDef.updateToolBar(toolBar);
// 封装一层,加边框
JPanel toolBarPane = new JPanel(new BorderLayout());
toolBarPane.add(toolBar, BorderLayout.CENTER);
toolBarPane.setBorder(BorderFactory.createMatteBorder(1, 1, 0, 1, UIConstants.RULER_LINE_COLOR));
listPane.add(toolBarPane, BorderLayout.NORTH);
return contentPane;
}
protected ShortCut4JControlPane[] createShortcuts() {
return new ShortCut4JControlPane[]{
moveUpItemShortCut(),
moveDownItemShortCut(),
sortItemShortCut(),
};
}
protected void initListPane(JPanel listPane) {
nameList = createJNameList();
nameList.setName(LIST_NAME);
nameList.setSelectionBackground(UIConstants.ATTRIBUTE_PRESS);
listPane.add(new UIScrollPane(nameList), BorderLayout.CENTER);
nameList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
nameList.addMouseListener(listMouseListener);
nameList.addListSelectionListener(new ListSelectionListener() {
public void valueChanged(ListSelectionEvent evt) {
// richie:避免多次update和populate大大降低效率
if (!evt.getValueIsAdjusting()) {
UISimpleListControlPane.this.checkButtonEnabled();
}
}
});
}
public UIList createJNameList() {
UIList nameList = new UIList(new DefaultListModel()) {
@Override
public int locationToIndex(Point location) {
int index = super.locationToIndex(location);
if (index != -1 && !getCellBounds(index, index).contains(location)) {
return -1;
}
else {
return index;
}
}
};
nameList.setCellRenderer(new NameableListCellRenderer(this));
return nameList;
}
protected ShortCut4JControlPane moveUpItemShortCut() {
return new NormalEnableShortCut(new MoveUpItemAction());
}
protected ShortCut4JControlPane moveDownItemShortCut() {
return new NormalEnableShortCut(new MoveDownItemAction());
}
protected ShortCut4JControlPane sortItemShortCut() {
return new NormalEnableShortCut(new SortItemAction());
}
public Nameable[] update() {
java.util.List<Nameable> res = new java.util.ArrayList<Nameable>();
DefaultListModel listModel = (DefaultListModel) this.nameList.getModel();
for (int i = 0, len = listModel.getSize(); i < len; i++) {
res.add(((ListModelElement) listModel.getElementAt(i)).wrapper);
}
return res.toArray(new Nameable[res.size()]);
}
public void populate(Nameable[] nameableArray) {
DefaultListModel listModel = (DefaultListModel) this.nameList.getModel();
listModel.removeAllElements();
if (ArrayUtils.isEmpty(nameableArray)) {
return;
}
listModel.setSize(nameableArray.length);
for (int i = 0; i < nameableArray.length; i++) {
listModel.set(i, new ListModelElement(nameableArray[i]));
}
if (listModel.size() > 0 || this.nameList.getSelectedIndex() != 0) {
this.nameList.setSelectedIndex(0);
}
this.checkButtonEnabled();
}
/**
* 根据name,选中UINameEdList中的item
*/
public void setSelectedName(String name) {
DefaultListModel listModel = (DefaultListModel) this.nameList.getModel();
for (int i = 0, len = listModel.getSize(); i < len; i++) {
Nameable item = ((ListModelElement) listModel.getElementAt(i)).wrapper;
if (ComparatorUtils.equals(name, item.getName())) {
this.nameList.setSelectedIndex(i);
break;
}
}
}
/**
* 获取选中的名字
*/
public String getSelectedName() {
ListModelElement el = (ListModelElement) this.nameList.getSelectedValue();
return el == null ? null : el.wrapper.getName();
}
protected DefaultListModel getModel() {
return (DefaultListModel) this.nameList.getModel();
}
@Override
protected String title4PopupWindow() {
return null;
}
/*
* 上移Item
*/
private class MoveUpItemAction extends UpdateAction {
public MoveUpItemAction() {
this.setName(Inter.getLocText("Utils-Move_Up"));
this.setMnemonic('U');
this.setSmallIcon(BaseUtils
.readIcon("/com/fr/design/images/control/up.png"));
}
@Override
public void actionPerformed(ActionEvent evt) {
int selectedIndex = nameList.getSelectedIndex();
if (selectedIndex == -1) {
return;
}
// 上移
if (selectedIndex > 0) {
DefaultListModel listModel = (DefaultListModel) nameList.getModel();
Object prevObj = listModel.get(selectedIndex - 1);
Object currentObj = listModel.get(selectedIndex);
listModel.set(selectedIndex - 1, currentObj);
listModel.set(selectedIndex, prevObj);
nameList.setSelectedIndex(selectedIndex - 1);
nameList.ensureIndexIsVisible(selectedIndex - 1);
}
}
}
/*
* 下移Item
*/
private class MoveDownItemAction extends UpdateAction {
public MoveDownItemAction() {
this.setName(Inter.getLocText("Utils-Move_Down"));
this.setMnemonic('D');
this.setSmallIcon(BaseUtils
.readIcon("/com/fr/design/images/control/down.png"));
}
@Override
public void actionPerformed(ActionEvent evt) {
int selectedIndex = nameList.getSelectedIndex();
if (selectedIndex == -1) {
return;
}
if (selectedIndex < nameList.getModel().getSize() - 1) {
DefaultListModel listModel = (DefaultListModel) nameList.getModel();
Object nextObj = listModel.get(selectedIndex + 1);
Object currentObj = listModel.get(selectedIndex);
listModel.set(selectedIndex + 1, currentObj);
listModel.set(selectedIndex, nextObj);
nameList.setSelectedIndex(selectedIndex + 1);
nameList.ensureIndexIsVisible(selectedIndex + 1);
}
}
}
private class SortItemAction extends UpdateAction {
private boolean isAtoZ = false;
public SortItemAction() {
this.setName(Inter.getLocText("FR-Action_Sort"));
this.setMnemonic('S');
this.setSmallIcon(BaseUtils
.readIcon("/com/fr/design/images/control/sortAsc.png"));
}
@Override
public void actionPerformed(ActionEvent evt) {
// p:选中的值.
Object selectedValue = nameList.getSelectedValue();
DefaultListModel listModel = (DefaultListModel) nameList.getModel();
if (listModel.getSize() <= 0) {
return;
}
Nameable[] nameableArray = new Nameable[listModel.getSize()];
for (int i = 0; i < listModel.getSize(); i++) {
nameableArray[i] = ((ListModelElement) listModel.getElementAt(i)).wrapper;
}
// p:排序.
if (isAtoZ) { // 升序
Comparator<Nameable> nameableComparator = new Comparator<Nameable>() {
@Override
public int compare(Nameable o1, Nameable o2) {
return ComparatorUtils.compare(o2.getName(), o1.getName());
}
};
isAtoZ = !isAtoZ;
Arrays.sort(nameableArray, nameableComparator);
} else { // 降序
Comparator<Nameable> nameableComparator = new Comparator<Nameable>() {
@Override
public int compare(Nameable o1, Nameable o2) {
return ComparatorUtils.compare(o1.getName(), o2
.getName());
}
};
isAtoZ = !isAtoZ;
Arrays.sort(nameableArray, nameableComparator);
}
for (int i = 0; i < nameableArray.length; i++) {
listModel.set(i, new ListModelElement(nameableArray[i]));
}
// p:需要选中以前的那个值.
if (selectedValue != null) {
nameList.setSelectedValue(selectedValue, true);
}
checkButtonEnabled();
// p:需要repaint.
nameList.repaint();
}
}
/*
* UIList的鼠标事件
*/
private MouseListener listMouseListener = new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
JList list = (JList) e.getSource();
if (list.locationToIndex(e.getPoint()) == -1 && !e.isShiftDown()
&& !isMenuShortcutKeyDown(e)) {
list.clearSelection();
}
}
private boolean isMenuShortcutKeyDown(InputEvent event) {
return (event.getModifiers() & Toolkit.getDefaultToolkit()
.getMenuShortcutKeyMask()) != 0;
}
};
/**
* 检查按钮可用状态 Check button enabled.
*/
public void checkButtonEnabled() {
for (ShortCut4JControlPane sj : getShorts()) {
sj.checkEnable();
}
}
/**
* 设置选中项
*
* @param index 选中项的序列号
*/
public void setSelectedIndex(int index) {
nameList.setSelectedIndex(index);
}
public class NormalEnableShortCut extends ShortCut4JControlPane {
public NormalEnableShortCut(ShortCut shortCut) {
this.shortCut = shortCut;
}
/**
* 检查是否可用
*/
@Override
public void checkEnable() {
this.shortCut.setEnabled(getModel()
.getSize() > 0
&& UISimpleListControlPane.this.nameList.getSelectedIndex() != -1);
}
}
private class NameableListCellRenderer extends
JPanel implements ListCellRenderer {
private UILabel label;
private UISimpleListControlPane listControlPane;
private Color initialLabelForeground;
public NameableListCellRenderer(UISimpleListControlPane listControlPane) {
super();
this.listControlPane = listControlPane;
initComponents();
setOpaque(true);
setBorder(getNoFocusBorder());
setName("List.cellRenderer");
}
private void initComponents() {
label = new UILabel();
label.setBorder(BorderFactory.createEmptyBorder(3, 10, 3, 0));
initialLabelForeground = label.getForeground();
this.setLayout(new BorderLayout());
this.add(label, BorderLayout.CENTER);
}
private Border getNoFocusBorder() {
return BorderFactory.createMatteBorder(0, 0, 1, 0, UIConstants.LIST_ITEM_SPLIT_LINE);
}
private void setText(String t) {
label.setText(t);
}
@Override
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus) {
setComponentOrientation(list.getComponentOrientation());
Color bg = null;
Color fg = null;
JList.DropLocation dropLocation = list.getDropLocation();
if (dropLocation != null
&& !dropLocation.isInsert()
&& dropLocation.getIndex() == index) {
bg = DefaultLookup.getColor(this, ui, "List.dropCellBackground");
fg = DefaultLookup.getColor(this, ui, "List.dropCellForeground");
isSelected = true;
}
if (isSelected) {
setBackground(bg == null ? list.getSelectionBackground() : bg);
setForeground(fg == null ? list.getSelectionForeground() : fg);
label.setForeground(Color.WHITE);
}
else {
setBackground(list.getBackground());
setForeground(list.getForeground());
label.setForeground(initialLabelForeground);
}
setText((value == null) ? StringUtils.EMPTY : value.toString());
setEnabled(list.isEnabled());
setFont(list.getFont());
if (value instanceof ListModelElement) {
Nameable wrappee = ((ListModelElement) value).wrapper;
this.setText(wrappee.getName());
}
return this;
}
}
}

11
designer_base/src/com/fr/design/gui/frpane/AbstractAttrNoScrollPane.java

@ -5,6 +5,7 @@ import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver; import com.fr.design.event.GlobalNameObserver;
import com.fr.design.event.UIObserver; import com.fr.design.event.UIObserver;
import com.fr.design.event.UIObserverListener; import com.fr.design.event.UIObserverListener;
import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -132,13 +133,19 @@ public abstract class AbstractAttrNoScrollPane extends BasicPane {
/** /**
* 返回图标的路径 * 返回图标的路径
*/ */
public abstract String getIconPath(); public String getIconPath() {
// 默认为空,子类有需要再重写
return StringUtils.EMPTY;
}
/** /**
* 界面标题 * 界面标题
* @return 标题 * @return 标题
*/ */
public abstract String title4PopupWindow(); public String title4PopupWindow() {
// 默认为空,子类有需要再重写
return StringUtils.EMPTY;
}
/** /**
* 设置选中的ID, 用于双击展示界面. * 设置选中的ID, 用于双击展示界面.

34
designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPane.java

@ -44,15 +44,12 @@ public abstract class HyperlinkGroupPane extends UIListControlPane {
@Override @Override
public void on(PluginEvent event) { public void on(PluginEvent event) {
refreshNameableCreator(createNameableCreators());
refreshNameableCreator(createNameableCreators());
} }
}, new PluginFilter() { }, new PluginFilter() {
@Override @Override
public boolean accept(PluginContext context) { public boolean accept(PluginContext context) {
return context.contain(HyperlinkProvider.XML_TAG); return context.contain(HyperlinkProvider.XML_TAG);
} }
}); });
@ -63,6 +60,7 @@ public abstract class HyperlinkGroupPane extends UIListControlPane {
* *
* @return 返回Nameable按钮数组. * @return 返回Nameable按钮数组.
*/ */
@Override
public NameableCreator[] createNameableCreators() { public NameableCreator[] createNameableCreators() {
Map<String, NameableCreator> nameCreators = new ListMap<>(); Map<String, NameableCreator> nameCreators = new ListMap<>();
NameableCreator[] creators = DesignModuleFactory.getHyperlinkGroupType().getHyperlinkCreators(); NameableCreator[] creators = DesignModuleFactory.getHyperlinkGroupType().getHyperlinkCreators();
@ -82,6 +80,7 @@ public abstract class HyperlinkGroupPane extends UIListControlPane {
* *
* @return 返回标题字符串. * @return 返回标题字符串.
*/ */
@Override
public String title4PopupWindow() { public String title4PopupWindow() {
return Inter.getLocText("FR-Designer_Hyperlink"); return Inter.getLocText("FR-Designer_Hyperlink");
} }
@ -91,11 +90,11 @@ public abstract class HyperlinkGroupPane extends UIListControlPane {
return Inter.getLocText("FR-Designer_Add_Hyperlink"); return Inter.getLocText("FR-Designer_Add_Hyperlink");
} }
public void populate(NameJavaScriptGroup nameHyperlink_array) { public void populate(NameJavaScriptGroup hyperlinkArray) {
java.util.List<NameObject> list = new ArrayList<NameObject>(); java.util.List<NameObject> list = new ArrayList<>();
if (nameHyperlink_array != null) { if (hyperlinkArray != null) {
for (int i = 0; i < nameHyperlink_array.size(); i++) { for (int i = 0; i < hyperlinkArray.size(); i++) {
list.add(new NameObject(nameHyperlink_array.getNameHyperlink(i).getName(), nameHyperlink_array.getNameHyperlink(i).getJavaScript())); list.add(new NameObject(hyperlinkArray.getNameHyperlink(i).getName(), hyperlinkArray.getNameHyperlink(i).getJavaScript()));
} }
} }
@ -113,20 +112,29 @@ public abstract class HyperlinkGroupPane extends UIListControlPane {
*/ */
public NameJavaScriptGroup updateJSGroup() { public NameJavaScriptGroup updateJSGroup() {
Nameable[] res = this.update(); Nameable[] res = this.update();
NameJavaScript[] res_array = new NameJavaScript[res.length]; NameJavaScript[] resArray = new NameJavaScript[res.length];
for (int i = 0; i < res.length; i++) { for (int i = 0; i < res.length; i++) {
NameObject no = (NameObject) res[i]; NameObject no = (NameObject) res[i];
res_array[i] = new NameJavaScript(no.getName(), (JavaScript) no.getObject()); resArray[i] = new NameJavaScript(no.getName(), (JavaScript) no.getObject());
} }
return new NameJavaScriptGroup(res_array); return new NameJavaScriptGroup(resArray);
} }
@Override @Override
public void saveSettings() { public void saveSettings() {
if (isPopulating) { if (isPopulating || !needAutoSave()) {
return; return;
} }
hyperlinkGroupPaneActionProvider.saveSettings(this); hyperlinkGroupPaneActionProvider.saveSettings(this);
} }
/**
* 是否需要自动保存到超级链接属性中
*
* @return 是否需要自动保存
*/
public boolean needAutoSave() {
return true;
}
} }

14
designer_base/src/com/fr/design/gui/frpane/HyperlinkGroupPaneActionProvider.java

@ -3,9 +3,23 @@ package com.fr.design.gui.frpane;
import com.fr.design.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
/** /**
* @author plough
* Created by plough on 2017/7/26. * Created by plough on 2017/7/26.
*/ */
public interface HyperlinkGroupPaneActionProvider { public interface HyperlinkGroupPaneActionProvider {
/**
* 刷新面板展示
*
* @param hyperlinkGroupPane 超链面板
* @param elementCasePane 模板
*/
void populate(HyperlinkGroupPane hyperlinkGroupPane, TargetComponent elementCasePane); void populate(HyperlinkGroupPane hyperlinkGroupPane, TargetComponent elementCasePane);
/**
* 保存到文件
*
* @param hyperlinkGroupPane 超联面板
*/
void saveSettings(HyperlinkGroupPane hyperlinkGroupPane); void saveSettings(HyperlinkGroupPane hyperlinkGroupPane);
} }

8
designer_base/src/com/fr/design/gui/ibutton/UISliderButtonUI.java

@ -12,7 +12,7 @@ import javax.swing.plaf.basic.BasicButtonUI;
import javax.swing.plaf.basic.BasicHTML; import javax.swing.plaf.basic.BasicHTML;
import javax.swing.text.View; import javax.swing.text.View;
import com.fr.base.BaseUtils; import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.design.roleAuthority.ReportAndFSManagePane;
import com.fr.stable.Constants; import com.fr.stable.Constants;
@ -174,7 +174,7 @@ public class UISliderButtonUI extends BasicButtonUI {
private void fillNormal(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted) { private void fillNormal(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted) {
GradientPaint gp; GradientPaint gp;
if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { if (DesignerMode.isAuthorityEditing() && isAuthorityEdited) {
gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.AUTHORITY_DARK_BLUE); gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.AUTHORITY_DARK_BLUE);
} else if (isPressedPainted) { } else if (isPressedPainted) {
gp = new GradientPaint(1, 1, UIConstants.SELECT_TAB, 1, height - 1, UIConstants.SELECT_TAB); gp = new GradientPaint(1, 1, UIConstants.SELECT_TAB, 1, height - 1, UIConstants.SELECT_TAB);
@ -187,7 +187,7 @@ public class UISliderButtonUI extends BasicButtonUI {
private void fillRollOver(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted) { private void fillRollOver(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted) {
GradientPaint gp; GradientPaint gp;
if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { if (DesignerMode.isAuthorityEditing() && isAuthorityEdited) {
gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.HOVER_BLUE); gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.HOVER_BLUE);
} else if (isPressedPainted) { } else if (isPressedPainted) {
gp = new GradientPaint(1, 1, UIConstants.POP_DIALOG_BORDER, 1, height - 1, UIConstants.POP_DIALOG_BORDER); gp = new GradientPaint(1, 1, UIConstants.POP_DIALOG_BORDER, 1, height - 1, UIConstants.POP_DIALOG_BORDER);
@ -199,7 +199,7 @@ public class UISliderButtonUI extends BasicButtonUI {
private void fillPressed(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited) { private void fillPressed(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited) {
Color oldColor = g2d.getColor(); Color oldColor = g2d.getColor();
if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { if (DesignerMode.isAuthorityEditing() && isAuthorityEdited) {
g2d.setColor(UIConstants.AUTHORITY_PRESS_BLUE); g2d.setColor(UIConstants.AUTHORITY_PRESS_BLUE);
} else { } else {
g2d.setColor(UIConstants.POP_DIALOG_BORDER); g2d.setColor(UIConstants.POP_DIALOG_BORDER);

5
designer_base/src/com/fr/design/gui/icontainer/UIEastResizableContainer.java

@ -1,11 +1,10 @@
package com.fr.design.gui.icontainer; package com.fr.design.gui.icontainer;
import com.fr.base.BaseUtils; import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.Constants;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -281,7 +280,7 @@ public class UIEastResizableContainer extends JPanel {
} }
onResize(); onResize();
refreshContainer(); refreshContainer();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
DesignerContext.getDesignerFrame().doResize(); DesignerContext.getDesignerFrame().doResize();
} }
} }

10
designer_base/src/com/fr/design/gui/icontainer/UIModeControlContainer.java

@ -1,6 +1,6 @@
package com.fr.design.gui.icontainer; package com.fr.design.gui.icontainer;
import com.fr.base.BaseUtils; import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -72,7 +72,7 @@ public class UIModeControlContainer extends JLayeredPane {
public void needToShowCoverAndHidPane() { public void needToShowCoverAndHidPane() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
this.remove(coverPane); this.remove(coverPane);
this.remove(hidePane); this.remove(hidePane);
} else { } else {
@ -115,7 +115,7 @@ public class UIModeControlContainer extends JLayeredPane {
if (isHideMode || !upEditMode) { if (isHideMode || !upEditMode) {
return; return;
} }
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
setCursor(Cursor.getPredefinedCursor(Cursor.N_RESIZE_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.N_RESIZE_CURSOR));
@ -142,7 +142,7 @@ public class UIModeControlContainer extends JLayeredPane {
@Override @Override
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
boolean notUpEditMode = isHideMode || !upEditMode; boolean notUpEditMode = isHideMode || !upEditMode;
@ -183,7 +183,7 @@ public class UIModeControlContainer extends JLayeredPane {
setUpPaneHeight(0); setUpPaneHeight(0);
} }
if (BaseUtils.isAuthorityEditing() && isSheeetCovered) { if (DesignerMode.isAuthorityEditing() && isSheeetCovered) {
sheetInvisibleCoverPane.setBounds(0, toolPaneY + toolPaneHeight + UIConstants.SIZE, getWidth(), getHeight() - toolPaneY - toolPaneHeight - sheetCorverGap); sheetInvisibleCoverPane.setBounds(0, toolPaneY + toolPaneHeight + UIConstants.SIZE, getWidth(), getHeight() - toolPaneY - toolPaneHeight - sheetCorverGap);
UIModeControlContainer.this.add(sheetInvisibleCoverPane); UIModeControlContainer.this.add(sheetInvisibleCoverPane);
UIModeControlContainer.this.setLayer(sheetInvisibleCoverPane, 2); UIModeControlContainer.this.setLayer(sheetInvisibleCoverPane, 2);

7
designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java

@ -1,11 +1,10 @@
package com.fr.design.gui.icontainer; package com.fr.design.gui.icontainer;
import com.fr.base.BaseUtils; import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.collections.utils.MathUtils;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -443,7 +442,7 @@ public class UIResizableContainer extends JPanel {
containerWidth = toolPaneHeight; containerWidth = toolPaneHeight;
} }
refreshContainer(); refreshContainer();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
DesignerContext.getDesignerFrame().doResize(); DesignerContext.getDesignerFrame().doResize();
} }
@ -476,7 +475,7 @@ public class UIResizableContainer extends JPanel {
containerWidth = toolPaneHeight; containerWidth = toolPaneHeight;
} }
refreshContainer(); refreshContainer();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
DesignerContext.getDesignerFrame().doResize(); DesignerContext.getDesignerFrame().doResize();
} }
} }

20
designer_base/src/com/fr/design/gui/ilable/UILabel.java

@ -1,9 +1,15 @@
package com.fr.design.gui.ilable; package com.fr.design.gui.ilable;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.Icon;
import java.awt.*; import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
/** /**
* Created by IntelliJ IDEA. * Created by IntelliJ IDEA.
@ -13,6 +19,7 @@ import java.awt.*;
* Time: 下午3:15 * Time: 下午3:15
*/ */
public class UILabel extends JLabel { public class UILabel extends JLabel {
private static final int HTML_SHIFT_HEIGHT = 3;
public UILabel(String text, Icon image, int horizontalAlignment) { public UILabel(String text, Icon image, int horizontalAlignment) {
super(text, image, horizontalAlignment); super(text, image, horizontalAlignment);
@ -46,6 +53,15 @@ public class UILabel extends JLabel {
super(); super();
} }
@Override
public Dimension getPreferredSize() {
Dimension preferredSize = super.getPreferredSize();
// (Windows 下)使用 html 时,文字内容会略微向下偏移,导致文字底部被截断,所以适当增加 UILabel 的高度
if (StringUtils.isNotEmpty(getText()) && getText().startsWith("<html>")) {
return new Dimension(preferredSize.width, preferredSize.height + HTML_SHIFT_HEIGHT);
}
return preferredSize;
}
public static void main(String[] args) { public static void main(String[] args) {
// UILabel label = new UILabel("shishi",SwingConstants.LEFT); // UILabel label = new UILabel("shishi",SwingConstants.LEFT);

2
designer_base/src/com/fr/design/gui/ispinner/UISpinner.java

@ -23,7 +23,7 @@ import java.awt.event.*;
public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver { public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver {
protected double value = -1; protected double value;
private static final int SIZE = 20; private static final int SIZE = 20;
private static final int LEN = 13; private static final int LEN = 13;
private static final int WIDTH = 13; private static final int WIDTH = 13;

37
designer_base/src/com/fr/design/icon/IconPathConstants.java

@ -1 +1,36 @@
package com.fr.design.icon; /** * Created by IntelliJ IDEA. * Author : Richer * Version: 6.5.6 * Date: 12-12-18 * Time: 上午9:42 * 用于保存所有图标路径的类 */ public class IconPathConstants { private IconPathConstants() { } public static final String ADD_POPMENU_ICON_PATH = "/com/fr/design/images/control/addPopup.png"; public static final String DS_ICON_PATH = "/com/fr/design/images/data/datasource.png"; public static final String CLASS_TD_ICON_PATH = "/com/fr/design/images/data/source/classTableData.png"; public static final String EMB_TD_ICON_PATH = "/com/fr/design/images/data/dataTable.png"; public static final String DS_RELATION_TD_ICON_PATH = "/com/fr/design/images/data/multi.png"; public static final String FILE_TD_ICON_PATH = "/com/fr/design/images/data/file.png"; public static final String DS_TREE_TD_ICON_PATH = "/com/fr/design/images/data/tree.png"; public static final String DS_QUERY_ICON_PATH = "/com/fr/design/images/data/database.png"; public static final String PREVIEW_ICON_PATH = "/com/fr/design/images/m_file/preview.png"; public static final String TD_EDIT_ICON_PATH = "/com/fr/design/images/control/edit.png"; public static final String TD_EL_SHARE_HELP_ICON_PATH = "/com/fr/design/images/control/help_open.png"; public static final String TD_EL_SHARE_CLOSE_ICON_PATH = "/com/fr/design/images/control/help_close.png"; public static final String TD_REMOVE_ICON_PATH = "/com/fr/design/images/control/tab/remove.png"; public static final String TD_CONNECTION_ICON_PATH = "/com/fr/design/images/m_web/connection.png"; public static final String SP_SHOW_ICON_PATH = "/com/fr/design/images/data/store_procedure.png"; public static final String STD_SHOW_ICON_PATH = "/com/fr/design/images/data/dock/serverdatabase.png"; public static final String XMLA_ICON_PATH = "/com/fr/design/images/data/cube.png"; public static final String FORBID_ICON_PATH = "/com/fr/web/images/form/forbid.png"; } package com.fr.design.icon;
/**
* Created by IntelliJ IDEA.
* Author : Richer
* Version: 6.5.6
* Date: 12-12-18
* Time: 上午9:42
* 用于保存所有图标路径的类
*/
public class IconPathConstants {
private IconPathConstants() {
}
public static final String ADD_POPMENU_ICON_PATH = "/com/fr/design/images/control/addPopup.png";
public static final String DS_ICON_PATH = "/com/fr/design/images/data/datasource.png";
public static final String CLASS_TD_ICON_PATH = "/com/fr/design/images/data/source/classTableData.png";
public static final String EMB_TD_ICON_PATH = "/com/fr/design/images/data/dataTable.png";
public static final String DS_RELATION_TD_ICON_PATH = "/com/fr/design/images/data/multi.png";
public static final String FILE_TD_ICON_PATH = "/com/fr/design/images/data/file.png";
public static final String DS_TREE_TD_ICON_PATH = "/com/fr/design/images/data/tree.png";
public static final String DS_QUERY_ICON_PATH = "/com/fr/design/images/data/database.png";
public static final String PREVIEW_ICON_PATH = "/com/fr/design/images/m_file/preview.png";
public static final String TD_EDIT_ICON_PATH = "/com/fr/design/images/control/edit.png";
public static final String TD_EL_SHARE_HELP_ICON_PATH = "/com/fr/design/images/control/help_open.png";
public static final String TD_EL_SHARE_CLOSE_ICON_PATH = "/com/fr/design/images/control/help_close.png";
public static final String TD_REMOVE_ICON_PATH = "/com/fr/design/images/control/tab/remove.png";
public static final String TD_CONNECTION_ICON_PATH = "/com/fr/design/images/m_web/connection.png";
public static final String SP_SHOW_ICON_PATH = "/com/fr/design/images/data/store_procedure.png";
public static final String STD_SHOW_ICON_PATH = "/com/fr/design/images/data/dock/serverdatabase.png";
public static final String XMLA_ICON_PATH = "/com/fr/design/images/data/cube.png";
public static final String FORBID_ICON_PATH = "/com/fr/web/images/form/forbid.png";
public static final String EDIT_ICON_PATH = "/com/fr/design/images/control/newEdit.png";
}

BIN
designer_base/src/com/fr/design/images/buttonicon/add_press.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

After

Width:  |  Height:  |  Size: 321 B

BIN
designer_base/src/com/fr/design/images/buttonicon/addicon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 203 B

BIN
designer_base/src/com/fr/design/images/control/newEdit.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

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

@ -2168,3 +2168,23 @@ FR-Designer_Tab_Pentagon_Style=Pentagon Style
FR-Designer_Tab_Trapezoid_Style=Trapezoid Style FR-Designer_Tab_Trapezoid_Style=Trapezoid Style
FR-Designer_Tab_Display_Position=Display Position FR-Designer_Tab_Display_Position=Display Position
FR-Designer_Background_Select=Select Background FR-Designer_Background_Select=Select Background
FR-Designer_Set_Mobile_Only_Template=Set as mobile only template
FR-Designer_Set_Mobile_Canvas_Size=Set as mobile canvas size
FR-Designer_Adaptive_Property_Auto_Match=Adaptive property auto match
FR-Designer_Canvas_Size_Lock_Desc=The size of the canvas is 375*560, the width is locked, the height is customizable
FR-Designer_Mobile_Screen_Match_Desc=4.7 inch screen phone: fit
FR-Designer_Mobile_Screen_Zoom_In_Desc=4.7 inch or more mobile phones: zooming in
FR-Designer_Mobile_Screen_Zoom_Out_Desc=4.7 inch mobile phone: zooming out
FR-Designer_Adaptive_Property_Auto_Match_Desc=In order to improve the end template effect of the mobile phone, when using the reserved layout function, the component scaling logic under the adaptive layout is set as "lateral adaptive"
FR-Designer_Template_Settings=Template Settings
FR-Designer_Form_Widget_Rename_Failure=There are the same components, please set the other name
FR-Designer_Joption_News=news
FR-Designer_Zoom_In_Logic=zoom in logic
FR-Designer_Zoom_Out_Logic=zoom out logic
FR-Designer_Chart_Adaptivity=chart adaptivity
FR-Designer_Tip_Chart_Adaptivity_Unavailable=Under the reserved layout state, the chart does not support the setting of self-adaptive
FR-Designer_Official_Website=Official Website:
FR-Designer_Support_Email=Email:
FR-Designer_Tip_Chart_Adaptivity_Unavailable_In_Absolute_Layout=Under the absolute canvas block, the chart does not support the setting of self-adaptive
FR-Designer_Max_Height_Cannot_Be_Negative=The maximum height cannot be negative
FR-Designer_How_To_Join=

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

@ -2141,8 +2141,8 @@ FR-Designer_Float_Visible=Suspended elements are visible
FR-Designer_Widget_String=Character string FR-Designer_Widget_String=Character string
FR-Designer_Widget_Field=field FR-Designer_Widget_Field=field
FR-Designer_Widget_Enabled=Control available FR-Designer_Widget_Enabled=Control available
FR-Designer_Export_Background= FR-Designer_Print_Background=Print Background
FR-Designer_Print_Background= FR-Designer_Export_Background=Export Background
FR-Designer_Sheet_Label_Page_Display_Position= FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All= FR-Designer_Provide_Choose_All=
FR-Designer_Decimal_Places= FR-Designer_Decimal_Places=
@ -2167,3 +2167,23 @@ FR-Designer_Tab_Pentagon_Style=Pentagon Style
FR-Designer_Tab_Trapezoid_Style=Trapezoid Style FR-Designer_Tab_Trapezoid_Style=Trapezoid Style
FR-Designer_Tab_Display_Position=Display Position FR-Designer_Tab_Display_Position=Display Position
FR-Designer_Background_Select=Select Background FR-Designer_Background_Select=Select Background
FR-Designer_Set_Mobile_Only_Template=Set as mobile only template
FR-Designer_Set_Mobile_Canvas_Size=Set as mobile canvas size
FR-Designer_Adaptive_Property_Auto_Match=Adaptive property auto match
FR-Designer_Canvas_Size_Lock_Desc=The size of the canvas is 375*560, the width is locked, the height is customizable
FR-Designer_Mobile_Screen_Match_Desc=4.7 inch screen phone: fit
FR-Designer_Mobile_Screen_Zoom_In_Desc=4.7 inch or more mobile phones: zooming in
FR-Designer_Mobile_Screen_Zoom_Out_Desc=4.7 inch mobile phone: zooming out
FR-Designer_Adaptive_Property_Auto_Match_Desc=In order to improve the end template effect of the mobile phone, when using the reserved layout function, the component scaling logic under the adaptive layout is set as "lateral adaptive"
FR-Designer_Template_Settings=Template Settings
FR-Designer_Form_Widget_Rename_Failure=There are the same components, please set the other name
FR-Designer_Joption_News=news
FR-Designer_Zoom_In_Logic=zoom in logic
FR-Designer_Zoom_Out_Logic=zoom out logic
FR-Designer_Chart_Adaptivity=chart adaptivity
FR-Designer_Tip_Chart_Adaptivity_Unavailable=Under the reserved layout state, the chart does not support the setting of self-adaptive
FR-Designer_Official_Website=Official Website:
FR-Designer_Support_Email=Email:
FR-Designer_Tip_Chart_Adaptivity_Unavailable_In_Absolute_Layout=Under the absolute canvas block, the chart does not support the setting of self-adaptive
FR-Designer_Max_Height_Cannot_Be_Negative=The maximum height cannot be negative
FR-Designer_How_To_Join=Poke me to learn how to join the thank you list

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

@ -2167,4 +2167,21 @@ FR-Designer_Tab_Menu_Style=
FR-Designer_Tab_Pentagon_Style= FR-Designer_Tab_Pentagon_Style=
FR-Designer_Tab_Trapezoid_Style= FR-Designer_Tab_Trapezoid_Style=
FR-Designer_Tab_Display_Position= FR-Designer_Tab_Display_Position=
FR-Designer_Background_Select= FR-Designer_Background_Select=
FR-Designer_Set_Mobile_Only_Template=
FR-Designer_Set_Mobile_Canvas_Size=
FR-Designer_Mobile_Screen_Zoom_In=
FR-Designer_Mobile_Screen_Zoom_Out=
FR-Designer_Adaptive_Property_Auto_Match_Desc=
FR-Designer_Template_Settings=
FR-Designer_Form_Widget_Rename_Failure=\u5B58\u5728\u30EA\u30CD\u30FC\u30E0\u3059\u308B\u30E2\u30B8\u30E5\u30FC\u30EB\u306F\u3001\u4ED6\u306E\u540D\u79F0\u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044\u3002
FR-Designer_Joption_News=\u30CB\u30E5\u30FC\u30B9
FR-Designer_Zoom_In_Logic=
FR-Designer_Zoom_Out_Logic=
FR-Designer_Chart_Adaptivity=
FR-Designer_Tip_Chart_Adaptivity_Unavailable=
FR-Designer_Official_Website=
FR-Designer_Support_Email=
FR-Designer_Tip_Chart_Adaptivity_Unavailable_In_Absolute_Layout=
FR-Designer_Max_Height_Cannot_Be_Negative=
FR-Designer_How_To_Join=

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

@ -2145,14 +2145,13 @@ FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All=\uC81C\uACF5\uBAA8\uB450\uC120\uD0DD FR-Designer_Provide_Choose_All=\uC81C\uACF5\uBAA8\uB450\uC120\uD0DD
FR-Designer_Decimal_Places=\uC18C\uC218\uC218\uB7C9: FR-Designer_Decimal_Places=\uC18C\uC218\uC218\uB7C9:
FR-Base-Load_Resource_File=\uB85C\uB529\uAD6C\uC131\uD30C\uC77C FR-Base-Load_Resource_File=\uB85C\uB529\uAD6C\uC131\uD30C\uC77C
FR-Designer_Export_Background= FR-Designer_Print_Background=\uC778\uC1C4\uBB38\uC11C\uBC30\uACBD
FR-Designer_Print_Background= FR-Designer_Export_Background=\uB0B4\uBCF4\uB0B4\uAE30\uBB38\uC11C\uBC30\uACBD
FR-Designer_Env_Des_Https= FR-Designer_Env_Des_Https=
FR-Designer_Format_JavaScript=Format Code FR-Designer_Format_JavaScript=Format Code
FR-Designer_Tip_Content= FR-Designer_Tip_Content=
FR-Designer_Chart_Empty_Data= FR-Designer_Chart_Empty_Data=
FR-Designer-Vcs_tab_click= FR-Designer-Vcs_tab_click=
FR-Designer_Move_Up=
FR-Designer_Move_Down= FR-Designer_Move_Down=
FR-Designer_Move_To_Top= FR-Designer_Move_To_Top=
FR-Designer_Move_To_Bottom= FR-Designer_Move_To_Bottom=
@ -2167,4 +2166,23 @@ FR-Designer_Tab_Menu_Style=
FR-Designer_Tab_Pentagon_Style= FR-Designer_Tab_Pentagon_Style=
FR-Designer_Tab_Trapezoid_Style= FR-Designer_Tab_Trapezoid_Style=
FR-Designer_Tab_Display_Position= FR-Designer_Tab_Display_Position=
FR-Designer_Background_Select= FR-Designer_Background_Select=
FR-Designer_Set_Mobile_Only_Template=
FR-Designer_Set_Mobile_Canvas_Size=
FR-Designer_Adaptive_Property_Auto_Match=
FR-Designer_Mobile_Screen_Zoom_In=
FR-Designer_Mobile_Screen_Zoom_Out=
FR-Designer_Mobile_Screen_Zoom_Out_Desc=
FR-Designer_Adaptive_Property_Auto_Match_Desc=
FR-Designer_Template_Settings=
FR-Designer_Form_Widget_Rename_Failure=\uC874\uC7AC \uB3D9\uBA85 \uAD6C\uC131 \uC694\uC18C \uC124\uC815 \uC880 \uB2E4\uB978 \uC774\uB984
FR-Designer_Joption_News=\uC18C\uC2DD
FR-Designer_Zoom_In_Logic=
FR-Designer_Zoom_Out_Logic=
FR-Designer_Chart_Adaptivity=
FR-Designer_Tip_Chart_Adaptivity_Unavailable=
FR-Designer_Official_Website=
FR-Designer_Support_Email=
FR-Designer_Tip_Chart_Adaptivity_Unavailable_In_Absolute_Layout=
FR-Designer_Max_Height_Cannot_Be_Negative=
FR-Designer_How_To_Join=

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

@ -60,9 +60,9 @@ FR-Designer-Widget-Title_border_color=\u989C\u8272
FR-Designer_AbsoluteLayout=\u7EDD\u5BF9\u5E03\u5C40 FR-Designer_AbsoluteLayout=\u7EDD\u5BF9\u5E03\u5C40
FR-Designer_Allow_Decimals=\u5141\u8BB8\u5C0F\u6570 FR-Designer_Allow_Decimals=\u5141\u8BB8\u5C0F\u6570
FR-Designer_Allow_Negative=\u5141\u8BB8\u8D1F\u503C FR-Designer_Allow_Negative=\u5141\u8BB8\u8D1F\u503C
FR-Designer_Background-Click=\u70B9\u51FB\u80CC\u666F FR-Designer_Background-Click=\u9F20\u6807\u70B9\u51FB\u80CC\u666F
FR-Designer_Background-Initial=\u521D\u59CB\u80CC\u666F FR-Designer_Background-Initial=\u521D\u59CB\u80CC\u666F
FR-Designer_Background-Over=\u60AC\u6D6E\u80CC\u666F FR-Designer_Background-Over=\u9F20\u6807\u6D6E\u52A8\u80CC\u666F
FR-Designer_Bar-Code-Exception-Tip=\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A FR-Designer_Bar-Code-Exception-Tip=\u6570\u636E\u4E0D\u80FD\u4E3A\u7A7A
FR-Designer_Block-intersect=\u7981\u6B62\u5757\u4E0E\u5757\u4E4B\u95F4\u7684\u91CD\u53E0 FR-Designer_Block-intersect=\u7981\u6B62\u5757\u4E0E\u5757\u4E4B\u95F4\u7684\u91CD\u53E0
FR-Designer_BorderLayout=\u8FB9\u754C\u5E03\u5C40 FR-Designer_BorderLayout=\u8FB9\u754C\u5E03\u5C40
@ -2142,8 +2142,8 @@ FR-Designer_Widgetname=\u63A7\u4EF6\u540D
FR-Designer_Insert_Cell_Element=\u63D2\u5165\u5143\u7D20 FR-Designer_Insert_Cell_Element=\u63D2\u5165\u5143\u7D20
FR-Designer-Plugin_Has_Been_Actived= FR-Designer-Plugin_Has_Been_Actived=
FR-Designer-Plugin_Has_Been_Disabled= FR-Designer-Plugin_Has_Been_Disabled=
FR-Designer_Export_Background= FR-Designer_Print_Background=\u6253\u5370\u62A5\u8868\u80CC\u666F
FR-Designer_Print_Background= FR-Designer_Export_Background=\u5BFC\u51FA\u62A5\u8868\u80CC\u666F
FR-Designer_Sheet_Label_Page_Display_Position= FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All= FR-Designer_Provide_Choose_All=
FR-Designer_Decimal_Places= FR-Designer_Decimal_Places=
@ -2167,4 +2167,24 @@ FR-Designer_Tab_Menu_Style=\u83DC\u5355\u5F0F
FR-Designer_Tab_Pentagon_Style=\u4E94\u8FB9\u5F62 FR-Designer_Tab_Pentagon_Style=\u4E94\u8FB9\u5F62
FR-Designer_Tab_Trapezoid_Style=\u68AF\u5F62 FR-Designer_Tab_Trapezoid_Style=\u68AF\u5F62
FR-Designer_Tab_Display_Position=\u663E\u793A\u4F4D\u7F6E FR-Designer_Tab_Display_Position=\u663E\u793A\u4F4D\u7F6E
FR-Designer_Background_Select=\u9009\u4E2D\u80CC\u666F FR-Designer_Background_Select=\u9009\u4E2D\u80CC\u666F
FR-Designer_Set_Mobile_Only_Template=\u8BBE\u7F6E\u4E3A\u624B\u673A\u7AEF\u4E13\u5C5E\u6A21\u7248
FR-Designer_Set_Mobile_Canvas_Size=\u8BBE\u7F6E\u4E3A\u624B\u673A\u6A21\u7248\u753B\u5E03\u5927\u5C0F
FR-Designer_Adaptive_Property_Auto_Match=\u81EA\u9002\u5E94\u5C5E\u6027\u81EA\u52A8\u5339\u914D
FR-Designer_Canvas_Size_Lock_Desc=\u753B\u5E03\u5927\u5C0F375*560\uFF0C\u5BBD\u5EA6\u9501\u5B9A\uFF0C\u9AD8\u5EA6\u53EF\u81EA\u5B9A\u4E49
FR-Designer_Mobile_Screen_Match_Desc=4.7\u5BF8\u5C4F\u5E55\u624B\u673A\uFF1A\u9002\u914D
FR-Designer_Mobile_Screen_Zoom_In_Desc=4.7\u5BF8\u4EE5\u4E0A\u624B\u673A\uFF1A\u653E\u5927
FR-Designer_Mobile_Screen_Zoom_Out_Desc=4.7\u5BF8\u4EE5\u4E0B\u624B\u673A\uFF1A\u538B\u7F29
FR-Designer_Adaptive_Property_Auto_Match_Desc=\u4E3A\u63D0\u5347\u624B\u673A\u7AEF\u6A21\u7248\u6548\u679C\uFF0C\u5728\u4F7F\u7528\u4FDD\u7559\u5E03\u5C40\u529F\u80FD\u65F6\uFF0C\u8BBE\u7F6E\u81EA\u9002\u5E94\u5E03\u5C40\u65B9\u5F0F\u4E0B\u7684\u7EC4\u4EF6\u7F29\u653E\u903B\u8F91\u4E3A"\u6A2A\u5411\u81EA\u9002\u5E94"
FR-Designer_Template_Settings=\u6A21\u7248\u8BBE\u7F6E
FR-Designer_Form_Widget_Rename_Failure=\u5B58\u5728\u91CD\u540D\u7EC4\u4EF6\uFF0C\u8BF7\u8BBE\u7F6E\u5176\u4ED6\u540D\u79F0
FR-Designer_Joption_News=\u6D88\u606F
FR-Designer_Zoom_In_Logic=\u653E\u5927\u903B\u8F91
FR-Designer_Zoom_Out_Logic=\u7F29\u5C0F\u903B\u8F91
FR-Designer_Chart_Adaptivity=\u56FE\u8868\u81EA\u9002\u5E94
FR-Designer_Tip_Chart_Adaptivity_Unavailable=\u4FDD\u7559\u5E03\u5C40\u72B6\u6001\u4E0B\uFF0C\u56FE\u8868\u4E0D\u652F\u6301\u8BBE\u7F6E\u81EA\u9002\u5E94
FR-Designer_Official_Website=\u5B98\u65B9\u7F51\u7AD9\uFF1A
FR-Designer_Support_Email=\u652F\u6301\u90AE\u7BB1\uFF1A
FR-Designer_Tip_Chart_Adaptivity_Unavailable_In_Absolute_Layout=\u7EDD\u5BF9\u753B\u5E03\u5757\u72B6\u6001\u4E0B\uFF0C\u56FE\u8868\u4E0D\u652F\u6301\u8BBE\u7F6E\u81EA\u9002\u5E94
FR-Designer_Max_Height_Cannot_Be_Negative=\u6700\u5927\u9AD8\u5EA6\u4E0D\u53EF\u4E3A\u8D1F\u503C
FR-Designer_How_To_Join=\u6233\u6211\u4E86\u89E3\u5982\u4F55\u52A0\u5165\u81F4\u8C22\u540D\u5355

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

@ -59,9 +59,9 @@ FR-Designer-Widget-Title_border_color=\u6A19\u984C\u6846\u7DDA\u984F\u8272
FR-Designer_AbsoluteLayout=\u7D55\u5C0D\u4F48\u5C40 FR-Designer_AbsoluteLayout=\u7D55\u5C0D\u4F48\u5C40
FR-Designer_Allow_Decimals=\u5141\u8A31\u5C0F\u6578 FR-Designer_Allow_Decimals=\u5141\u8A31\u5C0F\u6578
FR-Designer_Allow_Negative=\u5141\u8A31\u8CA0\u503C FR-Designer_Allow_Negative=\u5141\u8A31\u8CA0\u503C
FR-Designer_Background-Click=\u9EDE\u64CA\u80CC\u666F FR-Designer_Background-Click=\u6ED1\u9F20\u9EDE\u64CA\u80CC\u666F
FR-Designer_Background-Initial=\u521D\u59CB\u80CC\u666F FR-Designer_Background-Initial=\u521D\u59CB\u80CC\u666F
FR-Designer_Background-Over=\u61F8\u6D6E\u80CC\u666F FR-Designer_Background-Over=\u6ED1\u9F20\u61F8\u6D6E\u80CC\u666F
FR-Designer_Bar-Code-Exception-Tip=\u689D\u78BC\u4F8B\u5916\u63D0\u793A FR-Designer_Bar-Code-Exception-Tip=\u689D\u78BC\u4F8B\u5916\u63D0\u793A
FR-Designer_Block-intersect=\u5340\u584A\u91CD\u758A FR-Designer_Block-intersect=\u5340\u584A\u91CD\u758A
FR-Designer_BorderLayout=\u908A\u754C\u5E03\u5C40 FR-Designer_BorderLayout=\u908A\u754C\u5E03\u5C40
@ -2141,8 +2141,8 @@ FR-Designer_Float_Visible=\u61F8\u6D6E\u5143\u7D20\u53EF\u898B
FR-Designer_Widget_String=\u5B57\u4E32 FR-Designer_Widget_String=\u5B57\u4E32
FR-Designer_Widget_Field=\u6B04\u4F4D FR-Designer_Widget_Field=\u6B04\u4F4D
FR-Designer_Widget_Enabled=\u63A7\u5236\u5143\u4EF6\u53EF\u7528 FR-Designer_Widget_Enabled=\u63A7\u5236\u5143\u4EF6\u53EF\u7528
FR-Designer_Export_Background= FR-Designer_Print_Background=\u5217\u5370\u5831\u8868\u80CC\u666F
FR-Designer_Print_Background= FR-Designer_Export_Background=\u532F\u51FA\u5831\u8868\u80CC\u666F
FR-Designer_Sheet_Label_Page_Display_Position= FR-Designer_Sheet_Label_Page_Display_Position=
FR-Designer_Provide_Choose_All= FR-Designer_Provide_Choose_All=
FR-Designer_Decimal_Places= FR-Designer_Decimal_Places=
@ -2166,4 +2166,24 @@ FR-Designer_Tab_Menu_Style=\u83DC\u55AE\u5F0F
FR-Designer_Tab_Pentagon_Style=\u4E94\u908A\u5F62 FR-Designer_Tab_Pentagon_Style=\u4E94\u908A\u5F62
FR-Designer_Tab_Trapezoid_Style=\u68AF\u5F62 FR-Designer_Tab_Trapezoid_Style=\u68AF\u5F62
FR-Designer_Tab_Display_Position=\u986F\u793A\u4F4D\u7F6E FR-Designer_Tab_Display_Position=\u986F\u793A\u4F4D\u7F6E
FR-Designer_Background_Select=\u9078\u4E2D\u80CC\u666F FR-Designer_Background_Select=\u9078\u4E2D\u80CC\u666F
FR-Designer_Set_Mobile_Only_Template=\u8A2D\u5B9A\u70BA\u624B\u6A5F\u7AEF\u5C08\u5C6C\u6A21\u7248
FR-Designer_Set_Mobile_Canvas_Size=\u8A2D\u5B9A\u70BA\u624B\u6A5F\u6A21\u7248\u756B\u5E03\u5927\u5C0F
FR-Designer_Adaptive_Property_Auto_Match=\u81EA\u6211\u8ABF\u6574\u5185\u5BB9\u81EA\u52D5\u5339\u914D
FR-Designer_Canvas_Size_Lock_Desc=\u756B\u5E03\u5927\u5C0F375*560\uFF0C\u5BEC\u5EA6\u9396\u5B9A\uFF0C\u9AD8\u5EA6\u53EF\u81EA\u5B9A\u7FA9
FR-Designer_Mobile_Screen_Match_Desc=4.7\u5BF8\u8367\u5E55\u624B\u6A5F\uFF1A\u9069\u914D
FR-Designer_Mobile_Screen_Zoom_In_Desc=4.7\u5BF8\u4EE5\u4E0A\u624B\u6A5F\uFF1A\u653E\u5927
FR-Designer_Mobile_Screen_Zoom_Out_Desc=4.7\u5BF8\u4EE5\u4E0B\u624B\u6A5F\uFF1A\u58D3\u7E2E
FR-Designer_Adaptive_Property_Auto_Match_Desc=\u70BA\u63D0\u5347\u624B\u6A5F\u7AEF\u6A21\u7248\u6548\u679C\uFF0C\u5728\u4F7F\u7528\u4FDD\u7559\u4F48\u5C40\u529F\u80FD\u6642\uFF0C\u8A2D\u5B9A\u81EA\u6211\u8ABF\u6574\u4F48\u5C40\u7BA1\u9053\u4E0B\u7684\u7D44\u4EF6\u7E2E\u653E\u908F\u8F2F\u70BA\u201C\u6A6B\u5411\u81EA\u6211\u8ABF\u6574\u201D
FR-Designer_Template_Settings=\u6A21\u7248\u8A2D\u5B9A
FR-Designer_Form_Widget_Rename_Failure=\u5B58\u5728\u91CD\u540D\u7D44\u4EF6\uFF0C\u8ACB\u8A2D\u5B9A\u5176\u4ED6\u540D\u7A31
FR-Designer_Joption_News=\u6D88\u606F
FR-Designer_Zoom_In_Logic=\u653E\u5927\u908F\u8F2F
FR-Designer_Zoom_Out_Logic=\u7E2E\u5C0F\u908F\u8F2F
FR-Designer_Chart_Adaptivity=\u5716\u8868\u81EA\u6211\u8ABF\u6574
FR-Designer_Tip_Chart_Adaptivity_Unavailable=\u4FDD\u7559\u4F48\u5C40\u72C0\u614B\u4E0B\uFF0C\u5716\u8868\u4E0D\u652F\u6301\u8A2D\u5B9A\u81EA\u6211\u8ABF\u6574
FR-Designer_Official_Website=\u5B98\u65B9\u7DB2\u7AD9\uFF1A
FR-Designer_Support_Email=\u652F\u6301\u90F5\u7BB1\uFF1A
FR-Designer_Tip_Chart_Adaptivity_Unavailable_In_Absolute_Layout=\u7D55\u5C0D\u756B\u5E03\u584A\u72C0\u614B\u4E0B\uFF0C\u5716\u8868\u4E0D\u652F\u6301\u8A2D\u5B9A\u81EA\u6211\u8ABF\u6574
FR-Designer_Max_Height_Cannot_Be_Negative=\u6700\u5927\u9AD8\u5EA6\u4E0D\u53EF\u70BA\u8CA0\u503C
FR-Designer_How_To_Join=\u6233\u6211\u4E86\u89E3\u5982\u4F55\u52A0\u5165\u81F4\u8B1D\u540D\u55AE

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

@ -6,6 +6,7 @@ package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.Env; import com.fr.base.Env;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
@ -185,8 +186,8 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
} }
public void mouseReleased(MouseEvent e) { public void mouseReleased(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
BaseUtils.setAuthorityEditing(false); DesignerMode.setMode(DesignerMode.NORMARL);
WestRegionContainerPane.getInstance().replaceDownPane( WestRegionContainerPane.getInstance().replaceDownPane(
TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter())); TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()));
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane();
@ -262,7 +263,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
this.addComponentListener(new ComponentAdapter() { this.addComponentListener(new ComponentAdapter() {
public void componentResized(ComponentEvent e) { public void componentResized(ComponentEvent e) {
reCalculateFrameSize(); reCalculateFrameSize();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
doResize(); doResize();
} }
} }
@ -456,7 +457,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
* 刷新 * 刷新
*/ */
public void refreshDottedLine() { public void refreshDottedLine() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
populateAuthorityArea(); populateAuthorityArea();
populateCloseButton(); populateCloseButton();
addDottedLine(); addDottedLine();
@ -515,7 +516,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
for (int i = 0; i < fixButtons.length; i++) { for (int i = 0; i < fixButtons.length; i++) {
combineUp.add(fixButtons[i]); combineUp.add(fixButtons[i]);
} }
if (!BaseUtils.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
combineUp.addSeparator(new Dimension(2, 16)); combineUp.addSeparator(new Dimension(2, 16));
if (toolbar4Form != null) { if (toolbar4Form != null) {
for (int i = 0; i < toolbar4Form.length; i++) { for (int i = 0; i < toolbar4Form.length; i++) {
@ -626,13 +627,13 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
*/ */
public void needToAddAuhtorityPaint() { public void needToAddAuhtorityPaint() {
newWorkBookPane.setButtonGray(BaseUtils.isAuthorityEditing()); newWorkBookPane.setButtonGray(DesignerMode.isAuthorityEditing());
// 进入或退出权限编辑模式,通知插件 // 进入或退出权限编辑模式,通知插件
Set<ShortCut> extraShortCuts = ExtraDesignClassManager.getInstance().getExtraShortCuts(); Set<ShortCut> extraShortCuts = ExtraDesignClassManager.getInstance().getExtraShortCuts();
for (ShortCut shortCut : extraShortCuts) { for (ShortCut shortCut : extraShortCuts) {
if (shortCut instanceof AbstractTemplateTreeShortCutProvider) { if (shortCut instanceof AbstractTemplateTreeShortCutProvider) {
((AbstractTemplateTreeShortCutProvider) shortCut).notifyFromAuhtorityChange(BaseUtils.isAuthorityEditing()); ((AbstractTemplateTreeShortCutProvider) shortCut).notifyFromAuhtorityChange(DesignerMode.isAuthorityEditing());
} }
} }

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

@ -2,6 +2,7 @@ package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
@ -119,7 +120,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
HistoryTemplateListPane.getInstance().setCurrentEditingTemplate(jt); HistoryTemplateListPane.getInstance().setCurrentEditingTemplate(jt);
//处理自动新建的模板 //处理自动新建的模板
MutilTempalteTabPane.getInstance().doWithtemTemplate(); MutilTempalteTabPane.getInstance().doWithtemTemplate();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
RolesAlreadyEditedPane.getInstance().refreshDockingView(); RolesAlreadyEditedPane.getInstance().refreshDockingView();
} }

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

@ -1,6 +1,7 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
@ -436,7 +437,7 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
// 无可用 tab 时,显示提示文字 // 无可用 tab 时,显示提示文字
if (!hasAvailableTab) { if (!hasAvailableTab) {
resetPropertyIcons(); resetPropertyIcons();
if (!hasEnabledTab && BaseUtils.isAuthorityEditing()) { if (!hasEnabledTab && DesignerMode.isAuthorityEditing()) {
propertyCard.show(rightPane, DEFAULT_AUTHORITY_PANE); propertyCard.show(rightPane, DEFAULT_AUTHORITY_PANE);
} else { } else {
propertyCard.show(rightPane, DEFAULT_PANE); propertyCard.show(rightPane, DEFAULT_PANE);

32
designer_base/src/com/fr/design/mainframe/JTemplate.java

@ -281,7 +281,7 @@ public abstract class JTemplate<T extends IOFile, U extends BaseUndoState<?>> ex
* @return 是则返回true * @return 是则返回true
*/ */
public boolean isSaved() { public boolean isSaved() {
return BaseUtils.isAuthorityEditing() ? this.authoritySaved : this.saved; return DesignerMode.isAuthorityEditing() ? this.authoritySaved : this.saved;
} }
/** /**
@ -304,7 +304,7 @@ public abstract class JTemplate<T extends IOFile, U extends BaseUndoState<?>> ex
} }
public void setSaved(boolean isSaved) { public void setSaved(boolean isSaved) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
authoritySaved = isSaved; authoritySaved = isSaved;
} else { } else {
saved = isSaved; saved = isSaved;
@ -315,7 +315,7 @@ public abstract class JTemplate<T extends IOFile, U extends BaseUndoState<?>> ex
* @return * @return
*/ */
public UndoManager getUndoManager() { public UndoManager getUndoManager() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
if (this.authorityUndoManager == null) { if (this.authorityUndoManager == null) {
this.authorityUndoManager = new UndoManager(); this.authorityUndoManager = new UndoManager();
int limit = DesignerEnvManager.getEnvManager().getUndoLimit(); int limit = DesignerEnvManager.getEnvManager().getUndoLimit();
@ -389,7 +389,7 @@ public abstract class JTemplate<T extends IOFile, U extends BaseUndoState<?>> ex
return; return;
} }
//如果是在不同的模式下产生的 //如果是在不同的模式下产生的
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
this.getUndoManager().addEdit(new UndoStateEdit(authorityUndoState, newState)); this.getUndoManager().addEdit(new UndoStateEdit(authorityUndoState, newState));
authorityUndoState = newState; authorityUndoState = newState;
} else { } else {
@ -418,7 +418,7 @@ public abstract class JTemplate<T extends IOFile, U extends BaseUndoState<?>> ex
} }
private void fireSuperTargetModified() { private void fireSuperTargetModified() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
this.authoritySaved = false; this.authoritySaved = false;
} else { } else {
this.saved = false; this.saved = false;
@ -621,7 +621,7 @@ public abstract class JTemplate<T extends IOFile, U extends BaseUndoState<?>> ex
return false; return false;
} }
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
//触发保存服务器工具栏 //触发保存服务器工具栏
try { try {
FRContext.getCurrentEnv().writeResource(ConfigManager.getProviderInstance()); FRContext.getCurrentEnv().writeResource(ConfigManager.getProviderInstance());
@ -687,7 +687,7 @@ public abstract class JTemplate<T extends IOFile, U extends BaseUndoState<?>> ex
public ShortCut[] shortcut4FileMenu() { public ShortCut[] shortcut4FileMenu() {
if (DesignerMode.isVcsMode()) { if (DesignerMode.isVcsMode()) {
return VcsScene.shortcut4FileMenu(this); return VcsScene.shortcut4FileMenu(this);
} else if (BaseUtils.isAuthorityEditing()) { } else if (DesignerMode.isAuthorityEditing()) {
return new ShortCut[]{new SaveTemplateAction(this), new UndoAction(this), new RedoAction(this)}; return new ShortCut[]{new SaveTemplateAction(this), new UndoAction(this), new RedoAction(this)};
} else { } else {
return new ShortCut[]{new SaveTemplateAction(this), new SaveAsTemplateAction(this), new UndoAction(this), new RedoAction(this)}; return new ShortCut[]{new SaveTemplateAction(this), new SaveAsTemplateAction(this), new UndoAction(this), new RedoAction(this)};
@ -703,7 +703,7 @@ public abstract class JTemplate<T extends IOFile, U extends BaseUndoState<?>> ex
public MenuDef[] menus4Target() { public MenuDef[] menus4Target() {
MenuDef tplMenu = new MenuDef(Inter.getLocText("FR-Designer_M-Template"), 'T'); MenuDef tplMenu = new MenuDef(Inter.getLocText("FR-Designer_M-Template"), 'T');
tplMenu.setAnchor(MenuHandler.TEMPLATE); tplMenu.setAnchor(MenuHandler.TEMPLATE);
if (!BaseUtils.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
tplMenu.addShortCut(new NameSeparator(Inter.getLocText("FR-Designer_WorkBook"))); tplMenu.addShortCut(new NameSeparator(Inter.getLocText("FR-Designer_WorkBook")));
tplMenu.addShortCut(new TableDataSourceAction(this)); tplMenu.addShortCut(new TableDataSourceAction(this));
tplMenu.addShortCut(shortcut4TemplateMenu()); tplMenu.addShortCut(shortcut4TemplateMenu());
@ -908,7 +908,7 @@ public abstract class JTemplate<T extends IOFile, U extends BaseUndoState<?>> ex
*/ */
public void activeJTemplate(int index, JTemplate jt) { public void activeJTemplate(int index, JTemplate jt) {
DesignerContext.getDesignerFrame().activateJTemplate(this); DesignerContext.getDesignerFrame().activateJTemplate(this);
}; }
/** /**
* 激活已存在的模板 * 激活已存在的模板
@ -992,10 +992,24 @@ public abstract class JTemplate<T extends IOFile, U extends BaseUndoState<?>> ex
return UIConstants.RUN_BIG_ICON; return UIConstants.RUN_BIG_ICON;
} }
/**
* 获取所有参数
*
* @return
*/
public Parameter[] getParameters() { public Parameter[] getParameters() {
return new Parameter[0]; return new Parameter[0];
} }
/**
* 获取模板参数
*
* @return
*/
public Parameter[] getJTemplateParameters() {
return new Parameter[0];
}
/** /**
* 请求表单焦点 * 请求表单焦点
*/ */

6
designer_base/src/com/fr/design/mainframe/UndoStateEdit.java

@ -1,7 +1,7 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.vcs.DesignerMode;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
import com.fr.general.Inter; import com.fr.general.Inter;
@ -52,7 +52,7 @@ public class UndoStateEdit extends AbstractUndoableEdit {
if (this.old != null) { if (this.old != null) {
this.old.applyState(); this.old.applyState();
} }
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
RolesAlreadyEditedPane.getInstance().refreshDockingView(); RolesAlreadyEditedPane.getInstance().refreshDockingView();
} }
} }
@ -67,7 +67,7 @@ public class UndoStateEdit extends AbstractUndoableEdit {
if (this.cur != null) { if (this.cur != null) {
this.cur.applyState(); this.cur.applyState();
} }
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
RolesAlreadyEditedPane.getInstance().refreshDockingView(); RolesAlreadyEditedPane.getInstance().refreshDockingView();
} }
} }

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

@ -3,7 +3,6 @@
*/ */
package com.fr.design.mainframe.toolbar; package com.fr.design.mainframe.toolbar;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.vcs.DesignerMode; import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignState; import com.fr.design.DesignState;
@ -336,7 +335,7 @@ public abstract class ToolBarMenuDock {
} }
MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_File"), 'F'); MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_File"), 'F');
ShortCut[] scs = new ShortCut[0]; ShortCut[] scs = new ShortCut[0];
if (!BaseUtils.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
scs = createNewFileShortCuts(); scs = createNewFileShortCuts();
} }
if (!ArrayUtils.isEmpty(scs)) { if (!ArrayUtils.isEmpty(scs)) {
@ -367,13 +366,13 @@ public abstract class ToolBarMenuDock {
} }
protected void addCloseCurrentTemplateAction(MenuDef menuDef) { protected void addCloseCurrentTemplateAction(MenuDef menuDef) {
if (!BaseUtils.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
menuDef.addShortCut(new CloseCurrentTemplateAction()); menuDef.addShortCut(new CloseCurrentTemplateAction());
} }
} }
protected void addPreferenceAction(MenuDef menuDef) { protected void addPreferenceAction(MenuDef menuDef) {
if (!BaseUtils.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
menuDef.addShortCut(new PreferenceAction()); menuDef.addShortCut(new PreferenceAction());
} }
} }
@ -409,7 +408,7 @@ public abstract class ToolBarMenuDock {
protected MenuDef createServerMenuDef(ToolBarMenuDockPlus plus) { protected MenuDef createServerMenuDef(ToolBarMenuDockPlus plus) {
MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_M-Server"), 'S'); MenuDef menuDef = new MenuDef(Inter.getLocText("FR-Designer_M-Server"), 'S');
if (!BaseUtils.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
menuDef.addShortCut( menuDef.addShortCut(
new ConnectionListAction(), new ConnectionListAction(),
createGlobalTDAction() createGlobalTDAction()
@ -421,7 +420,7 @@ public abstract class ToolBarMenuDock {
new PlatformManagerAction() new PlatformManagerAction()
); );
if (!BaseUtils.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
if (shouldShowPlugin()) { if (shouldShowPlugin()) {
menuDef.addShortCut( menuDef.addShortCut(
new PluginManagerAction() new PluginManagerAction()

4
designer_base/src/com/fr/design/mainframe/toolbar/VcsScene.java

@ -1,6 +1,6 @@
package com.fr.design.mainframe.toolbar; package com.fr.design.mainframe.toolbar;
import com.fr.base.BaseUtils; import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.edit.RedoAction; import com.fr.design.actions.edit.RedoAction;
import com.fr.design.actions.edit.UndoAction; import com.fr.design.actions.edit.UndoAction;
import com.fr.design.actions.file.ExitDesignerAction; import com.fr.design.actions.file.ExitDesignerAction;
@ -32,7 +32,7 @@ public class VcsScene {
menuDef.addShortCut(SeparatorDef.DEFAULT); menuDef.addShortCut(SeparatorDef.DEFAULT);
} }
if (!BaseUtils.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
menuDef.addShortCut(new PreferenceAction()); menuDef.addShortCut(new PreferenceAction());
} }

31
designer_base/src/com/fr/design/mainframe/widget/BasicPropertyPane.java

@ -13,6 +13,10 @@ import javax.swing.BorderFactory;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Component; import java.awt.Component;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
/** /**
* Created by plough on 2017/8/7. * Created by plough on 2017/8/7.
@ -27,7 +31,32 @@ public class BasicPropertyPane extends BasicPane {
protected void initContentPane() { protected void initContentPane() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
widgetName = new UITextField(); widgetName = new UITextField() {
protected void initListener() {
if (shouldResponseChangeListener()) {
addFocusListener(new FocusListener() {
@Override
public void focusGained(FocusEvent e) {
}
@Override
public void focusLost(FocusEvent e) {
attributeChange();
}
});
addKeyListener(new KeyAdapter() {
@Override
public void keyPressed(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_ENTER) {
attributeChange();
}
}
});
}
}
};
widgetName.setGlobalName(Inter.getLocText("FR-Designer_Basic")); widgetName.setGlobalName(Inter.getLocText("FR-Designer_Basic"));
double f = TableLayout.FILL; double f = TableLayout.FILL;
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;

3
designer_base/src/com/fr/design/roleAuthority/ReportAndFSManagePane.java

@ -1,6 +1,7 @@
package com.fr.design.roleAuthority; package com.fr.design.roleAuthority;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.DesignTableDataManager;
@ -265,7 +266,7 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo
DesignTableDataManager.addDsChangeListener(new ChangeListener() { DesignTableDataManager.addDsChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
roleTree.refreshTreeNode(); roleTree.refreshTreeNode();
expandTree(roleTree, true); expandTree(roleTree, true);
roleTree.updateUI(); roleTree.updateUI();

10
designer_base/src/com/fr/design/utils/gui/GUIPaintUtils.java

@ -1,6 +1,6 @@
package com.fr.design.utils.gui; package com.fr.design.utils.gui;
import com.fr.base.BaseUtils; import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.stable.Constants; import com.fr.stable.Constants;
@ -17,7 +17,7 @@ public class GUIPaintUtils {
public static final void drawBorder(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited) { public static final void drawBorder(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited) {
Color oldColor = g2d.getColor(); Color oldColor = g2d.getColor();
Shape oldClip = g2d.getClip(); Shape oldClip = g2d.getClip();
if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { if (DesignerMode.isAuthorityEditing() && isAuthorityEdited) {
g2d.setColor(UIConstants.AUTHORITY_LINE_COLOR); g2d.setColor(UIConstants.AUTHORITY_LINE_COLOR);
} else { } else {
g2d.setColor(UIConstants.POP_DIALOG_BORDER); g2d.setColor(UIConstants.POP_DIALOG_BORDER);
@ -67,7 +67,7 @@ public class GUIPaintUtils {
public static final void fillNormal(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted, Color color) { public static final void fillNormal(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted, Color color) {
GradientPaint gp; GradientPaint gp;
if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { if (DesignerMode.isAuthorityEditing() && isAuthorityEdited) {
gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.AUTHORITY_DARK_BLUE); gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.AUTHORITY_DARK_BLUE);
} else if (isPressedPainted) { } else if (isPressedPainted) {
gp = new GradientPaint(1, 1, color, 1, height - 1, color); gp = new GradientPaint(1, 1, color, 1, height - 1, color);
@ -99,7 +99,7 @@ public class GUIPaintUtils {
GradientPaint gp; GradientPaint gp;
if (hoverColor != null) { if (hoverColor != null) {
gp = new GradientPaint(1, 1, hoverColor, 1, height - 1, hoverColor); gp = new GradientPaint(1, 1, hoverColor, 1, height - 1, hoverColor);
} else if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { } else if (DesignerMode.isAuthorityEditing() && isAuthorityEdited) {
gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.HOVER_BLUE); gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.HOVER_BLUE);
} else if (isPressedPainted) { } else if (isPressedPainted) {
gp = new GradientPaint(1, 1, UIConstants.ATTRIBUTE_HOVER, 1, height - 1, UIConstants.ATTRIBUTE_HOVER); gp = new GradientPaint(1, 1, UIConstants.ATTRIBUTE_HOVER, 1, height - 1, UIConstants.ATTRIBUTE_HOVER);
@ -129,7 +129,7 @@ public class GUIPaintUtils {
Color oldColor = g2d.getColor(); Color oldColor = g2d.getColor();
if (pressedColor != null) { if (pressedColor != null) {
g2d.setColor(pressedColor); g2d.setColor(pressedColor);
} else if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { } else if (DesignerMode.isAuthorityEditing() && isAuthorityEdited) {
g2d.setColor(UIConstants.AUTHORITY_PRESS_BLUE); g2d.setColor(UIConstants.AUTHORITY_PRESS_BLUE);
} else { } else {
g2d.setColor(UIConstants.ATTRIBUTE_PRESS); g2d.setColor(UIConstants.ATTRIBUTE_PRESS);

10
designer_base/src/com/fr/start/BaseDesigner.java

@ -67,7 +67,9 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
} }
private void init(String[] args) { private void init(String[] args) {
prepare();
RestartHelper.deleteRecordFilesWhenStart(); RestartHelper.deleteRecordFilesWhenStart();
ConfigManagerFactory.registerConfigManagerProxy(new ConfigManagerCreatorProxy()); ConfigManagerFactory.registerConfigManagerProxy(new ConfigManagerCreatorProxy());
//启动core //启动core
@ -108,6 +110,12 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
initLookAndFeel(args, splashWindow); initLookAndFeel(args, splashWindow);
} }
private void prepare() {
//屏蔽IBM对私钥公钥的检查
System.getProperties().setProperty("com.ibm.crypto.provider.DoRSATypeChecking","false");
}
private void initLookAndFeel(String[] args, SplashWindow splashWindow) { private void initLookAndFeel(String[] args, SplashWindow splashWindow) {
// 初始化look and feel.这个在预加载之前执行是因为lookAndFeel里的东西,预加载时也要用到 // 初始化look and feel.这个在预加载之前执行是因为lookAndFeel里的东西,预加载时也要用到

7
designer_chart/src/com/fr/plugin/chart/custom/component/VanChartHyperLinkPane.java

@ -1,5 +1,6 @@
package com.fr.plugin.chart.custom.component; package com.fr.plugin.chart.custom.component;
import com.fr.base.BaseFormula;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.chart.web.ChartHyperPoplink; import com.fr.chart.web.ChartHyperPoplink;
import com.fr.chart.web.ChartHyperRelateCellLink; import com.fr.chart.web.ChartHyperRelateCellLink;
@ -77,7 +78,7 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
Constructor<? extends BasicBeanPane> constructor = null; Constructor<? extends BasicBeanPane> constructor = null;
try { try {
constructor = creator.getUpdatePane().getConstructor(HashMap.class, boolean.class); constructor = creator.getUpdatePane().getConstructor(HashMap.class, boolean.class);
return constructor.newInstance(plot.getHyperLinkEditorMap(), false); return constructor.newInstance(getHyperLinkEditorMap(), false);
} catch (InstantiationException e) { } catch (InstantiationException e) {
FRLogger.getLogger().error(e.getMessage(), e); FRLogger.getLogger().error(e.getMessage(), e);
@ -91,6 +92,10 @@ public class VanChartHyperLinkPane extends VanChartUIListControlPane {
return null; return null;
} }
protected Map<String, BaseFormula> getHyperLinkEditorMap() {
return plot.getHyperLinkEditorMap();
}
/** /**
* 弹出列表的标题. * 弹出列表的标题.

10
designer_chart/src/com/fr/plugin/chart/designer/style/background/AlertLineListControlPane.java

@ -51,7 +51,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot; VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot;
List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList(); List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList();
List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList(); List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList();
String[] axisNames = DefaultAxisHelper.getAllAxisNames(xAxisList, yAxisList); String[] axisNames = DefaultAxisHelper.getAllAxisNames(rectanglePlot);
ChartNameObjectCreator[] creators = {new ChartNameObjectCreator(getAlertAxisName(axisNames), Inter.getLocText("Plugin-ChartF_AlertLine"), VanChartAlertValue.class, getAlertPaneClass())}; ChartNameObjectCreator[] creators = {new ChartNameObjectCreator(getAlertAxisName(axisNames), Inter.getLocText("Plugin-ChartF_AlertLine"), VanChartAlertValue.class, getAlertPaneClass())};
@ -63,7 +63,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAlertValue> values = axis.getAlertValues(); List<VanChartAlertValue> values = axis.getAlertValues();
for (VanChartAlertValue alertValue : values) { for (VanChartAlertValue alertValue : values) {
alertValue.setAxisNamesArray(axisNames); alertValue.setAxisNamesArray(axisNames);
alertValue.setAxisName(axis.getAxisName()); alertValue.setAxisName(rectanglePlot.getXAxisName(axis));
nameObjects.add(new NameObject(alertValue.getAlertPaneSelectName(), alertValue)); nameObjects.add(new NameObject(alertValue.getAlertPaneSelectName(), alertValue));
} }
} }
@ -72,7 +72,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAlertValue> values = axis.getAlertValues(); List<VanChartAlertValue> values = axis.getAlertValues();
for (VanChartAlertValue alertValue : values) { for (VanChartAlertValue alertValue : values) {
alertValue.setAxisNamesArray(axisNames); alertValue.setAxisNamesArray(axisNames);
alertValue.setAxisName(axis.getAxisName()); alertValue.setAxisName(rectanglePlot.getYAxisName(axis));
nameObjects.add(new NameObject(alertValue.getAlertPaneSelectName(), alertValue)); nameObjects.add(new NameObject(alertValue.getAlertPaneSelectName(), alertValue));
} }
} }
@ -93,7 +93,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAlertValue> axisAlerts = new ArrayList<VanChartAlertValue>(); List<VanChartAlertValue> axisAlerts = new ArrayList<VanChartAlertValue>();
for (int i = 0; i < nameables.length; i++) { for (int i = 0; i < nameables.length; i++) {
VanChartAlertValue value = (VanChartAlertValue) ((NameObject) nameables[i]).getObject(); VanChartAlertValue value = (VanChartAlertValue) ((NameObject) nameables[i]).getObject();
if (ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())) { if (ComparatorUtils.equals(value.getAxisName(), rectanglePlot.getXAxisName(axis))) {
value.setAlertPaneSelectName(nameables[i].getName()); value.setAlertPaneSelectName(nameables[i].getName());
axisAlerts.add(value); axisAlerts.add(value);
} }
@ -104,7 +104,7 @@ public class AlertLineListControlPane extends VanChartUIListControlPane {
List<VanChartAlertValue> axisAlerts = new ArrayList<VanChartAlertValue>(); List<VanChartAlertValue> axisAlerts = new ArrayList<VanChartAlertValue>();
for (int i = 0; i < nameables.length; i++) { for (int i = 0; i < nameables.length; i++) {
VanChartAlertValue value = (VanChartAlertValue) ((NameObject) nameables[i]).getObject(); VanChartAlertValue value = (VanChartAlertValue) ((NameObject) nameables[i]).getObject();
if (ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())) { if (ComparatorUtils.equals(value.getAxisName(), rectanglePlot.getYAxisName(axis))) {
value.setAlertPaneSelectName(nameables[i].getName()); value.setAlertPaneSelectName(nameables[i].getName());
axisAlerts.add(value); axisAlerts.add(value);
} }

10
designer_chart/src/com/fr/plugin/chart/designer/style/background/BackgroundListControlPane.java

@ -53,7 +53,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot; VanChartRectanglePlot rectanglePlot = (VanChartRectanglePlot) plot;
List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList(); List<VanChartAxis> xAxisList = rectanglePlot.getXAxisList();
List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList(); List<VanChartAxis> yAxisList = rectanglePlot.getYAxisList();
String[] axisNames = DefaultAxisHelper.getAllAxisNames(xAxisList, yAxisList); String[] axisNames = DefaultAxisHelper.getAllAxisNames(rectanglePlot);
BackgroundNameObjectCreator[] creators = {new BackgroundNameObjectCreator(getCustomIntervalBackgroundAxisName(axisNames), Inter.getLocText("Plugin-ChartF_CustomIntervalBackground"), VanChartCustomIntervalBackground.class, getIntervalPaneClass())}; BackgroundNameObjectCreator[] creators = {new BackgroundNameObjectCreator(getCustomIntervalBackgroundAxisName(axisNames), Inter.getLocText("Plugin-ChartF_CustomIntervalBackground"), VanChartCustomIntervalBackground.class, getIntervalPaneClass())};
@ -66,7 +66,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
List<VanChartCustomIntervalBackground> customIntervalBackgrounds = axis.getCustomIntervalBackgroundArray(); List<VanChartCustomIntervalBackground> customIntervalBackgrounds = axis.getCustomIntervalBackgroundArray();
for (VanChartCustomIntervalBackground background : customIntervalBackgrounds) { for (VanChartCustomIntervalBackground background : customIntervalBackgrounds) {
background.setAxisNamesArray(axisNames); background.setAxisNamesArray(axisNames);
background.setAxisName(axis.getAxisName()); background.setAxisName((rectanglePlot.getXAxisName(axis)));
nameObjects.add(new NameObject(background.getCustomIntervalBackgroundSelectName(), background)); nameObjects.add(new NameObject(background.getCustomIntervalBackgroundSelectName(), background));
} }
@ -75,7 +75,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
List<VanChartCustomIntervalBackground> customIntervalBackgrounds = axis.getCustomIntervalBackgroundArray(); List<VanChartCustomIntervalBackground> customIntervalBackgrounds = axis.getCustomIntervalBackgroundArray();
for (VanChartCustomIntervalBackground background : customIntervalBackgrounds) { for (VanChartCustomIntervalBackground background : customIntervalBackgrounds) {
background.setAxisNamesArray(axisNames); background.setAxisNamesArray(axisNames);
background.setAxisName(axis.getAxisName()); background.setAxisName(rectanglePlot.getXAxisName(axis));
nameObjects.add(new NameObject(background.getCustomIntervalBackgroundSelectName(), background)); nameObjects.add(new NameObject(background.getCustomIntervalBackgroundSelectName(), background));
} }
} }
@ -102,7 +102,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
if (!isDefaultIntervalBackground) { if (!isDefaultIntervalBackground) {
for (int i = 0; i < nameables.length; i++) { for (int i = 0; i < nameables.length; i++) {
VanChartCustomIntervalBackground value = (VanChartCustomIntervalBackground) ((NameObject) nameables[i]).getObject(); VanChartCustomIntervalBackground value = (VanChartCustomIntervalBackground) ((NameObject) nameables[i]).getObject();
if (ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())) { if (ComparatorUtils.equals(value.getAxisName(), rectanglePlot.getXAxisName(axis))) {
value.setCustomIntervalBackgroundSelectName(nameables[i].getName()); value.setCustomIntervalBackgroundSelectName(nameables[i].getName());
axisCustomBackground.add(value); axisCustomBackground.add(value);
} }
@ -115,7 +115,7 @@ public class BackgroundListControlPane extends VanChartUIListControlPane {
if (!isDefaultIntervalBackground) { if (!isDefaultIntervalBackground) {
for (int i = 0; i < nameables.length; i++) { for (int i = 0; i < nameables.length; i++) {
VanChartCustomIntervalBackground value = (VanChartCustomIntervalBackground) ((NameObject) nameables[i]).getObject(); VanChartCustomIntervalBackground value = (VanChartCustomIntervalBackground) ((NameObject) nameables[i]).getObject();
if (ComparatorUtils.equals(value.getAxisName(), axis.getAxisName())) { if (ComparatorUtils.equals(value.getAxisName(), rectanglePlot.getYAxisName(axis))) {
value.setCustomIntervalBackgroundSelectName(nameables[i].getName()); value.setCustomIntervalBackgroundSelectName(nameables[i].getName());
axisCustomBackground.add(value); axisCustomBackground.add(value);
} }

8
designer_chart/src/com/fr/plugin/chart/designer/style/series/VanChartStackedAndAxisListControlPane.java

@ -9,13 +9,11 @@ import com.fr.design.gui.controlpane.ShortCut4JControlPane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.NameObject; import com.fr.general.NameObject;
import com.fr.plugin.chart.attr.DefaultAxisHelper; import com.fr.plugin.chart.attr.DefaultAxisHelper;
import com.fr.plugin.chart.attr.axis.VanChartAxis;
import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot; import com.fr.plugin.chart.attr.plot.VanChartRectanglePlot;
import com.fr.plugin.chart.base.AttrSeriesStackAndAxis; import com.fr.plugin.chart.base.AttrSeriesStackAndAxis;
import com.fr.plugin.chart.column.VanChartCustomStackAndAxisConditionPane; import com.fr.plugin.chart.column.VanChartCustomStackAndAxisConditionPane;
import com.fr.plugin.chart.designer.component.VanChartUIListControlPane; import com.fr.plugin.chart.designer.component.VanChartUIListControlPane;
import com.fr.stable.Nameable; import com.fr.stable.Nameable;
import java.util.ArrayList; import java.util.ArrayList;
/** /**
@ -49,10 +47,8 @@ public class VanChartStackedAndAxisListControlPane extends VanChartUIListControl
public void populate(VanChartRectanglePlot plot) { public void populate(VanChartRectanglePlot plot) {
this.plot = plot; this.plot = plot;
java.util.List<VanChartAxis> xAxisList = plot.getXAxisList(); String[] axisXNames = DefaultAxisHelper.getXAxisNames(plot);
java.util.List<VanChartAxis> yAxisList = plot.getYAxisList(); String[] axisYNames = DefaultAxisHelper.getYAxisNames(plot);
String[] axisXNames = DefaultAxisHelper.getAxisNames(xAxisList);
String[] axisYNames = DefaultAxisHelper.getAxisNames(yAxisList);
java.util.List<StackedAndAxisNameObjectCreator> menuList = new ArrayList<StackedAndAxisNameObjectCreator>(); java.util.List<StackedAndAxisNameObjectCreator> menuList = new ArrayList<StackedAndAxisNameObjectCreator>();
AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis(); AttrSeriesStackAndAxis seriesStackAndAxis = new AttrSeriesStackAndAxis();

12
designer_chart/src/com/fr/plugin/chart/drillmap/designer/other/VanChartCatalogHyperLinkPane.java

@ -1,15 +1,27 @@
package com.fr.plugin.chart.drillmap.designer.other; package com.fr.plugin.chart.drillmap.designer.other;
import com.fr.base.BaseFormula;
import com.fr.chart.chartattr.Plot; import com.fr.chart.chartattr.Plot;
import com.fr.general.Inter;
import com.fr.js.NameJavaScriptGroup; import com.fr.js.NameJavaScriptGroup;
import com.fr.plugin.chart.custom.component.VanChartHyperLinkPane; import com.fr.plugin.chart.custom.component.VanChartHyperLinkPane;
import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot; import com.fr.plugin.chart.drillmap.VanChartDrillMapPlot;
import java.util.HashMap;
import java.util.Map;
/** /**
* Created by hufan on 2016/12/13. * Created by hufan on 2016/12/13.
*/ */
public class VanChartCatalogHyperLinkPane extends VanChartHyperLinkPane{ public class VanChartCatalogHyperLinkPane extends VanChartHyperLinkPane{
@Override
protected Map<String, BaseFormula> getHyperLinkEditorMap() {
HashMap<String, BaseFormula> map = new HashMap<String, BaseFormula>();
map.put(Inter.getLocText("FR-Chart-Area_Name"), BaseFormula.createFormulaBuilder().build("AREA_NAME"));
return map;
}
protected void updateHotHyperLink(Plot plot, NameJavaScriptGroup nameGroup) { protected void updateHotHyperLink(Plot plot, NameJavaScriptGroup nameGroup) {
if (plot instanceof VanChartDrillMapPlot) { if (plot instanceof VanChartDrillMapPlot) {
((VanChartDrillMapPlot) plot).setDrillUpHyperLink(nameGroup); ((VanChartDrillMapPlot) plot).setDrillUpHyperLink(nameGroup);

9
designer_chart/src/com/fr/plugin/chart/map/designer/type/VanChartMapSourceChoosePane.java

@ -588,15 +588,10 @@ public class VanChartMapSourceChoosePane extends JPanel implements UIObserver {
private String[] getParams() { private String[] getParams() {
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jTemplate == null){ if (jTemplate == null) {
return new String[0]; return new String[0];
} }
String[] params = new String[0]; return getParamsName((jTemplate.getJTemplateParameters()));
if(jTemplate.getTarget() instanceof ParameterHolder){
params = getParamsName(((ParameterHolder)jTemplate.getTarget()).getParameters());
}
return params;
} }
private String[] getParamsName(Parameter[] parameters) { private String[] getParamsName(Parameter[] parameters) {

36
designer_form/src/com/fr/design/designer/creator/XChartEditor.java

@ -6,10 +6,14 @@ import java.beans.IntrospectionException;
import javax.swing.*; import javax.swing.*;
import com.fr.base.GraphHelper;
import com.fr.base.chart.BaseChartCollection; import com.fr.base.chart.BaseChartCollection;
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.models.SelectionModel; import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.properties.mobile.ChartEditorPropertyUI;
import com.fr.design.designer.properties.mobile.ElementCasePropertyUI;
import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.design.gui.chart.BaseChartPropertyPane; import com.fr.design.gui.chart.BaseChartPropertyPane;
import com.fr.design.gui.chart.MiddleChartComponent; import com.fr.design.gui.chart.MiddleChartComponent;
import com.fr.design.mainframe.*; import com.fr.design.mainframe.*;
@ -20,6 +24,8 @@ import com.fr.form.ui.BaseChartEditor;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.design.form.util.XCreatorConstants; import com.fr.design.form.util.XCreatorConstants;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.Constants;
import com.fr.stable.GraphDrawHelper;
import com.fr.stable.core.PropertyChangeAdapter; import com.fr.stable.core.PropertyChangeAdapter;
/** /**
@ -31,6 +37,7 @@ import com.fr.stable.core.PropertyChangeAdapter;
*/ */
public class XChartEditor extends XBorderStyleWidgetCreator { public class XChartEditor extends XBorderStyleWidgetCreator {
private static final long serialVersionUID = -7009439442104836657L; private static final long serialVersionUID = -7009439442104836657L;
private static final int BORDER_WIDTH = 2;
//具体来说是DesignerEditor<SimpleChartComponent> //具体来说是DesignerEditor<SimpleChartComponent>
private DesignerEditor<JComponent> designerEditor; private DesignerEditor<JComponent> designerEditor;
// private DesignerEditor<SimpleChartComponent> designerEditor; // private DesignerEditor<SimpleChartComponent> designerEditor;
@ -38,7 +45,11 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
private boolean isRefreshing = false; private boolean isRefreshing = false;
private boolean isEditing = false; private boolean isEditing = false;
private boolean isHovering = false;
private JPanel coverPanel; private JPanel coverPanel;
private static final Color OUTER_BORDER_COLOR = new Color(65, 155, 249, 30);
private static final Color INNER_BORDER_COLOR = new Color(65, 155, 249);
public XChartEditor(BaseChartEditor editor) { public XChartEditor(BaseChartEditor editor) {
this(editor, new Dimension(250, 150)); this(editor, new Dimension(250, 150));
@ -117,6 +128,22 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
return false; return false;
} }
/**
* 编辑状态的时候需要重新绘制下边框
*
*/
@Override
public void paintBorder(Graphics g, Rectangle bounds){
if(isEditing){
g.setColor(OUTER_BORDER_COLOR);
GraphHelper.draw(g, new Rectangle(bounds.x - BORDER_WIDTH, bounds.y - BORDER_WIDTH, bounds.width + BORDER_WIDTH + 1, bounds.height + BORDER_WIDTH + 1), Constants.LINE_LARGE);
}else if(!isHovering){
super.paintBorder(g, bounds);
}
}
/** /**
* 返回设计器的Editor * 返回设计器的Editor
*/ */
@ -185,6 +212,10 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
public void paint(Graphics g) { public void paint(Graphics g) {
designerEditor.paintEditor(g, this.getSize()); designerEditor.paintEditor(g, this.getSize());
super.paint(g); super.paint(g);
if(isEditing){
g.setColor(INNER_BORDER_COLOR);
GraphHelper.draw(g, new Rectangle(0, 0, getWidth(), getHeight()), Constants.LINE_MEDIUM);
}
} }
/** /**
@ -259,6 +290,7 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
* @param display 是否 * @param display 是否
*/ */
public void displayCoverPane(boolean display){ public void displayCoverPane(boolean display){
isHovering = display;
coverPanel.setVisible(display); coverPanel.setVisible(display);
coverPanel.setPreferredSize(editor.getPreferredSize()); coverPanel.setPreferredSize(editor.getPreferredSize());
coverPanel.setBounds(editor.getBounds()); coverPanel.setBounds(editor.getBounds());
@ -285,4 +317,8 @@ public class XChartEditor extends XBorderStyleWidgetCreator {
initStyle(); initStyle();
} }
@Override
public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() {
return new WidgetPropertyUIProvider[]{ new ChartEditorPropertyUI(this)};
}
} }

32
designer_form/src/com/fr/design/designer/creator/XCreator.java

@ -3,7 +3,8 @@
*/ */
package com.fr.design.designer.creator; package com.fr.design.designer.creator;
import com.fr.base.BaseUtils; import com.fr.base.GraphHelper;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
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;
@ -12,16 +13,29 @@ import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.fun.WidgetPropertyUIProvider; import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.design.gui.imenu.UIPopupMenu; import com.fr.design.gui.imenu.UIPopupMenu;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.*; import com.fr.design.mainframe.AuthorityPropertyPane;
import com.fr.design.mainframe.BaseJForm;
import com.fr.design.mainframe.EditingMouseListener;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.NoSupportAuthorityEdit;
import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.utils.gui.LayoutUtils; import com.fr.design.utils.gui.LayoutUtils;
import com.fr.form.ui.Widget; import com.fr.form.ui.Widget;
import com.fr.form.ui.container.WTitleLayout; import com.fr.form.ui.container.WTitleLayout;
import com.fr.stable.Constants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.*; import javax.swing.BorderFactory;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.border.Border; import javax.swing.border.Border;
import java.awt.*; import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Rectangle;
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;
@ -279,7 +293,7 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo
*/ */
@Override @Override
public JComponent createToolPane(BaseJForm jform, FormDesigner formEditor) { public JComponent createToolPane(BaseJForm jform, FormDesigner formEditor) {
if (!BaseUtils.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
if (isDedicateContainer()) { if (isDedicateContainer()) {
// 图表块和报表块由于控件树处不显示,但对应的属性表要显示,此处处理下 // 图表块和报表块由于控件树处不显示,但对应的属性表要显示,此处处理下
XCreator child = ((XLayoutContainer) this).getXCreator(0); XCreator child = ((XLayoutContainer) this).getXCreator(0);
@ -690,6 +704,14 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo
// do nothing // do nothing
} }
/**
* 编辑状态的时候需要重新绘制下边框
*
*/
public void paintBorder(Graphics g, Rectangle bounds){
GraphHelper.draw(g, bounds, Constants.LINE_MEDIUM);
}
/** /**
* 创建右击弹出菜单 * 创建右击弹出菜单
* *

12
designer_form/src/com/fr/design/designer/creator/XElementCase.java

@ -1,6 +1,7 @@
package com.fr.design.designer.creator; package com.fr.design.designer.creator;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.GraphHelper;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.designer.properties.mobile.ElementCasePropertyUI; import com.fr.design.designer.properties.mobile.ElementCasePropertyUI;
import com.fr.design.form.util.XCreatorConstants; import com.fr.design.form.util.XCreatorConstants;
@ -20,6 +21,7 @@ import com.fr.form.ui.ElementCaseEditor;
import com.fr.form.ui.ElementCaseEditorProvider; import com.fr.form.ui.ElementCaseEditorProvider;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.Constants;
import com.fr.stable.CoreGraphHelper; import com.fr.stable.CoreGraphHelper;
import com.fr.stable.core.PropertyChangeAdapter; import com.fr.stable.core.PropertyChangeAdapter;
import com.fr.stable.fun.FitProvider; import com.fr.stable.fun.FitProvider;
@ -38,6 +40,7 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
private CoverReportPane coverPanel; private CoverReportPane coverPanel;
private FormDesigner designer; private FormDesigner designer;
private static BufferedImage DEFAULT_BACKGROUND; private static BufferedImage DEFAULT_BACKGROUND;
private boolean isHovering = false;
static{ static{
try{ try{
@ -216,11 +219,20 @@ public class XElementCase extends XBorderStyleWidgetCreator implements FormEleme
* @param display 是否 * @param display 是否
*/ */
public void displayCoverPane(boolean display){ public void displayCoverPane(boolean display){
isHovering = display;
coverPanel.setVisible(display); coverPanel.setVisible(display);
coverPanel.setBounds(1, 1, (int) editor.getBounds().getWidth(), (int) editor.getBounds().getHeight()); coverPanel.setBounds(1, 1, (int) editor.getBounds().getWidth(), (int) editor.getBounds().getHeight());
editor.repaint(); editor.repaint();
} }
@Override
public void paintBorder(Graphics g, Rectangle bounds){
if (!isHovering) {
super.paintBorder(g, bounds);
}
}
/** /**
* 销毁帮助提示框 * 销毁帮助提示框
*/ */

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

@ -3,6 +3,7 @@
*/ */
package com.fr.design.designer.creator; package com.fr.design.designer.creator;
import com.fr.base.GraphHelper;
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;
@ -11,6 +12,7 @@ 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.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.icon.IconPathConstants; import com.fr.design.icon.IconPathConstants;
import com.fr.design.mainframe.EditingMouseListener; import com.fr.design.mainframe.EditingMouseListener;
import com.fr.design.mainframe.FormArea; import com.fr.design.mainframe.FormArea;
@ -23,6 +25,7 @@ import com.fr.form.ui.container.WLayout;
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.Constants;
import java.awt.*; import java.awt.*;
import java.awt.event.ContainerEvent; import java.awt.event.ContainerEvent;
@ -42,6 +45,9 @@ public class XWAbsoluteLayout extends XLayoutContainer {
private static final int EDIT_BTN_HEIGHT = 24; private static final int EDIT_BTN_HEIGHT = 24;
private int minWidth = WLayout.MIN_WIDTH; private int minWidth = WLayout.MIN_WIDTH;
private int minHeight = WLayout.MIN_HEIGHT; private int minHeight = WLayout.MIN_HEIGHT;
private static final Color OUTER_BORDER_COLOR = new Color(65, 155, 249, 30);
private static final Color INNER_BORDER_COLOR = new Color(65, 155, 249);
private static final int BORDER_WIDTH = 1;
//由于屏幕分辨率不同,界面上的容器大小可能不是默认的100%,此时拖入组件时,保存的大小按照100%时的计算 //由于屏幕分辨率不同,界面上的容器大小可能不是默认的100%,此时拖入组件时,保存的大小按照100%时的计算
protected double containerPercent = 1.0; protected double containerPercent = 1.0;
@ -432,15 +438,15 @@ public class XWAbsoluteLayout extends XLayoutContainer {
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
Composite oldComposite = g2d.getComposite(); Composite oldComposite = g2d.getComposite();
//画白色的编辑层 //画白色的编辑层
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 60 / 100.0F)); g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 50 / 100.0F));
g2d.setColor(Color.WHITE); g2d.setColor(XCreatorConstants.COVER_COLOR);
g2d.fillRect(x, y, w, h); g2d.fillRect(x, y, w, h);
//画编辑按钮所在框 //画编辑按钮所在框
g2d.setComposite(oldComposite); g2d.setComposite(oldComposite);
g2d.setColor(new Color(176, 196, 222)); g2d.setColor(new Color(176, 196, 222));
g2d.fillRect((x + w / 2 - EDIT_BTN_WIDTH / 2), (y + h / 2 - EDIT_BTN_HEIGHT / 2), EDIT_BTN_WIDTH, EDIT_BTN_HEIGHT); g2d.fillRect((x + w / 2 - EDIT_BTN_WIDTH / 2), (y + h / 2 - EDIT_BTN_HEIGHT / 2), EDIT_BTN_WIDTH, EDIT_BTN_HEIGHT);
//画编辑按钮图标 //画编辑按钮图标
BufferedImage image = IOUtils.readImage(IconPathConstants.TD_EDIT_ICON_PATH); BufferedImage image = IOUtils.readImage(IconPathConstants.EDIT_ICON_PATH);
g2d.drawImage( g2d.drawImage(
image, image,
(x + w / 2 - 23), (x + w / 2 - 23),
@ -453,9 +459,23 @@ public class XWAbsoluteLayout extends XLayoutContainer {
g2d.setColor(Color.BLACK); g2d.setColor(Color.BLACK);
//画编辑文字 //画编辑文字
g2d.drawString(Inter.getLocText("FR-Designer_Edit"), x + w / 2 - 2, y + h / 2 + 5); g2d.drawString(Inter.getLocText("FR-Designer_Edit"), x + w / 2 - 2, y + h / 2 + 5);
g.setColor(XCreatorConstants.FORM_BORDER_COLOR);
GraphHelper.draw(g, new Rectangle(BORDER_WIDTH, BORDER_WIDTH, getWidth() - BORDER_WIDTH * 2, getHeight() - BORDER_WIDTH * 2), Constants.LINE_MEDIUM);
} }
} }
@Override
public void paintBorder(Graphics g, Rectangle bounds){
if(editable){
g.setColor(OUTER_BORDER_COLOR);
GraphHelper.draw(g, new Rectangle(bounds.x - 3, bounds.y - 3, bounds.width + 5, bounds.height + 5), Constants.LINE_LARGE);
g.setColor(INNER_BORDER_COLOR);
GraphHelper.draw(g, new Rectangle(bounds.x, bounds.y, bounds.width, bounds.height), Constants.LINE_MEDIUM);
}else if(!isMouseEnter){
super.paintBorder(g, bounds);
}
}
/** /**
* 响应点击事件 * 响应点击事件
* *

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

@ -28,6 +28,9 @@ import com.fr.form.ui.container.WAbsoluteLayout.BoundsWidget;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import javax.swing.JOptionPane;
/** /**
* @author jim * @author jim
* @date 2014-6-23 * @date 2014-6-23
@ -958,11 +961,13 @@ public class XWFitLayout extends XLayoutContainer {
public boolean canAddInterval(int interval) { public boolean canAddInterval(int interval) {
int val = interval/2; int val = interval/2;
for (int i=0, len=this.getComponentCount(); i<len; i++) { for (int i=0, len=this.getComponentCount(); i<len; i++) {
Component comp = this.getComponent(i); XCreator comp = (XCreator) this.getComponent(i);
Rectangle rec = comp.getBounds(); Rectangle rec = comp.getBounds();
Dimension d = new Dimension(this.getWidth(), this.getHeight()); Dimension d = new Dimension(this.getWidth(), this.getHeight());
Rectangle bound = dealBound(rec, d, val, 0); Rectangle bound = dealBound(rec, d, val, 0);
if (bound.width < minWidth || bound.height< minHeight) { if (bound.width < minWidth || bound.height< minHeight) {
String widgetName = comp.toData().getWidgetName();
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Engine_Invalid_Setting_Cause_Reach_Min_Widget_Size", widgetName));
return false; return false;
} }
} }

7
designer_form/src/com/fr/design/designer/creator/XWParameterLayout.java

@ -6,7 +6,9 @@ package com.fr.design.designer.creator;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.designer.beans.LayoutAdapter; import com.fr.design.designer.beans.LayoutAdapter;
import com.fr.design.designer.beans.adapters.layout.FRParameterLayoutAdapter; import com.fr.design.designer.beans.adapters.layout.FRParameterLayoutAdapter;
import com.fr.design.designer.properties.mobile.ParaMobilePropertyUI;
import com.fr.design.form.util.XCreatorConstants; import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.fun.WidgetPropertyUIProvider;
import com.fr.design.mainframe.widget.editors.BackgroundEditor; import com.fr.design.mainframe.widget.editors.BackgroundEditor;
import com.fr.design.mainframe.widget.editors.BooleanEditor; import com.fr.design.mainframe.widget.editors.BooleanEditor;
import com.fr.design.mainframe.widget.editors.WidgetDisplayPosition; import com.fr.design.mainframe.widget.editors.WidgetDisplayPosition;
@ -214,6 +216,11 @@ public class XWParameterLayout extends XWAbsoluteLayout {
public void updateBoundsWidget() { public void updateBoundsWidget() {
} }
@Override
public WidgetPropertyUIProvider[] getWidgetPropertyUIProviders() {
return new WidgetPropertyUIProvider[]{ new ParaMobilePropertyUI(this)};
}
@Override @Override
protected String getIconName() { protected String getIconName() {
return "layout_absolute.png"; return "layout_absolute.png";

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

@ -111,6 +111,19 @@ public class XWTitleLayout extends DedicateLayoutContainer {
return null; return null;
} }
/**
* 编辑状态的时候需要重新绘制下边框
*
*/
@Override
public void paintBorder(Graphics g, Rectangle bounds) {
XCreator childCreator = getEditingChildCreator();
if (childCreator != null) {
childCreator.paintBorder(g, bounds);
}
}
/** /**
* 将WLayout转换为XLayoutContainer * 将WLayout转换为XLayoutContainer
*/ */

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

@ -3,6 +3,7 @@
*/ */
package com.fr.design.designer.creator.cardlayout; package com.fr.design.designer.creator.cardlayout;
import com.fr.base.GraphHelper;
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;
@ -13,6 +14,7 @@ import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.designer.creator.XLayoutContainer; import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWBorderLayout; import com.fr.design.designer.creator.XWBorderLayout;
import com.fr.design.designer.creator.XWidgetCreator; import com.fr.design.designer.creator.XWidgetCreator;
import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.icon.IconPathConstants; 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;
@ -30,6 +32,8 @@ import com.fr.form.ui.container.cardlayout.WCardTitleLayout;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.stable.Constants;
import java.awt.AlphaComposite; import java.awt.AlphaComposite;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
@ -59,6 +63,7 @@ public class XWCardMainBorderLayout extends XWBorderLayout{
private static final int EDIT_BTN_WIDTH = 60; private static final int EDIT_BTN_WIDTH = 60;
private static final int EDIT_BTN_HEIGHT = 24; private static final int EDIT_BTN_HEIGHT = 24;
private static final int BORDER_WIDTH = 1;
private final int CARDMAINLAYOUT_CHILD_COUNT = 1; private final int CARDMAINLAYOUT_CHILD_COUNT = 1;
@ -328,15 +333,15 @@ public class XWCardMainBorderLayout extends XWBorderLayout{
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
Composite oldComposite = g2d.getComposite(); Composite oldComposite = g2d.getComposite();
//画白色的编辑层 //画白色的编辑层
g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 60 / 100.0F)); g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 50 / 100.0F));
g2d.setColor(Color.WHITE); g2d.setColor(XCreatorConstants.COVER_COLOR);
g2d.fillRect(x, y, w, h); g2d.fillRect(x, y, w, h);
//画编辑按钮所在框 //画编辑按钮所在框
g2d.setComposite(oldComposite); g2d.setComposite(oldComposite);
g2d.setColor(new Color(176, 196, 222)); g2d.setColor(new Color(176, 196, 222));
g2d.fillRect((x + w / 2 - EDIT_BTN_WIDTH / 2), (y + h / 2 - EDIT_BTN_HEIGHT / 2), EDIT_BTN_WIDTH, EDIT_BTN_HEIGHT); g2d.fillRect((x + w / 2 - EDIT_BTN_WIDTH / 2), (y + h / 2 - EDIT_BTN_HEIGHT / 2), EDIT_BTN_WIDTH, EDIT_BTN_HEIGHT);
//画编辑按钮图标 //画编辑按钮图标
BufferedImage image = IOUtils.readImage(IconPathConstants.TD_EDIT_ICON_PATH); BufferedImage image = IOUtils.readImage(IconPathConstants.EDIT_ICON_PATH);
g2d.drawImage( g2d.drawImage(
image, image,
(x + w / 2 - 23), (x + w / 2 - 23),
@ -349,6 +354,15 @@ public class XWCardMainBorderLayout extends XWBorderLayout{
g2d.setColor(Color.BLACK); g2d.setColor(Color.BLACK);
//画编辑文字 //画编辑文字
g2d.drawString(Inter.getLocText("FR-Designer_Edit"), x + w / 2 - 2, y + h / 2 + 5); g2d.drawString(Inter.getLocText("FR-Designer_Edit"), x + w / 2 - 2, y + h / 2 + 5);
g.setColor(XCreatorConstants.FORM_BORDER_COLOR);
GraphHelper.draw(g, new Rectangle(BORDER_WIDTH, BORDER_WIDTH, getWidth() - BORDER_WIDTH * 2, getHeight() - BORDER_WIDTH * 2), Constants.LINE_MEDIUM);
}
}
@Override
public void paintBorder(Graphics g, Rectangle bounds){
if (!isMouseEnter) {
super.paintBorder(g, bounds);
} }
} }

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

@ -613,4 +613,26 @@ public class XWTabFitLayout extends XWFitLayout {
xCardSwitchButton.setPreferredSize(new Dimension(width, xCardSwitchButton.getHeight())); xCardSwitchButton.setPreferredSize(new Dimension(width, xCardSwitchButton.getHeight()));
} }
private void checkVisible(){
WTabFitLayout wTabFitLayout = (WTabFitLayout)this.data;
CardSwitchButton cardSwitchButton = wTabFitLayout.getCurrentCard();
cardSwitchButton.setVisible(wTabFitLayout.isVisible());
}
/**
* 是否支持设置可见
* return boolean
*/
@Override
public boolean supportSetVisible(){
return true;
}
@Override
public void resetVisible(boolean visible){
checkVisible();
}
} }

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

@ -6,6 +6,7 @@ import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
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.design.widget.ui.designer.mobile.BodyMobileDefinePane;
import com.fr.general.Inter; import com.fr.general.Inter;
/** /**
@ -25,12 +26,12 @@ public class BodyMobilePropertyUI extends AbstractWidgetPropertyUIProvider {
@Override @Override
public AbstractPropertyTable createWidgetAttrTable() { public AbstractPropertyTable createWidgetAttrTable() {
return new BodyAppRelayoutTable(xCreator); return null;
} }
@Override @Override
public BasicPane createWidgetAttrPane() { public BasicPane createWidgetAttrPane() {
return null; return new BodyMobileDefinePane(xCreator);
} }
@Override @Override

38
designer_form/src/com/fr/design/designer/properties/mobile/ChartEditorPropertyUI.java

@ -0,0 +1,38 @@
package com.fr.design.designer.properties.mobile;
import com.fr.design.designer.creator.XChartEditor;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XElementCase;
import com.fr.design.dialog.BasicPane;
import com.fr.design.fun.impl.AbstractWidgetPropertyUIProvider;
import com.fr.design.gui.itable.AbstractPropertyTable;
import com.fr.design.widget.ui.designer.mobile.ChartEditorDefinePane;
import com.fr.design.widget.ui.designer.mobile.ElementCaseDefinePane;
import com.fr.general.Inter;
/**
* Created by plough on 2018/1/18.
*/
public class ChartEditorPropertyUI extends AbstractWidgetPropertyUIProvider {
private XCreator xCreator;
public ChartEditorPropertyUI(XChartEditor xChartEditor) {
this.xCreator = xChartEditor;
}
@Override
public AbstractPropertyTable createWidgetAttrTable() {
return null;
}
@Override
public BasicPane createWidgetAttrPane() {
return new ChartEditorDefinePane(xCreator);
}
@Override
public String tableTitle() {
return Inter.getLocText("FR-Designer_Mobile-Attr");
}
}

39
designer_form/src/com/fr/design/designer/properties/mobile/ParaMobilePropertyUI.java

@ -0,0 +1,39 @@
package com.fr.design.designer.properties.mobile;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XWAbsoluteBodyLayout;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.design.dialog.BasicPane;
import com.fr.design.fun.impl.AbstractWidgetPropertyUIProvider;
import com.fr.design.gui.itable.AbstractPropertyTable;
import com.fr.design.widget.ui.designer.mobile.BodyMobileDefinePane;
import com.fr.design.widget.ui.designer.mobile.ParaMobileDefinePane;
import com.fr.general.Inter;
/**
* Created by Administrator on 2016/5/16/0016.
*/
public class ParaMobilePropertyUI extends AbstractWidgetPropertyUIProvider {
private XCreator xCreator;
public ParaMobilePropertyUI(XWParameterLayout xwParameterLayout) {
this.xCreator = xwParameterLayout;
}
@Override
public AbstractPropertyTable createWidgetAttrTable() {
return null;
}
@Override
public BasicPane createWidgetAttrPane() {
return new ParaMobileDefinePane(xCreator);
}
@Override
public String tableTitle() {
return Inter.getLocText("FR-Designer_Mobile-Attr");
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save