Browse Source

Merge branch 'release/9.0' of http://cloud.finedevelop.com:2015/scm/~kerry/design into release/9.0

master
kerry 7 years ago
parent
commit
b7d2eaca96
  1. 4
      designer/src/com/fr/design/actions/ButtonGroupAction.java
  2. 6
      designer/src/com/fr/design/actions/cell/CellAttributeTableAction.java
  3. 6
      designer/src/com/fr/design/actions/cell/CellWidgetAttrAction.java
  4. 6
      designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java
  5. 40
      designer/src/com/fr/design/actions/cell/style/AlignmentAction.java
  6. 76
      designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java
  7. 9
      designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java
  8. 8
      designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java
  9. 29
      designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java
  10. 31
      designer/src/com/fr/design/actions/insert/flot/ImageFloatAction.java
  11. 41
      designer/src/com/fr/design/cell/bar/DynamicScrollButton.java
  12. 1
      designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java
  13. 10
      designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java
  14. 828
      designer/src/com/fr/design/module/DesignerModule.java
  15. 25
      designer/src/com/fr/design/parameter/ParameterDefinitePane.java
  16. 54
      designer/src/com/fr/grid/GridCorner.java
  17. 2
      designer/src/com/fr/poly/PolyBlockProperTable.java
  18. 320
      designer/src/com/fr/poly/creator/ChartBlockCreator.java
  19. 7
      designer/src/com/fr/quickeditor/CellQuickEditor.java
  20. 54
      designer/src/com/fr/quickeditor/ChartQuickEditor.java
  21. 51
      designer/src/com/fr/quickeditor/chartquick/BasicChartQuickEditor.java
  22. 34
      designer/src/com/fr/quickeditor/chartquick/FloatChartQuickEditor.java
  23. 31
      designer/src/com/fr/quickeditor/chartquick/PolyChartQuickEditor.java
  24. 27
      designer_base/src/com/fr/design/DesignerEnvManager.java
  25. 4
      designer_base/src/com/fr/design/actions/UpdateAction.java
  26. 6
      designer_base/src/com/fr/design/actions/core/ActionFactory.java
  27. 2
      designer_base/src/com/fr/design/actions/file/SwitchExistEnv.java
  28. 6
      designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java
  29. 7
      designer_base/src/com/fr/design/constants/UIConstants.java
  30. 2
      designer_base/src/com/fr/design/data/datapane/TableDataTree.java
  31. 4
      designer_base/src/com/fr/design/data/datapane/TableDataTreePane.java
  32. 3
      designer_base/src/com/fr/design/data/datapane/VerticalChoosePane.java
  33. 177
      designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java
  34. 2
      designer_base/src/com/fr/design/editor/editor/IntegerEditor.java
  35. 65
      designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java
  36. 2
      designer_base/src/com/fr/design/file/MutilTempalteTabPane.java
  37. 8
      designer_base/src/com/fr/design/foldablepane/HeaderPane.java
  38. 17
      designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java
  39. 2
      designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java
  40. 14
      designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java
  41. 8
      designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java
  42. 5
      designer_base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java
  43. 14
      designer_base/src/com/fr/design/gui/style/AlignmentPane.java
  44. BIN
      designer_base/src/com/fr/design/images/buttonicon/type_bool.png
  45. BIN
      designer_base/src/com/fr/design/images/buttonicon/type_date.png
  46. BIN
      designer_base/src/com/fr/design/images/buttonicon/type_double.png
  47. BIN
      designer_base/src/com/fr/design/images/buttonicon/type_formula.png
  48. BIN
      designer_base/src/com/fr/design/images/buttonicon/type_int.png
  49. BIN
      designer_base/src/com/fr/design/images/buttonicon/type_string.png
  50. BIN
      designer_base/src/com/fr/design/images/chart/ChartType.png
  51. BIN
      designer_base/src/com/fr/design/images/control/bar-light.png
  52. BIN
      designer_base/src/com/fr/design/images/control/dot-line.png
  53. BIN
      designer_base/src/com/fr/design/images/control/dotv.png
  54. BIN
      designer_base/src/com/fr/design/images/control/down_arrow.png
  55. BIN
      designer_base/src/com/fr/design/images/control/east_arrow.png
  56. BIN
      designer_base/src/com/fr/design/images/control/up_arrow.png
  57. BIN
      designer_base/src/com/fr/design/images/control/west_arrow.png
  58. 5
      designer_base/src/com/fr/design/locale/designer.properties
  59. 5
      designer_base/src/com/fr/design/locale/designer_en_US.properties
  60. 5
      designer_base/src/com/fr/design/locale/designer_ja_JP.properties
  61. 5
      designer_base/src/com/fr/design/locale/designer_ko_KR.properties
  62. 5
      designer_base/src/com/fr/design/locale/designer_zh_CN.properties
  63. 5
      designer_base/src/com/fr/design/locale/designer_zh_TW.properties
  64. 22
      designer_base/src/com/fr/design/mainframe/DesignerFrame.java
  65. 11
      designer_base/src/com/fr/design/mainframe/EastRegionContainerPane.java
  66. 10
      designer_base/src/com/fr/design/mainframe/JTemplate.java
  67. 14
      designer_base/src/com/fr/design/mainframe/hold/DefaultTitlePlace.java
  68. 3
      designer_base/src/com/fr/design/parameter/ParameterDesignerProvider.java
  69. 6
      designer_base/src/com/fr/design/present/dict/FormulaDictPane.java
  70. 27
      designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java
  71. 15
      designer_base/src/com/fr/env/RemoteEnv.java
  72. 7
      designer_base/src/com/fr/env/SignIn.java
  73. 3
      designer_base/src/com/fr/start/BaseDesigner.java
  74. 10
      designer_chart/src/com/fr/design/chart/ChartTypePane.java
  75. 2
      designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java
  76. 15
      designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java
  77. BIN
      designer_chart/src/com/fr/plugin/chart/map/images/mapData.png
  78. 157
      designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java
  79. 40
      designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java
  80. 17
      designer_form/src/com/fr/design/mainframe/FormDesigner.java
  81. 2
      designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java
  82. 17
      designer_form/src/com/fr/design/mainframe/JForm.java
  83. 16
      designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java
  84. 16
      designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java
  85. 2
      designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java

4
designer/src/com/fr/design/actions/ButtonGroupAction.java

@ -6,12 +6,12 @@ import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
public abstract class ButtonGroupAction extends ElementCaseAction{ public abstract class ButtonGroupAction extends ElementCaseAction{
protected Icon[] iconArray; protected Icon[][] iconArray;
protected Integer[] valueArray; protected Integer[] valueArray;
private UIButtonGroup<Integer> group; private UIButtonGroup<Integer> group;
protected ButtonGroupAction(ElementCasePane t, Icon[] iconArray, Integer[] valueArray) { protected ButtonGroupAction(ElementCasePane t, Icon[][] iconArray, Integer[] valueArray) {
super(t); super(t);
this.iconArray = iconArray; this.iconArray = iconArray;
this.valueArray = valueArray; this.valueArray = valueArray;

6
designer/src/com/fr/design/actions/cell/CellAttributeTableAction.java

@ -2,6 +2,7 @@ package com.fr.design.actions.cell;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.mainframe.CellElementPropertyPane; import com.fr.design.mainframe.CellElementPropertyPane;
import com.fr.design.mainframe.EastRegionContainerPane;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
@ -20,4 +21,9 @@ public abstract class CellAttributeTableAction extends UpdateAction {
CellElementPropertyPane.getInstance().GoToPane(getID()); CellElementPropertyPane.getInstance().GoToPane(getID());
} }
@Override
public void update() {
super.update();
this.setEnabled(EastRegionContainerPane.getInstance().isCellAttrPaneEnabled());
}
} }

6
designer/src/com/fr/design/actions/cell/CellWidgetAttrAction.java

@ -24,4 +24,10 @@ public class CellWidgetAttrAction extends UpdateAction {
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_SETTINGS); EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_WIDGET_SETTINGS);
EastRegionContainerPane.getInstance().setWindow2PreferWidth(); EastRegionContainerPane.getInstance().setWindow2PreferWidth();
} }
@Override
public void update() {
super.update();
this.setEnabled(EastRegionContainerPane.getInstance().isWidgetSettingsPaneEnabled());
}
} }

6
designer/src/com/fr/design/actions/cell/ConditionAttributesAction.java

@ -26,4 +26,10 @@ public class ConditionAttributesAction extends UpdateAction {
EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_CONDITION_ATTR); EastRegionContainerPane.getInstance().switchTabTo(EastRegionContainerPane.KEY_CONDITION_ATTR);
EastRegionContainerPane.getInstance().setWindow2PreferWidth(); EastRegionContainerPane.getInstance().setWindow2PreferWidth();
} }
@Override
public void update() {
super.update();
this.setEnabled(EastRegionContainerPane.getInstance().isConditionAttrPaneEnabled());
}
} }

40
designer/src/com/fr/design/actions/cell/style/AlignmentAction.java

@ -21,20 +21,16 @@ import javax.swing.*;
public class AlignmentAction extends ButtonGroupAction implements StyleActionInterface { public class AlignmentAction extends ButtonGroupAction implements StyleActionInterface {
private static final Icon[] normalBlackIcon = new Icon[]{ private static final Icon[][] ICONS = new Icon[][]{
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png")},
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png")},
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")}; {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png")}};
private static final Icon[] toggleWhiteIcon = new Icon[]{
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png")};
private static final Integer[] valueArray = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT}; private static final Integer[] valueArray = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT};
public AlignmentAction(ElementCasePane t) { public AlignmentAction(ElementCasePane t) {
super(t, normalBlackIcon, valueArray); super(t, ICONS, valueArray);
} }
@ -49,24 +45,14 @@ public class AlignmentAction extends ButtonGroupAction implements StyleActionInt
return style.deriveHorizontalAlignment(getSelectedValue()); return style.deriveHorizontalAlignment(getSelectedValue());
} }
/** /**
* 更新Style * 更新Style
* *
* @param style style * @param style style
*/ */
public void updateStyle(Style style) { public void updateStyle(Style style) {
UIButtonGroup<Integer> buttonGroup = createToolBarComponent(); setSelectedIndex(BaseUtils.getAlignment4Horizontal(style));
int selected = BaseUtils.getAlignment4Horizontal(style); }
for (int i = 0; i < normalBlackIcon.length; i++) {
UIToggleButton button = buttonGroup.getButton(i);
Icon currentIcon = button.getIcon();
Icon newIcon = selected == valueArray[i] ? toggleWhiteIcon[i] : normalBlackIcon[i];
if (newIcon != currentIcon) {
button.setIcon(newIcon);
}
}
setSelectedIndex(selected);
}
/** /**
* executeActionReturnUndoRecordNeeded * executeActionReturnUndoRecordNeeded

76
designer/src/com/fr/design/actions/cell/style/ReportFontBoldAction.java

@ -21,42 +21,36 @@ import javax.swing.*;
public class ReportFontBoldAction extends AbstractStyleAction implements ToggleButtonUpdateAction { public class ReportFontBoldAction extends AbstractStyleAction implements ToggleButtonUpdateAction {
private UIToggleButton button; private UIToggleButton button;
protected Style style; protected Style style;
private final static Icon blackIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"); private final static Icon[] ICONS = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold_white.png")};
private final static Icon whiteIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold_white.png");
public ReportFontBoldAction(ElementCasePane t) { public ReportFontBoldAction(ElementCasePane t) {
super(t); super(t);
this.setName(Inter.getLocText("FRFont-bold")); this.setName(Inter.getLocText("FRFont-bold"));
this.setSmallIcon(blackIcon); this.setSmallIcon(ICONS, true);
} }
/** /**
* 根据按钮状态获取格式 * 根据按钮状态获取格式
* *
* @param style * @param style
* @param defStyle * @param defStyle
* @return * @return
*/ */
@Override @Override
public Style executeStyle(Style style, Style defStyle) { public Style executeStyle(Style style, Style defStyle) {
button = createToolBarComponent(); createToolBarComponent().setSelected(!createToolBarComponent().isSelected());
button.setIcon(getToggleButtonIcon(button.isSelected())); if (createToolBarComponent().isSelected()) {
button.setSelected(!button.isSelected()); setSelectedFont(style);
if (button.isSelected()) { createToolBarComponent().setSelected(false);
setSelectedFont(style); } else {
button.setSelected(false); setUnselectedFont(style);
} else { createToolBarComponent().setSelected(true);
setUnselectedFont(style); }
button.setSelected(true);
}
return this.style; return this.style;
} }
protected Icon getToggleButtonIcon(boolean isSelected) {
return isSelected ? blackIcon : whiteIcon;
}
protected void setSelectedFont(Style style) { protected void setSelectedFont(Style style) {
this.style = StyleUtils.boldReportFont(style); this.style = StyleUtils.boldReportFont(style);
@ -66,22 +60,20 @@ public class ReportFontBoldAction extends AbstractStyleAction implements ToggleB
this.style = StyleUtils.unBoldReportFont(style); this.style = StyleUtils.unBoldReportFont(style);
} }
/** /**
* Update Style. * Update Style.
*/ */
@Override @Override
public void updateStyle(Style style) { public void updateStyle(Style style) {
if (style == null) { if (style == null) {
return; return;
} }
FRFont frFont = style.getFRFont(); FRFont frFont = style.getFRFont();
if (frFont == null) { if (frFont == null) {
return; return;
} }
button = createToolBarComponent(); createToolBarComponent().setSelected(isStyle(frFont));
button.setSelected(isStyle(frFont)); }
button.setIcon(getToggleButtonIcon(!button.isSelected()));
}
protected boolean isStyle(FRFont frFont) { protected boolean isStyle(FRFont frFont) {
return frFont.isBold(); return frFont.isBold();
@ -95,7 +87,7 @@ public class ReportFontBoldAction extends AbstractStyleAction implements ToggleB
@Override @Override
public UIToggleButton createToolBarComponent() { public UIToggleButton createToolBarComponent() {
if (button == null) { if (button == null) {
button = GUICoreUtils.createToolBarComponent(this); button = GUICoreUtils.createToolBarComponentWhiteIcon(this);
button.setEventBannded(true); button.setEventBannded(true);
} }
return button; return button;

9
designer/src/com/fr/design/actions/cell/style/ReportFontItalicAction.java

@ -17,14 +17,13 @@ import javax.swing.*;
*/ */
public class ReportFontItalicAction extends ReportFontBoldAction { public class ReportFontItalicAction extends ReportFontBoldAction {
private final static Icon blackIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"); private final static Icon[] ICONS = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic_white.png")};
private final static Icon whiteIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic_white.png");
public ReportFontItalicAction(ElementCasePane t) { public ReportFontItalicAction(ElementCasePane t) {
super(t); super(t);
this.setName(Inter.getLocText("FRFont-italic")); this.setName(Inter.getLocText("FRFont-italic"));
this.setSmallIcon(blackIcon); this.setSmallIcon(ICONS, true);
} }
@ -36,10 +35,6 @@ public class ReportFontItalicAction extends ReportFontBoldAction {
this.style = StyleUtils.unItalicReportFont(style); this.style = StyleUtils.unItalicReportFont(style);
} }
protected Icon getToggleButtonIcon(boolean isSelected) {
return isSelected ? blackIcon : whiteIcon;
}
protected boolean isStyle(FRFont frFont) { protected boolean isStyle(FRFont frFont) {
return frFont.isItalic(); return frFont.isItalic();
} }

8
designer/src/com/fr/design/actions/cell/style/ReportFontUnderlineAction.java

@ -18,14 +18,13 @@ import javax.swing.*;
*/ */
public class ReportFontUnderlineAction extends ReportFontBoldAction { public class ReportFontUnderlineAction extends ReportFontBoldAction {
private final static Icon blackIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png"); private final static Icon[] ICONS = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline_white.png")};
private final static Icon whiteIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline_white.png");
public ReportFontUnderlineAction(ElementCasePane t) { public ReportFontUnderlineAction(ElementCasePane t) {
super(t); super(t);
this.setName(Inter.getLocText("FRFont-Underline")); this.setName(Inter.getLocText("FRFont-Underline"));
this.setSmallIcon(blackIcon); this.setSmallIcon(ICONS, true);
} }
protected void setSelectedFont (Style style) { protected void setSelectedFont (Style style) {
@ -36,9 +35,6 @@ public class ReportFontUnderlineAction extends ReportFontBoldAction {
this.style = StyleUtils.setReportFontUnderline(style, false); this.style = StyleUtils.setReportFontUnderline(style, false);
} }
protected Icon getToggleButtonIcon(boolean isSelected) {
return isSelected ? blackIcon : whiteIcon;
}
protected boolean isStyle(FRFont frFont) { protected boolean isStyle(FRFont frFont) {
return frFont.getUnderline() != Constants.LINE_NONE; return frFont.getUnderline() != Constants.LINE_NONE;

29
designer/src/com/fr/design/actions/insert/flot/ChartFloatAction.java

@ -4,6 +4,7 @@
package com.fr.design.actions.insert.flot; package com.fr.design.actions.insert.flot;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList;
import com.fr.base.Style; import com.fr.base.Style;
import com.fr.base.chart.BaseChartCollection; import com.fr.base.chart.BaseChartCollection;
import com.fr.design.actions.ElementCaseAction; import com.fr.design.actions.ElementCaseAction;
@ -16,10 +17,14 @@ import com.fr.design.menu.MenuKeySet;
import com.fr.design.module.DesignModuleFactory; import com.fr.design.module.DesignModuleFactory;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.grid.Grid;
import com.fr.grid.selection.FloatSelection; import com.fr.grid.selection.FloatSelection;
import com.fr.report.ReportHelper;
import com.fr.report.cell.FloatElement; import com.fr.report.cell.FloatElement;
import com.fr.report.elementcase.TemplateElementCase;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.bridge.StableFactory; import com.fr.stable.bridge.StableFactory;
import com.fr.stable.unit.FU;
import com.fr.stable.unit.OLDPIX; import com.fr.stable.unit.OLDPIX;
import javax.swing.*; import javax.swing.*;
@ -85,11 +90,31 @@ public class ChartFloatAction extends ElementCaseAction {
FloatElement newFloatElement; FloatElement newFloatElement;
try { try {
newFloatElement = new FloatElement(chartDialog.getChartCollection().clone()); newFloatElement = new FloatElement(chartDialog.getChartCollection().clone());
newFloatElement.setLeftDistance(new OLDPIX(20));
newFloatElement.setTopDistance(new OLDPIX(20));
newFloatElement.setWidth(new OLDPIX(BaseChartCollection.CHART_DEFAULT_WIDTH)); newFloatElement.setWidth(new OLDPIX(BaseChartCollection.CHART_DEFAULT_WIDTH));
newFloatElement.setHeight(new OLDPIX(BaseChartCollection.CHART_DEFAULT_HEIGHT)); newFloatElement.setHeight(new OLDPIX(BaseChartCollection.CHART_DEFAULT_HEIGHT));
Grid grid = reportPane.getGrid();
TemplateElementCase report = reportPane.getEditingElementCase();
DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(report);
DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(report);
int horizentalScrollValue = grid.getHorizontalValue();
int verticalScrollValue = grid.getVerticalValue();
int resolution = grid.getResolution();
int floatWdith = newFloatElement.getWidth().toPixI(resolution);
int floatHeight = newFloatElement.getWidth().toPixI(resolution);
int leftDifference = (grid.getWidth() - floatWdith) > 0 ? (grid.getWidth() - floatWdith) : 0;
int topDifference = (grid.getHeight() - floatHeight) > 0 ? (grid.getHeight() - floatHeight) : 0;
FU evtX_fu = FU.valueOfPix((leftDifference) / 2, resolution);
FU evtY_fu = FU.valueOfPix((topDifference) / 2, resolution);
FU leftDistance = FU.getInstance(evtX_fu.toFU() + columnWidthList.getRangeValue(0, horizentalScrollValue).toFU());
FU topDistance = FU.getInstance(evtY_fu.toFU() + rowHeightList.getRangeValue(0, verticalScrollValue).toFU());
newFloatElement.setLeftDistance(leftDistance);
newFloatElement.setTopDistance(topDistance);
Style style = newFloatElement.getStyle(); Style style = newFloatElement.getStyle();
if (style != null) { if (style != null) {
newFloatElement.setStyle(style.deriveBorder(Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black)); newFloatElement.setStyle(style.deriveBorder(Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black, Constants.LINE_NONE, Color.black));

31
designer/src/com/fr/design/actions/insert/flot/ImageFloatAction.java

@ -4,6 +4,7 @@
package com.fr.design.actions.insert.flot; package com.fr.design.actions.insert.flot;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.design.actions.ElementCaseAction; import com.fr.design.actions.ElementCaseAction;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
@ -14,9 +15,12 @@ import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.menu.MenuKeySet; import com.fr.design.menu.MenuKeySet;
import com.fr.design.report.SelectImagePane; import com.fr.design.report.SelectImagePane;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.grid.Grid;
import com.fr.grid.selection.FloatSelection; import com.fr.grid.selection.FloatSelection;
import com.fr.report.ReportHelper;
import com.fr.report.cell.FloatElement; import com.fr.report.cell.FloatElement;
import com.fr.report.cell.cellattr.CellImage; import com.fr.report.cell.cellattr.CellImage;
import com.fr.report.elementcase.TemplateElementCase;
import com.fr.stable.CoreGraphHelper; import com.fr.stable.CoreGraphHelper;
import com.fr.stable.unit.FU; import com.fr.stable.unit.FU;
@ -87,12 +91,33 @@ public class ImageFloatAction extends ElementCaseAction {
CoreGraphHelper.waitForImage(image); CoreGraphHelper.waitForImage(image);
floatElement.setValue(image); floatElement.setValue(image);
Grid grid = reportPane.getGrid();
int resolution = ScreenResolution.getScreenResolution(); int resolution = grid.getResolution();
floatElement.setWidth(FU.valueOfPix(image.getWidth(null), resolution)); floatElement.setWidth(FU.valueOfPix(image.getWidth(null), resolution));
floatElement.setHeight(FU.valueOfPix(image.getHeight(null), resolution)); floatElement.setHeight(FU.valueOfPix(image.getHeight(null), resolution));
TemplateElementCase report = reportPane.getEditingElementCase();
DynamicUnitList columnWidthList = ReportHelper.getColumnWidthList(report);
DynamicUnitList rowHeightList = ReportHelper.getRowHeightList(report);
int horizentalScrollValue = grid.getHorizontalValue();
int verticalScrollValue = grid.getVerticalValue();
int floatWdith = floatElement.getWidth().toPixI(resolution);
int floatHeight = floatElement.getHeight().toPixI(resolution);
int leftDifference = (grid.getWidth() - floatWdith) > 0 ? (grid.getWidth() - floatWdith) : 0;
int topDifference = (grid.getHeight() - floatHeight) > 0 ? (grid.getHeight() - floatHeight) : 0;
FU evtX_fu = FU.valueOfPix((leftDifference) / 2, resolution);
FU evtY_fu = FU.valueOfPix((topDifference) / 2, resolution);
FU leftDistance = FU.getInstance(evtX_fu.toFU() + columnWidthList.getRangeValue(0, horizentalScrollValue).toFU());
FU topDistance = FU.getInstance(evtY_fu.toFU() + rowHeightList.getRangeValue(0, verticalScrollValue).toFU());
floatElement.setLeftDistance(leftDistance);
floatElement.setTopDistance(topDistance);
floatElement.setStyle(cellImage.getStyle()); floatElement.setStyle(cellImage.getStyle());
reportPane.addFloatElementToCenterOfElementPane(floatElement); // reportPane.addFloatElementToCenterOfElementPane(floatElement);
reportPane.getEditingElementCase().addFloatElement(floatElement);
reportPane.setSelection(new FloatSelection(floatElement.getName())); reportPane.setSelection(new FloatSelection(floatElement.getName()));
returnValue = true; returnValue = true;

41
designer/src/com/fr/design/cell/bar/DynamicScrollButton.java

@ -1,5 +1,6 @@
package com.fr.design.cell.bar; package com.fr.design.cell.bar;
import com.fr.design.constants.UIConstants;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import javax.swing.*; import javax.swing.*;
@ -63,48 +64,16 @@ public class DynamicScrollButton extends BasicArrowButton {
private void paintArrow(Graphics g, Dimension size) { private void paintArrow(Graphics g, Dimension size) {
switch (direction) { switch (direction) {
case SwingConstants.NORTH: case SwingConstants.NORTH:
g.drawLine(8, 5, 8, 5); g.drawImage(UIConstants.ARROW_NORTH, 0, 0, this);
g.drawLine(7, 6, 9, 6);
g.drawLine(6, 7, 10, 7);
g.drawLine(5, 8, 7, 8);
g.drawLine(9, 8, 11, 8);
g.drawLine(4, 9, 6, 9);
g.drawLine(10, 9, 12, 9);
g.drawLine(5, 10, 5, 10);
g.drawLine(11, 10, 11, 10);
break; break;
case SwingConstants.SOUTH: case SwingConstants.SOUTH:
g.drawLine(5, 6, 5, 6); g.drawImage(UIConstants.ARROW_SOUTH, 0, 0, this);
g.drawLine(11, 6, 11, 6);
g.drawLine(4, 7, 6, 7);
g.drawLine(10, 7, 12, 7);
g.drawLine(5, 8, 7, 8);
g.drawLine(9, 8, 11, 8);
g.drawLine(6, 9, 10, 9);
g.drawLine(7, 10, 9, 10);
g.drawLine(8, 11, 8, 11);
break; break;
case SwingConstants.EAST: case SwingConstants.EAST:
g.drawLine(6, 5, 6, 5); g.drawImage(UIConstants.ARROW_EAST, 0, 0, this);
g.drawLine(6, 11, 6, 11);
g.drawLine(7, 4, 7, 6);
g.drawLine(7, 10, 7, 12);
g.drawLine(8, 5, 8, 7);
g.drawLine(8, 9, 8, 11);
g.drawLine(9, 6, 9, 10);
g.drawLine(10, 7, 10, 9);
g.drawLine(11, 8, 11, 8);
break; break;
case SwingConstants.WEST: case SwingConstants.WEST:
g.drawLine(4, 8, 4, 8); g.drawImage(UIConstants.ARROW_WEST, 0, 0, this);
g.drawLine(5, 7, 5, 9);
g.drawLine(6, 6, 6, 10);
g.drawLine(7, 5, 7, 7);
g.drawLine(7, 9, 7, 11);
g.drawLine(8, 4, 8, 6);
g.drawLine(8, 10, 8, 12);
g.drawLine(9, 5, 9, 5);
g.drawLine(9, 11, 9, 11);
break; break;
} }
} }

1
designer/src/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java

@ -21,6 +21,7 @@ public class AlphaFinePane extends BasicPane {
private static AlphaFinePane alphaFinePane; private static AlphaFinePane alphaFinePane;
public AlphaFinePane() { public AlphaFinePane() {
setPreferredSize(new Dimension(24,24));
setLayout(new BorderLayout()); setLayout(new BorderLayout());
if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) { if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) {
Toolkit.getDefaultToolkit().addAWTEventListener(AlphaFineDialog.listener(), AWTEvent.KEY_EVENT_MASK); Toolkit.getDefaultToolkit().addAWTEventListener(AlphaFineDialog.listener(), AWTEvent.KEY_EVENT_MASK);

10
designer/src/com/fr/design/mainframe/errorinfo/ErrorInfoUploader.java

@ -1,11 +1,15 @@
package com.fr.design.mainframe.errorinfo; package com.fr.design.mainframe.errorinfo;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.FRCoreContext; import com.fr.general.ComparatorUtils;
import com.fr.general.*; import com.fr.general.FRLogger;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils;
import com.fr.general.SiteCenter;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.json.JSONException; import com.fr.json.JSONException;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
import com.fr.license.function.VT4FR;
import com.fr.stable.CodeUtils; import com.fr.stable.CodeUtils;
import com.fr.stable.EnvChangedListener; import com.fr.stable.EnvChangedListener;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
@ -41,7 +45,7 @@ public class ErrorInfoUploader {
}); });
// 这个控制没啥意义, 主要在于宣传功能. // 这个控制没啥意义, 主要在于宣传功能.
licSupport = VT4FR.isLicAvailable(FRCoreContext.getBytes()) && VT4FR.ALPHA_FINE.support(); licSupport = VT4FR.AlphaFine.support();
} }
private ErrorInfoUploader() { private ErrorInfoUploader() {

828
designer/src/com/fr/design/module/DesignerModule.java

@ -1,415 +1,415 @@
package com.fr.design.module; package com.fr.design.module;
import com.fr.base.*; import com.fr.base.*;
import com.fr.base.io.XMLEncryptUtils; import com.fr.base.io.XMLEncryptUtils;
import com.fr.base.process.ProcessOperator; import com.fr.base.process.ProcessOperator;
import com.fr.base.remote.RemoteDeziConstants; import com.fr.base.remote.RemoteDeziConstants;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.insert.cell.*; import com.fr.design.actions.insert.cell.*;
import com.fr.design.actions.insert.flot.ChartFloatAction; import com.fr.design.actions.insert.flot.ChartFloatAction;
import com.fr.design.actions.insert.flot.FormulaFloatAction; import com.fr.design.actions.insert.flot.FormulaFloatAction;
import com.fr.design.actions.insert.flot.ImageFloatAction; import com.fr.design.actions.insert.flot.ImageFloatAction;
import com.fr.design.actions.insert.flot.TextBoxFloatAction; import com.fr.design.actions.insert.flot.TextBoxFloatAction;
import com.fr.design.actions.server.StyleListAction; import com.fr.design.actions.server.StyleListAction;
import com.fr.design.fun.ElementUIProvider; import com.fr.design.fun.ElementUIProvider;
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;
import com.fr.design.javascript.ProcessTransitionAdapter; import com.fr.design.javascript.ProcessTransitionAdapter;
import com.fr.design.mainframe.*; import com.fr.design.mainframe.*;
import com.fr.design.mainframe.bbs.BBSGuestPane; import com.fr.design.mainframe.bbs.BBSGuestPane;
import com.fr.design.mainframe.form.FormECCompositeProvider; import com.fr.design.mainframe.form.FormECCompositeProvider;
import com.fr.design.mainframe.form.FormECDesignerProvider; import com.fr.design.mainframe.form.FormECDesignerProvider;
import com.fr.design.mainframe.form.FormElementCaseDesigner; import com.fr.design.mainframe.form.FormElementCaseDesigner;
import com.fr.design.mainframe.form.FormReportComponentComposite; import com.fr.design.mainframe.form.FormReportComponentComposite;
import com.fr.design.mainframe.loghandler.DesignerLogImpl; import com.fr.design.mainframe.loghandler.DesignerLogImpl;
import com.fr.design.parameter.WorkBookParameterReader; import com.fr.design.parameter.WorkBookParameterReader;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.file.FILE; import com.fr.file.FILE;
import com.fr.general.*; import com.fr.general.*;
import com.fr.general.xml.GeneralXMLTools; import com.fr.general.xml.GeneralXMLTools;
import com.fr.io.importer.Excel2007ReportImporter; import com.fr.io.importer.Excel2007ReportImporter;
import com.fr.io.importer.ExcelReportImporter; import com.fr.io.importer.ExcelReportImporter;
import com.fr.main.impl.WorkBook; import com.fr.main.impl.WorkBook;
import com.fr.quickeditor.ChartQuickEditor; import com.fr.quickeditor.chartquick.BasicChartQuickEditor;
import com.fr.quickeditor.cellquick.*; import com.fr.quickeditor.chartquick.FloatChartQuickEditor;
import com.fr.quickeditor.floatquick.FloatImageQuickEditor; import com.fr.quickeditor.cellquick.*;
import com.fr.quickeditor.floatquick.FloatStringQuickEditor; import com.fr.quickeditor.floatquick.FloatImageQuickEditor;
import com.fr.report.cell.CellElementValueConverter; import com.fr.quickeditor.floatquick.FloatStringQuickEditor;
import com.fr.report.cell.cellattr.core.RichText; import com.fr.report.cell.CellElementValueConverter;
import com.fr.report.cell.cellattr.core.SubReport; import com.fr.report.cell.cellattr.core.RichText;
import com.fr.report.cell.cellattr.core.group.DSColumn; import com.fr.report.cell.cellattr.core.SubReport;
import com.fr.report.cell.painter.BiasTextPainter; import com.fr.report.cell.cellattr.core.group.DSColumn;
import com.fr.stable.ArrayUtils; import com.fr.report.cell.painter.BiasTextPainter;
import com.fr.stable.ParameterProvider; import com.fr.stable.ArrayUtils;
import com.fr.stable.StringUtils; import com.fr.stable.ParameterProvider;
import com.fr.stable.bridge.StableFactory; import com.fr.stable.StringUtils;
import com.fr.stable.fun.LogProvider; import com.fr.stable.bridge.StableFactory;
import com.fr.stable.script.CalculatorProviderContext; import com.fr.stable.fun.LogProvider;
import com.fr.stable.script.ValueConverter; import com.fr.stable.script.CalculatorProviderContext;
import com.fr.stable.web.ServletContext; import com.fr.stable.script.ValueConverter;
import com.fr.stable.web.ServletContextAdapter; import com.fr.stable.web.ServletContext;
import com.fr.stable.xml.ObjectTokenizer; import com.fr.stable.web.ServletContextAdapter;
import com.fr.stable.xml.ObjectXMLWriterFinder; import com.fr.stable.xml.ObjectTokenizer;
import com.fr.start.BBSGuestPaneProvider; import com.fr.stable.xml.ObjectXMLWriterFinder;
import com.fr.xml.ReportXMLUtils; import com.fr.start.BBSGuestPaneProvider;
import com.fr.xml.ReportXMLUtils;
import javax.swing.*;
import java.awt.*; import javax.swing.*;
import java.awt.event.ActionEvent; import java.awt.*;
import java.awt.event.ActionListener; import java.awt.event.ActionEvent;
import java.awt.image.BufferedImage; import java.awt.event.ActionListener;
import java.util.ArrayList; import java.awt.image.BufferedImage;
import java.util.Iterator; import java.util.ArrayList;
import java.util.Set; import java.util.Iterator;
import java.util.Set;
public class DesignerModule extends DesignModule {
public class DesignerModule extends DesignModule {
static {
ServletContext.addServletContextListener(new ServletContextAdapter() { static {
ServletContext.addServletContextListener(new ServletContextAdapter() {
public void onServletStart() {
ModuleContext.startModule(DesignerModule.class.getName()); public void onServletStart() {
} ModuleContext.startModule(DesignerModule.class.getName());
}); }
} });
}
/**
* 启动设计器模块 /**
*/ * 启动设计器模块
public void start() { */
super.start(); public void start() {
super.start();
justStartModules4Engine();
justStartModules4Designer(); justStartModules4Engine();
justStartModules4Designer();
CalculatorProviderContext.setValueConverter(valueConverter());
GeneralXMLTools.Object_Tokenizer = startXMLReadObjectTokenizer(); CalculatorProviderContext.setValueConverter(valueConverter());
GeneralXMLTools.Object_XML_Writer_Finder = startObjectXMLWriterFinder(); GeneralXMLTools.Object_Tokenizer = startXMLReadObjectTokenizer();
addAdapterForPlate(); GeneralXMLTools.Object_XML_Writer_Finder = startObjectXMLWriterFinder();
addAdapterForPlate();
registerCellEditor();
registerFloatEditor(); registerCellEditor();
registerData4Form(); registerFloatEditor();
registerOtherPane(); registerData4Form();
registerOtherPane();
InformationCollector.getInstance().collectStartTime();
InformationCollector.getInstance().collectStartTime();
ExtraDesignClassManager.getInstance().getFeedback().didFeedback();
StableFactory.registerMarkedObject(LogProvider.MARK_STRING, DesignerLogImpl.getInstance()); ExtraDesignClassManager.getInstance().getFeedback().didFeedback();
} StableFactory.registerMarkedObject(LogProvider.MARK_STRING, DesignerLogImpl.getInstance());
}
private void registerOtherPane() {
StableFactory.registerMarkedClass(BBSGuestPaneProvider.XML_TAG, BBSGuestPane.class); private void registerOtherPane() {
} StableFactory.registerMarkedClass(BBSGuestPaneProvider.XML_TAG, BBSGuestPane.class);
}
/**
* kunsnat:注册单元格选中Editor /**
*/ * kunsnat:注册单元格选中Editor
*/
private void registerCellEditor() {
ActionFactory.registerCellEditor(String.class, CellStringQuickEditor.class); private void registerCellEditor() {
ActionFactory.registerCellEditor(Number.class, CellStringQuickEditor.class); ActionFactory.registerCellEditor(String.class, CellStringQuickEditor.class);
ActionFactory.registerCellEditor(Formula.class, CellFormulaQuickEditor.class); ActionFactory.registerCellEditor(Number.class, CellStringQuickEditor.class);
ActionFactory.registerCellEditor(SubReport.class, CellSubReportEditor.class); ActionFactory.registerCellEditor(Formula.class, CellFormulaQuickEditor.class);
ActionFactory.registerCellEditor(RichText.class, CellRichTextEditor.class); ActionFactory.registerCellEditor(SubReport.class, CellSubReportEditor.class);
ActionFactory.registerCellEditor(DSColumn.class, CellDSColumnEditor.class); ActionFactory.registerCellEditor(RichText.class, CellRichTextEditor.class);
ActionFactory.registerCellEditor(Image.class, CellImageQuickEditor.class); ActionFactory.registerCellEditor(DSColumn.class, CellDSColumnEditor.class);
ActionFactory.registerCellEditor(BiasTextPainter.class, CellBiasTextPainterEditor.class); ActionFactory.registerCellEditor(Image.class, CellImageQuickEditor.class);
ActionFactory.registerCellEditor(BufferedImage.class, CellImageQuickEditor.class); ActionFactory.registerCellEditor(BiasTextPainter.class, CellBiasTextPainterEditor.class);
ActionFactory.registerCellEditor(BufferedImage.class, CellImageQuickEditor.class);
ActionFactory.registerChartCellEditorInEditor(ChartQuickEditor.class);
ActionFactory.registerChartCellEditorInEditor(BasicChartQuickEditor.class);
Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING);
for (ElementUIProvider provider : providers) { Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING);
ActionFactory.registerCellEditor(provider.targetObjectClass(), provider.quickEditor()); for (ElementUIProvider provider : providers) {
} ActionFactory.registerCellEditor(provider.targetObjectClass(), provider.quickEditor());
} }
}
public String getInterNationalName() {
return Inter.getLocText("FR-Module_Designer"); public String getInterNationalName() {
} return Inter.getLocText("FR-Module_Designer");
}
/**
* kunnat: 注册悬浮选中Editor /**
*/ * kunnat: 注册悬浮选中Editor
private void registerFloatEditor() { */
ActionFactory.registerFloatEditor(String.class, FloatStringQuickEditor.class); private void registerFloatEditor() {
ActionFactory.registerFloatEditor(Formula.class, FloatStringQuickEditor.class); ActionFactory.registerFloatEditor(String.class, FloatStringQuickEditor.class);
ActionFactory.registerFloatEditor(Formula.class, FloatStringQuickEditor.class);
FloatImageQuickEditor floatImageQuickEditor = new FloatImageQuickEditor(); ActionFactory.registerFloatEditor(Image.class, FloatImageQuickEditor.class);
ActionFactory.registerFloatEditor(Image.class, FloatImageQuickEditor.class); ActionFactory.registerFloatEditor(BufferedImage.class, FloatImageQuickEditor.class);
ActionFactory.registerFloatEditor(BufferedImage.class, FloatImageQuickEditor.class);
ActionFactory.registerChartFloatEditorInEditor(ChartQuickEditor.class); ActionFactory.registerChartFloatEditorInEditor(FloatChartQuickEditor.class);
} }
/** /**
* kunsnat: 一些模块信息 必须跟随设计器启动, * kunsnat: 一些模块信息 必须跟随设计器启动,
* 比如 读取CC.XML, 设计器启动之后, 马上会读取XML, 需要Chart_Module中的注册信息 * 比如 读取CC.XML, 设计器启动之后, 马上会读取XML, 需要Chart_Module中的注册信息
*/ */
private void justStartModules4Engine() { private void justStartModules4Engine() {
ModuleContext.startModule(ENGINE_MODULE); ModuleContext.startModule(ENGINE_MODULE);
} }
private void justStartModules4Designer() { private void justStartModules4Designer() {
ModuleContext.startModule(CHART_DESIGNER_MODULE); ModuleContext.startModule(CHART_DESIGNER_MODULE);
ModuleContext.startModule(FORM_DESIGNER_MODULE); ModuleContext.startModule(FORM_DESIGNER_MODULE);
} }
/** /**
* CellElementValueConverter用来处理设计器格子里的值将公式/数组/其他元素转换成对应的值 * CellElementValueConverter用来处理设计器格子里的值将公式/数组/其他元素转换成对应的值
* *
* @return 返回处理格子值的转换器 * @return 返回处理格子值的转换器
*/ */
public ValueConverter valueConverter() { public ValueConverter valueConverter() {
return new CellElementValueConverter(); return new CellElementValueConverter();
} }
@Override @Override
/* /*
* 针对不同的对象在读取Object对象的xml的时候需要使用不同的对象生成器 * 针对不同的对象在读取Object对象的xml的时候需要使用不同的对象生成器
* @return 返回对象生成器 * @return 返回对象生成器
*/ */
public ObjectTokenizer startXMLReadObjectTokenizer() { public ObjectTokenizer startXMLReadObjectTokenizer() {
return new ReportXMLUtils.ReportObjectTokenizer(); return new ReportXMLUtils.ReportObjectTokenizer();
} }
/** /**
* 针对不同的对象在写对象的XML时需要使用不同的XML生成器 * 针对不同的对象在写对象的XML时需要使用不同的XML生成器
* *
* @return 返回xml生成器 * @return 返回xml生成器
*/ */
@Override @Override
public ObjectXMLWriterFinder startObjectXMLWriterFinder() { public ObjectXMLWriterFinder startObjectXMLWriterFinder() {
return new ReportXMLUtils.ReportObjectXMLWriterFinder(); return new ReportXMLUtils.ReportObjectXMLWriterFinder();
} }
//wei:fs的模块中可能有需要设计器界面做设置的地方,在这边添加 //wei:fs的模块中可能有需要设计器界面做设置的地方,在这边添加
private void addAdapterForPlate() { private void addAdapterForPlate() {
ProcessTransitionAdapter.setProcessTransitionAdapter(new ProcessTransitionAdapter() { ProcessTransitionAdapter.setProcessTransitionAdapter(new ProcessTransitionAdapter() {
@Override @Override
protected String[] getTransitionNamesByBook(String book) { protected String[] getTransitionNamesByBook(String book) {
return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getTransitionNamesByBook(book); return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getTransitionNamesByBook(book);
} }
@Override @Override
protected String[] getParaNames(String book) { protected String[] getParaNames(String book) {
return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getParaNames(book); return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getParaNames(book);
} }
@Override @Override
protected ParameterProvider[] getParas(String book) { protected ParameterProvider[] getParas(String book) {
return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getParas(book); return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getParas(book);
} }
protected MultiFieldParameter[] getAllMultiFieldParas(String book) { protected MultiFieldParameter[] getAllMultiFieldParas(String book) {
return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getAllMultiFieldParas(book); return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getAllMultiFieldParas(book);
} }
}); });
} }
private static abstract class AbstractWorkBookApp implements App<WorkBook> { private static abstract class AbstractWorkBookApp implements App<WorkBook> {
@Override @Override
public int currentAPILevel() { public int currentAPILevel() {
return CURRENT_LEVEL; return CURRENT_LEVEL;
} }
@Override @Override
public JTemplate<WorkBook, ?> openTemplate(FILE tplFile) { public JTemplate<WorkBook, ?> openTemplate(FILE tplFile) {
return new JWorkBook(asIOFile(tplFile), tplFile); return new JWorkBook(asIOFile(tplFile), tplFile);
} }
@Override @Override
public String mark4Provider() { public String mark4Provider() {
return getClass().getName(); return getClass().getName();
} }
@Override @Override
public void process() { public void process() {
} }
@Override @Override
public void undo() { public void undo() {
} }
} }
@Override @Override
/* /*
* 返回设计器能打开的模板类型的一个数组列表 * 返回设计器能打开的模板类型的一个数组列表
* @return 可以打开的模板类型的数组 * @return 可以打开的模板类型的数组
*/ */
public App[] apps4TemplateOpener() { public App[] apps4TemplateOpener() {
return new App[]{getCptApp(), getXlsApp(), getXlsxApp()}; return new App[]{getCptApp(), getXlsApp(), getXlsxApp()};
} }
private AbstractWorkBookApp getXlsxApp() { private AbstractWorkBookApp getXlsxApp() {
return new AbstractWorkBookApp() { return new AbstractWorkBookApp() {
@Override @Override
public String[] defaultExtentions() { public String[] defaultExtentions() {
return new String[]{"xlsx"}; return new String[]{"xlsx"};
} }
@Override @Override
public WorkBook asIOFile(FILE tplFile) { public WorkBook asIOFile(FILE tplFile) {
WorkBook workbook = null; WorkBook workbook = null;
try { try {
workbook = new Excel2007ReportImporter().generateWorkBookByStream(tplFile.asInputStream()); workbook = new Excel2007ReportImporter().generateWorkBookByStream(tplFile.asInputStream());
} catch (Exception exp) { } catch (Exception exp) {
FRContext.getLogger().error("Failed to generate xlsx from " + tplFile, exp); FRContext.getLogger().error("Failed to generate xlsx from " + tplFile, exp);
} }
return workbook; return workbook;
} }
}; };
} }
private AbstractWorkBookApp getXlsApp() { private AbstractWorkBookApp getXlsApp() {
return new AbstractWorkBookApp() { return new AbstractWorkBookApp() {
@Override @Override
public String[] defaultExtentions() { public String[] defaultExtentions() {
return new String[]{"xls"}; return new String[]{"xls"};
} }
@Override @Override
public WorkBook asIOFile(FILE tplFile) { public WorkBook asIOFile(FILE tplFile) {
WorkBook workbook = null; WorkBook workbook = null;
try { try {
workbook = new ExcelReportImporter().generateWorkBookByStream(tplFile.asInputStream()); workbook = new ExcelReportImporter().generateWorkBookByStream(tplFile.asInputStream());
} catch (Exception exp) { } catch (Exception exp) {
FRContext.getLogger().error("Failed to generate xls from " + tplFile, exp); FRContext.getLogger().error("Failed to generate xls from " + tplFile, exp);
} }
return workbook; return workbook;
} }
}; };
} }
private AbstractWorkBookApp getCptApp() { private AbstractWorkBookApp getCptApp() {
return new AbstractWorkBookApp() { return new AbstractWorkBookApp() {
public String[] defaultExtentions() { public String[] defaultExtentions() {
return new String[]{"cpt"}; return new String[]{"cpt"};
} }
public WorkBook asIOFile(FILE file) { public WorkBook asIOFile(FILE file) {
if (XMLEncryptUtils.isCptEncoded() && if (XMLEncryptUtils.isCptEncoded() &&
!XMLEncryptUtils.checkVaild(DesignerEnvManager.getEnvManager().getEncryptionKey())) { !XMLEncryptUtils.checkVaild(DesignerEnvManager.getEnvManager().getEncryptionKey())) {
if (!new DecodeDialog(file).isPwdRight()) { if (!new DecodeDialog(file).isPwdRight()) {
FRContext.getLogger().error(Inter.getLocText("ECP-error_pwd")); FRContext.getLogger().error(Inter.getLocText("ECP-error_pwd"));
return new WorkBook(); return new WorkBook();
} }
} }
WorkBook tpl = new WorkBook(); WorkBook tpl = new WorkBook();
// richer:打开报表通知 // richer:打开报表通知
FRContext.getLogger().info(Inter.getLocText(new String[]{"LOG-Is_Being_Openned", "LOG-Please_Wait"}, new String[]{"\"" + file.getName() + "\"" + ",", "..."})); FRContext.getLogger().info(Inter.getLocText(new String[]{"LOG-Is_Being_Openned", "LOG-Please_Wait"}, new String[]{"\"" + file.getName() + "\"" + ",", "..."}));
TempNameStyle namestyle = TempNameStyle.getInstance(); TempNameStyle namestyle = TempNameStyle.getInstance();
namestyle.clear(); namestyle.clear();
String checkStr = StringUtils.EMPTY; String checkStr = StringUtils.EMPTY;
try { try {
checkStr = IOUtils.inputStream2String(file.asInputStream()); checkStr = IOUtils.inputStream2String(file.asInputStream());
tpl.readStream(file.asInputStream()); tpl.readStream(file.asInputStream());
} catch (Exception exp) { } catch (Exception exp) {
String errorMessage = StringUtils.EMPTY; String errorMessage = StringUtils.EMPTY;
errorMessage = ComparatorUtils.equals(RemoteDeziConstants.INVALID_USER, checkStr) ? Inter.getLocText("FR-Designer_No-Privilege") errorMessage = ComparatorUtils.equals(RemoteDeziConstants.INVALID_USER, checkStr) ? Inter.getLocText("FR-Designer_No-Privilege")
: Inter.getLocText("NS-exception_readError"); : Inter.getLocText("NS-exception_readError");
FRContext.getLogger().error(errorMessage + file, exp); FRContext.getLogger().error(errorMessage + file, exp);
} }
checkNameStyle(namestyle); checkNameStyle(namestyle);
return tpl; return tpl;
} }
}; };
} }
private static void checkNameStyle(TempNameStyle namestyle) { private static void checkNameStyle(TempNameStyle namestyle) {
Iterator it = namestyle.getIterator(); Iterator it = namestyle.getIterator();
ArrayList<String> al = new ArrayList<String>(); ArrayList<String> al = new ArrayList<String>();
while (it.hasNext()) { while (it.hasNext()) {
al.add((String) it.next()); al.add((String) it.next());
} }
if (!al.isEmpty()) { if (!al.isEmpty()) {
showConfirmDialog(al); showConfirmDialog(al);
} }
} }
private static void showConfirmDialog(final ArrayList<String> namelist) { private static void showConfirmDialog(final ArrayList<String> namelist) {
final JDialog jd = new JDialog(); final JDialog jd = new JDialog();
// 模态一下,因为可能会多个样式丢失 // 模态一下,因为可能会多个样式丢失
// jd.setModal(true); // jd.setModal(true);
jd.setAlwaysOnTop(true); jd.setAlwaysOnTop(true);
jd.setSize(450, 150); jd.setSize(450, 150);
jd.setResizable(false); jd.setResizable(false);
jd.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png")); jd.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png"));
String message = namelist.toString().replaceAll("\\[", "").replaceAll("\\]", ""); String message = namelist.toString().replaceAll("\\[", "").replaceAll("\\]", "");
UILabel jl = new UILabel(Inter.getLocText(new String[]{"Current_custom_global", "Has_been_gone"}, new String[]{message})); UILabel jl = new UILabel(Inter.getLocText(new String[]{"Current_custom_global", "Has_been_gone"}, new String[]{message}));
jl.setHorizontalAlignment(SwingConstants.CENTER); jl.setHorizontalAlignment(SwingConstants.CENTER);
jd.add(jl, BorderLayout.CENTER); jd.add(jl, BorderLayout.CENTER);
JPanel jp = new JPanel(); JPanel jp = new JPanel();
// ”是“按钮,点击之后将生成一个全局样式,并写入xml // ”是“按钮,点击之后将生成一个全局样式,并写入xml
UIButton confirmButton = new UIButton(Inter.getLocText("FR-Designer_Yes")); UIButton confirmButton = new UIButton(Inter.getLocText("FR-Designer_Yes"));
confirmButton.addActionListener(new ActionListener() { confirmButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
try { try {
for (int i = 0; i < namelist.size(); i++) { for (int i = 0; i < namelist.size(); i++) {
ConfigManager.getProviderInstance().putStyle(namelist.get(i), Style.DEFAULT_STYLE); ConfigManager.getProviderInstance().putStyle(namelist.get(i), Style.DEFAULT_STYLE);
FRContext.getCurrentEnv().writeResource(ConfigManager.getProviderInstance()); FRContext.getCurrentEnv().writeResource(ConfigManager.getProviderInstance());
} }
} catch (Exception ex) { } catch (Exception ex) {
FRLogger.getLogger().error(ex.getMessage()); FRLogger.getLogger().error(ex.getMessage());
} }
jd.dispose(); jd.dispose();
new StyleListAction().actionPerformed(e);// 弹窗 new StyleListAction().actionPerformed(e);// 弹窗
} }
}); });
UIButton noButton = new UIButton(Inter.getLocText("FR-Designer_No")); UIButton noButton = new UIButton(Inter.getLocText("FR-Designer_No"));
noButton.addActionListener(new ActionListener() { noButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
jd.dispose(); jd.dispose();
} }
}); });
jp.add(confirmButton); jp.add(confirmButton);
jp.add(noButton); jp.add(noButton);
jd.setTitle(Inter.getLocText("FR-Custom_styles_lost")); jd.setTitle(Inter.getLocText("FR-Custom_styles_lost"));
jd.add(jp, BorderLayout.SOUTH); jd.add(jp, BorderLayout.SOUTH);
GUICoreUtils.centerWindow(jd); GUICoreUtils.centerWindow(jd);
jd.setVisible(true); jd.setVisible(true);
} }
public Class<?>[] actionsForInsertCellElement() { public Class<?>[] actionsForInsertCellElement() {
return (Class<?>[]) ArrayUtils.addAll(new Class<?>[]{ return (Class<?>[]) ArrayUtils.addAll(new Class<?>[]{
DSColumnCellAction.class, DSColumnCellAction.class,
GeneralCellAction.class, GeneralCellAction.class,
RichTextCellAction.class, RichTextCellAction.class,
FormulaCellAction.class, FormulaCellAction.class,
ChartCellAction.class, ChartCellAction.class,
ImageCellAction.class, ImageCellAction.class,
BiasCellAction.class, BiasCellAction.class,
SubReportCellAction.class SubReportCellAction.class
}, super.actionsForInsertCellElement()); }, super.actionsForInsertCellElement());
} }
public Class<?>[] actionsForInsertFloatElement() { public Class<?>[] actionsForInsertFloatElement() {
return (Class<?>[]) ArrayUtils.addAll(new Class<?>[]{ return (Class<?>[]) ArrayUtils.addAll(new Class<?>[]{
TextBoxFloatAction.class, TextBoxFloatAction.class,
FormulaFloatAction.class, FormulaFloatAction.class,
ChartFloatAction.class, ChartFloatAction.class,
ImageFloatAction.class ImageFloatAction.class
}, super.actionsForInsertFloatElement()); }, super.actionsForInsertFloatElement());
} }
private void registerData4Form() { private void registerData4Form() {
StableFactory.registerMarkedClass(FormECDesignerProvider.XML_TAG, FormElementCaseDesigner.class); StableFactory.registerMarkedClass(FormECDesignerProvider.XML_TAG, FormElementCaseDesigner.class);
StableFactory.registerMarkedClass(FormECCompositeProvider.XML_TAG, FormReportComponentComposite.class); StableFactory.registerMarkedClass(FormECCompositeProvider.XML_TAG, FormReportComponentComposite.class);
DesignModuleFactory.registerParameterReader(new WorkBookParameterReader()); DesignModuleFactory.registerParameterReader(new WorkBookParameterReader());
} }
} }

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

@ -75,12 +75,23 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
this.setBorder(null); this.setBorder(null);
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
setComponentBg(this); setComponentBg(this);
// formParaDesignEditor = new FormParaDesigner(new FormParameterUI());
paraDesignEditor = DesignModuleFactory.getFormParaDesigner(); paraDesignEditor = DesignModuleFactory.getFormParaDesigner();
if (paraDesignEditor == null) { if (paraDesignEditor == null) {
return; return;
} }
paraDesignEditor.initWidgetToolbarPane(); paraDesignEditor.initWidgetToolbarPane();
this.add(paraDesignEditor.createWrapper(), BorderLayout.CENTER);
setButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/toolbarbtn/parametersetting.png"));
setButton.set4ToolbarButton();
isshowWindowItem = new JCheckBoxMenuItem(Inter.getLocText("ParameterD-Show_Parameter_Window"));
isdelayItem = new JCheckBoxMenuItem(Inter.getLocText("ParameterD-Delay_Playing"));
initListeners();
}
private void initListeners() {
((TargetComponent) paraDesignEditor).addTargetModifiedListener(new TargetModifiedListener() { ((TargetComponent) paraDesignEditor).addTargetModifiedListener(new TargetModifiedListener() {
@Override @Override
public void targetModified(TargetModifiedEvent e) { public void targetModified(TargetModifiedEvent e) {
@ -93,7 +104,6 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
paraDesignEditor.addListener(this); paraDesignEditor.addListener(this);
propertyChangeListener = new PropertyChangeAdapter() { propertyChangeListener = new PropertyChangeAdapter() {
@Override @Override
public void propertyChange() { public void propertyChange() {
if (isEditing) { if (isEditing) {
@ -102,12 +112,7 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
} }
} }
}; };
this.add(paraDesignEditor.createWrapper(), BorderLayout.CENTER);
// WidgetToolBarPane.getRecentSearchManger(formParaDesignEditor);
setButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/toolbarbtn/parametersetting.png"));
setButton.set4ToolbarButton();
isshowWindowItem = new JCheckBoxMenuItem(Inter.getLocText("ParameterD-Show_Parameter_Window"));
isshowWindowItem.addItemListener(new ItemListener() { isshowWindowItem.addItemListener(new ItemListener() {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
@ -116,9 +121,8 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
} }
} }
}); });
isdelayItem = new JCheckBoxMenuItem(Inter.getLocText("ParameterD-Delay_Playing"));
isdelayItem.addItemListener(new ItemListener() {
isdelayItem.addItemListener(new ItemListener() {
@Override @Override
public void itemStateChanged(ItemEvent e) { public void itemStateChanged(ItemEvent e) {
if (propertyChangeListener != null) { if (propertyChangeListener != null) {
@ -128,7 +132,6 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
} }
}); });
setButton.addActionListener(new ActionListener() { setButton.addActionListener(new ActionListener() {
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
@ -298,7 +301,7 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
*/ */
public void refreshParameter() { public void refreshParameter() {
if (paraDesignEditor != null) { if (paraDesignEditor != null) {
paraDesignEditor.refreshParameter(this); paraDesignEditor.refreshParameter(this, this.workBook);
} }
} }

54
designer/src/com/fr/grid/GridCorner.java

@ -3,18 +3,15 @@
*/ */
package com.fr.grid; package com.fr.grid;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import javax.swing.event.MouseInputListener;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.design.constants.UIConstants;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
import javax.swing.event.MouseInputListener;
import java.awt.*;
import java.awt.geom.Rectangle2D;
/** /**
* GridCorner used to paint and edit grid cornor. * GridCorner used to paint and edit grid cornor.
*/ */
@ -29,16 +26,16 @@ public class GridCorner extends BaseGridComponent {
this.addMouseListener(l); this.addMouseListener(l);
this.addMouseMotionListener(l); this.addMouseMotionListener(l);
} }
/** /**
* Paints component * Paints component
*/ */
@Override @Override
public void paintComponent(Graphics g) { public void paintComponent(Graphics g) {
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;
ElementCasePane reportPane = this.getElementCasePane(); ElementCasePane reportPane = this.getElementCasePane();
float time = (float)reportPane.getResolution()/ ScreenResolution.getScreenResolution(); float time = (float) reportPane.getResolution() / ScreenResolution.getScreenResolution();
//size //size
Dimension size = this.getSize(); Dimension size = this.getSize();
Rectangle2D rect2D = new Rectangle2D.Double(0, 0, size.getWidth(), size.getHeight()); Rectangle2D rect2D = new Rectangle2D.Double(0, 0, size.getWidth(), size.getHeight());
@ -50,9 +47,9 @@ public class GridCorner extends BaseGridComponent {
g2d.setPaint(reportPane.getBackground()); g2d.setPaint(reportPane.getBackground());
GraphHelper.fill(g2d, rect2D); GraphHelper.fill(g2d, rect2D);
} }
paintArc(g2d, size, time); paintArc(g2d, size, time);
//画左边的边框线. //画左边的边框线.
g2d.setColor(reportPane.getGridColumn().getSeparatorLineColor()); g2d.setColor(reportPane.getGridColumn().getSeparatorLineColor());
GraphHelper.drawLine(g2d, 0, 0, 0, size.getHeight()); GraphHelper.drawLine(g2d, 0, 0, 0, size.getHeight());
@ -66,7 +63,7 @@ public class GridCorner extends BaseGridComponent {
* Gets the preferred size. * Gets the preferred size.
*/ */
@Override @Override
public Dimension getPreferredSize() { public Dimension getPreferredSize() {
ElementCasePane reportPane = this.getElementCasePane(); ElementCasePane reportPane = this.getElementCasePane();
if (!reportPane.isColumnHeaderVisible() || !reportPane.isRowHeaderVisible()) { if (!reportPane.isColumnHeaderVisible() || !reportPane.isRowHeaderVisible()) {
@ -74,28 +71,31 @@ public class GridCorner extends BaseGridComponent {
} }
return new Dimension(reportPane.getGridRow().getPreferredSize().width, return new Dimension(reportPane.getGridRow().getPreferredSize().width,
reportPane.getGridColumn().getPreferredSize().height); reportPane.getGridColumn().getPreferredSize().height);
} }
/** /**
* Gets corner background. * Gets corner background.
*/ */
@Override @Override
public Color getBackground() { public Color getBackground() {
return super.getBackground(); return super.getBackground();
} }
private void paintArc(Graphics2D g2d, Dimension size, float time) { private void paintArc(Graphics2D g2d, Dimension size, float time) {
g2d.setColor(Color.gray); g2d.setColor(UIConstants.LINE_COLOR);
int width = (int) (size.width - (16 * time)); float height = 2 * time;
int avgWidth = width / 3; float width = 2 * time;
int height = (int) (size.height - (8 * time)); float hgap = 4 * time;
int avgHeight = height / 3; float vgap = 3 * time;
for (int i = 0; i < 3; i ++) {
for (int j = 0; j < 3; j ++) { int x = (int) ((size.width - (hgap * 2 + width * 3)) / 2);
GraphHelper.fillArc(g2d, (8 * time) + (i * avgWidth), (4 * time) + (j * avgHeight), 3, 3, 0, 360); int y = (int) (size.height - (vgap * 2 + height * 3));
} for (int i = 0; i < 3; i++) {
} for (int j = 0; j < 3; j++) {
GraphHelper.fillRect(g2d, x + (i * hgap), y + (j * vgap), width, height);
}
}
} }
} }

2
designer/src/com/fr/poly/PolyBlockProperTable.java

@ -42,6 +42,8 @@ public class PolyBlockProperTable extends JPanel {
height = new UISpinner(0, MAX_SPINNER_VALUE, 1); height = new UISpinner(0, MAX_SPINNER_VALUE, 1);
UIExpandablePane boundsPane = WidgetBoundsPaneFactory.createAbsoluteBoundsPane(x, y, width, height); UIExpandablePane boundsPane = WidgetBoundsPaneFactory.createAbsoluteBoundsPane(x, y, width, height);
this.add(boundsPane, BorderLayout.CENTER); this.add(boundsPane, BorderLayout.CENTER);
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
} }
private void initListener(Container parentComponent) { private void initListener(Container parentComponent) {

320
designer/src/com/fr/poly/creator/ChartBlockCreator.java

@ -1,166 +1,156 @@
/* package com.fr.poly.creator;
* Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved.
*/ import com.fr.design.DesignState;
package com.fr.poly.creator; import com.fr.design.designer.TargetComponent;
import com.fr.design.gui.chart.MiddleChartComponent;
import java.awt.*; import com.fr.design.menu.MenuDef;
import java.awt.image.BufferedImage; import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef;
import javax.swing.*; import com.fr.design.module.DesignModuleFactory;
import com.fr.design.selection.QuickEditor;
import com.fr.base.ScreenResolution; import com.fr.quickeditor.chartquick.PolyChartQuickEditor;
import com.fr.design.DesignState; import com.fr.report.poly.PolyChartBlock;
import com.fr.design.designer.TargetComponent; import com.fr.stable.unit.FU;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.stable.unit.UNIT;
import com.fr.design.gui.chart.MiddleChartComponent; import com.fr.stable.unit.UnitRectangle;
import com.fr.design.menu.MenuDef;
import com.fr.design.menu.ShortCut; import javax.swing.*;
import com.fr.design.menu.ToolBarDef; import java.awt.*;
import com.fr.design.module.DesignModuleFactory;
import com.fr.design.selection.QuickEditor; /**
import com.fr.quickeditor.ChartQuickEditor; * @author richer
import com.fr.report.poly.PolyChartBlock; * @since 6.5.4 创建于2011-5-10
import com.fr.stable.unit.FU; */
import com.fr.stable.unit.UNIT; public class ChartBlockCreator extends BlockCreator<PolyChartBlock> {
import com.fr.stable.unit.UnitRectangle; private MiddleChartComponent cpm;
private ChartBlockEditor editor;
/**
* @author richer //图表默认宽高330*240
* @since 6.5.4 创建于2011-5-10 private static final UNIT DEFAULT_WIDTH = FU.getInstance(12573000);
*/ private static final UNIT DEFAULT_HEIGHT = FU.getInstance(9144000);
public class ChartBlockCreator extends BlockCreator<PolyChartBlock> {
private MiddleChartComponent cpm;
private ChartBlockEditor editor; public ChartBlockCreator() {
//图表默认宽高330*240 }
private static final UNIT DEFAULT_WIDTH = FU.getInstance(12573000);
private static final UNIT DEFAULT_HEIGHT = FU.getInstance(9144000); public ChartBlockCreator(PolyChartBlock block) {
super(block);
}
public ChartBlockCreator() {
public void setResolution(int resolution) {
} this.resolution = resolution;
}
public ChartBlockCreator(PolyChartBlock block) {
super(block); /**
} * 初始化
*
public void setResolution(int resolution){ * @return 初始化的控件.
this.resolution = resolution; */
} public JComponent initMonitor() {
cpm = DesignModuleFactory.getChartComponent(getValue().getChartCollection());
/** cpm.setBorder(BorderFactory.createLineBorder(Color.lightGray));
* 初始化 return cpm;
* @return 初始化的控件. }
*/
public JComponent initMonitor() { public UnitRectangle getDefaultBlockBounds() {
cpm = DesignModuleFactory.getChartComponent(getValue().getChartCollection()); return new UnitRectangle(UNIT.ZERO, UNIT.ZERO, DEFAULT_WIDTH, DEFAULT_HEIGHT);
cpm.setBorder(BorderFactory.createLineBorder(Color.lightGray)); }
return cpm;
} @Override
public BlockEditor getEditor() {
public UnitRectangle getDefaultBlockBounds() { if (editor == null) {
return new UnitRectangle(UNIT.ZERO, UNIT.ZERO, DEFAULT_WIDTH, DEFAULT_HEIGHT); editor = new ChartBlockEditor(designer, this);
} }
return editor;
@Override }
public BlockEditor getEditor() {
if (editor == null) { @Override
editor = new ChartBlockEditor(designer, this); public int getX(float time) {
} return (int) (this.getX() * time);
return editor; }
}
@Override
@Override public int getY(float time) {
public int getX(float time) { return (int) (this.getY() * time);
return (int) (this.getX() * time); }
}
@Override /**
public int getY(float time) { * 检测按钮状态
return (int) (this.getY() * time); *
} * @date 2015-2-5-上午11:33:46
*/
public void checkButtonEnable() {
/** if (editor == null) {
* 检测按钮状态 editor = new ChartBlockEditor(designer, this);
* }
* @date 2015-2-5-上午11:33:46 editor.checkChartButtonsEnable();
* }
*/
public void checkButtonEnable() { @Override
if (editor == null) { public PolyChartBlock getValue() {
editor = new ChartBlockEditor(designer, this); return block;
} }
editor.checkChartButtonsEnable();
} @Override
public void setValue(PolyChartBlock block) {
@Override this.block = block;
public PolyChartBlock getValue() { cpm.populate(this.block.getChartCollection());
return block; }
}
@Override /**
public void setValue(PolyChartBlock block) { * 获取当前工具栏组
this.block = block; *
cpm.populate(this.block.getChartCollection()); * @return 工具栏组
} * @date 2015-2-5-上午11:29:07
*/
public ToolBarDef[] toolbars4Target() {
return new ToolBarDef[0];
/** }
* 获取当前工具栏组
* /**
* @return 工具栏组 * 在Form的工具栏组
* *
* @date 2015-2-5-上午11:29:07 * @return 组件数组
* * @date 2015-2-5-上午11:31:46
*/ */
public ToolBarDef[] toolbars4Target() { public JComponent[] toolBarButton4Form() {
return new ToolBarDef[0]; return new JComponent[0];
} }
/** /**
* 在Form的工具栏组 * 目标的列表
* *
* @return 组件数组 * @return 返回列表.
* */
* @date 2015-2-5-上午11:31:46 public MenuDef[] menus4Target() {
* return new MenuDef[0];
*/ }
public JComponent[] toolBarButton4Form() {
return new JComponent[0]; public int getMenuState() {
} return DesignState.POLY_SHEET;
}
/**
* 目标的列表 /**
* @return 返回列表. * 模板的Menu
*/ *
public MenuDef[] menus4Target() { * @return 模板的menu
return new MenuDef[0]; */
} public ShortCut[] shortcut4TemplateMenu() {
return new ShortCut[0];
public int getMenuState(){ }
return DesignState.POLY_SHEET;
} @Override
public PolyElementCasePane getEditingElementCasePane() {
/** return null;
* 模板的Menu }
* @return 模板的menu
*/ @Override
public ShortCut[] shortcut4TemplateMenu() { public QuickEditor getQuickEditor(TargetComponent tc) {
return new ShortCut[0]; PolyChartQuickEditor quitEditor = new PolyChartQuickEditor();
} quitEditor.populate(tc);
return quitEditor;
@Override }
public PolyElementCasePane getEditingElementCasePane() {
return null;
}
@Override
public QuickEditor getQuickEditor(TargetComponent tc) {
ChartQuickEditor quitEditor = new ChartQuickEditor();
quitEditor.populate(tc);
return quitEditor;
}
} }

7
designer/src/com/fr/quickeditor/CellQuickEditor.java

@ -66,10 +66,10 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] columnSize = {p, f}; double[] columnSize = {p, f};
double[] rowSize = {p, p};
JComponent centerBody = createCenterBody(); JComponent centerBody = createCenterBody();
JPanel topContent = initTopContent(); JPanel topContent = initTopContent();
if (isScrollAll()) { if (isScrollAll()) {
double[] scrollAllRowSize = {p, p};
prepareScrollBar(); prepareScrollBar();
topContent.setBorder(BorderFactory.createMatteBorder(10, 10, 0, 0, this.getBackground())); topContent.setBorder(BorderFactory.createMatteBorder(10, 10, 0, 0, this.getBackground()));
centerBody.setBorder(BorderFactory.createMatteBorder(0, 10, 0, 0, this.getBackground())); centerBody.setBorder(BorderFactory.createMatteBorder(0, 10, 0, 0, this.getBackground()));
@ -77,7 +77,7 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
new Component[]{topContent, null}, new Component[]{topContent, null},
new Component[]{centerBody, null} new Component[]{centerBody, null}
}; };
leftContentPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP); leftContentPane = TableLayoutHelper.createGapTableLayoutPane(components, scrollAllRowSize, columnSize, HGAP, VGAP);
this.setLayout(new CellElementBarLayout(leftContentPane) { this.setLayout(new CellElementBarLayout(leftContentPane) {
@Override @Override
public void layoutContainer(Container parent) { public void layoutContainer(Container parent) {
@ -104,6 +104,7 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
this.add(scrollBar); this.add(scrollBar);
this.add(leftContentPane); this.add(leftContentPane);
} else { } else {
double[] scrollContentRowSize = {p, f};
topContent.setBorder(BorderFactory.createMatteBorder(10, 10, 0, 10, this.getBackground())); topContent.setBorder(BorderFactory.createMatteBorder(10, 10, 0, 10, this.getBackground()));
centerBody.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, this.getBackground())); centerBody.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, this.getBackground()));
Component[][] components = new Component[][]{ Component[][] components = new Component[][]{
@ -111,7 +112,7 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
new Component[]{centerBody, null} new Component[]{centerBody, null}
}; };
this.setLayout(new BorderLayout()); this.setLayout(new BorderLayout());
this.add(TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP), BorderLayout.CENTER); this.add(TableLayoutHelper.createGapTableLayoutPane(components, scrollContentRowSize, columnSize, HGAP, VGAP), BorderLayout.CENTER);
} }
} }

54
designer/src/com/fr/quickeditor/ChartQuickEditor.java

@ -1,54 +0,0 @@
package com.fr.quickeditor;
import com.fr.base.chart.BaseChartCollection;
//import com.fr.chart.chartattr.ChartCollection;
import com.fr.design.designer.TargetComponent;
import com.fr.design.gui.chart.BaseChartPropertyPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.module.DesignModuleFactory;
import com.fr.design.selection.QuickEditor;
import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.FloatSelection;
import com.fr.grid.selection.Selection;
import com.fr.poly.PolyDesigner;
import com.fr.poly.creator.ChartBlockEditor;
import com.fr.report.cell.Elem;
import java.awt.*;
public class ChartQuickEditor extends QuickEditor<TargetComponent>{
// kunsnat: editingPropertyPane初始化 避开设计器启动, 在用到的时候再初始化.
//private BaseChartPropertyPane editingPropertyPane = null;
public ChartQuickEditor() {
setLayout(new BorderLayout());
setBorder(null);
}
@Override
protected void refresh() {
BaseChartPropertyPane editingPropertyPane = null;
BaseChartCollection collection = null;
if(tc instanceof PolyDesigner) {
ChartBlockEditor chartBlockEditor = (ChartBlockEditor)((PolyDesigner)tc).getSelection().getEditor();
collection = chartBlockEditor.getValue().getChartCollection();
add(editingPropertyPane = DesignModuleFactory.getChartPropertyPane(), BorderLayout.CENTER);
editingPropertyPane.setSupportCellData(false);
} else {
Selection selection = ((ElementCasePane)tc).getSelection();
Elem element = null;
if(selection instanceof CellSelection) {
CellSelection cs = (CellSelection)selection;
element = ((ElementCasePane)tc).getEditingElementCase().getCellElement(cs.getColumn(), cs.getRow());
} else if(selection instanceof FloatSelection){
FloatSelection fs = (FloatSelection)selection;
element = ((ElementCasePane)tc).getEditingElementCase().getFloatElement(fs.getSelectedFloatName());
}
collection = (BaseChartCollection) element.getValue();
add(editingPropertyPane = DesignModuleFactory.getChartPropertyPane(), BorderLayout.CENTER);
}
editingPropertyPane.populateChartPropertyPane(collection, tc);
}
}

51
designer/src/com/fr/quickeditor/chartquick/BasicChartQuickEditor.java

@ -0,0 +1,51 @@
package com.fr.quickeditor.chartquick;
import com.fr.base.chart.BaseChartCollection;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.insert.cell.ChartCellAction;
import com.fr.design.gui.chart.BaseChartPropertyPane;
import com.fr.design.module.DesignModuleFactory;
import com.fr.grid.selection.CellSelection;
import com.fr.grid.selection.Selection;
import com.fr.quickeditor.CellQuickEditor;
import com.fr.report.cell.Elem;
import javax.swing.*;
public class BasicChartQuickEditor extends CellQuickEditor {
private BaseChartPropertyPane editingPropertyPane;
public BasicChartQuickEditor() {
super();
}
@Override
public JComponent createCenterBody() {
editingPropertyPane = DesignModuleFactory.getChartPropertyPane();
editingPropertyPane.setBorder(BorderFactory.createEmptyBorder());
return editingPropertyPane;
}
@Override
public boolean isScrollAll() {
return false;
}
@Override
public Object getComboBoxSelected() {
return ActionFactory.createAction(ChartCellAction.class);
}
@Override
protected void refreshDetails() {
BaseChartCollection collection;
Selection selection = tc.getSelection();
Elem element;
CellSelection cs = (CellSelection) selection;
element = tc.getEditingElementCase().getCellElement(cs.getColumn(), cs.getRow());
collection = (BaseChartCollection) element.getValue();
editingPropertyPane.populateChartPropertyPane(collection, tc);
}
}

34
designer/src/com/fr/quickeditor/chartquick/FloatChartQuickEditor.java

@ -0,0 +1,34 @@
package com.fr.quickeditor.chartquick;
import com.fr.base.chart.BaseChartCollection;
import com.fr.design.gui.chart.BaseChartPropertyPane;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.module.DesignModuleFactory;
import com.fr.design.selection.QuickEditor;
import com.fr.grid.selection.FloatSelection;
import com.fr.grid.selection.Selection;
import com.fr.report.cell.Elem;
import java.awt.*;
public class FloatChartQuickEditor extends QuickEditor<ElementCasePane> {
public FloatChartQuickEditor() {
setLayout(new BorderLayout());
setBorder(null);
}
@Override
protected void refresh() {
BaseChartPropertyPane editingPropertyPane;
BaseChartCollection collection;
Selection selection = tc.getSelection();
Elem element;
FloatSelection fs = (FloatSelection) selection;
element = tc.getEditingElementCase().getFloatElement(fs.getSelectedFloatName());
collection = (BaseChartCollection) element.getValue();
add(editingPropertyPane = DesignModuleFactory.getChartPropertyPane(), BorderLayout.CENTER);
editingPropertyPane.populateChartPropertyPane(collection, tc);
}
}

31
designer/src/com/fr/quickeditor/chartquick/PolyChartQuickEditor.java

@ -0,0 +1,31 @@
package com.fr.quickeditor.chartquick;
import com.fr.base.chart.BaseChartCollection;
import com.fr.design.designer.TargetComponent;
import com.fr.design.gui.chart.BaseChartPropertyPane;
import com.fr.design.module.DesignModuleFactory;
import com.fr.design.selection.QuickEditor;
import com.fr.poly.PolyDesigner;
import com.fr.poly.creator.ChartBlockEditor;
import java.awt.*;
public class PolyChartQuickEditor extends QuickEditor<TargetComponent> {
public PolyChartQuickEditor() {
setLayout(new BorderLayout());
setBorder(null);
}
@Override
protected void refresh() {
BaseChartPropertyPane editingPropertyPane;
BaseChartCollection collection;
ChartBlockEditor chartBlockEditor = (ChartBlockEditor) ((PolyDesigner) tc).getSelection().getEditor();
collection = chartBlockEditor.getValue().getChartCollection();
add(editingPropertyPane = DesignModuleFactory.getChartPropertyPane(), BorderLayout.CENTER);
editingPropertyPane.setSupportCellData(false);
editingPropertyPane.populateChartPropertyPane(collection, tc);
}
}

27
designer_base/src/com/fr/design/DesignerEnvManager.java

@ -153,6 +153,10 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
* DesignerEnvManager. * DesignerEnvManager.
*/ */
public static DesignerEnvManager getEnvManager() { public static DesignerEnvManager getEnvManager() {
return getEnvManager(true);
}
public static DesignerEnvManager getEnvManager(boolean needCheckEnv) {
if (designerEnvManager == null) { if (designerEnvManager == null) {
designerEnvManager = new DesignerEnvManager(); designerEnvManager = new DesignerEnvManager();
try { try {
@ -162,14 +166,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
} }
// james:如果没有env定义,要设置一个默认的 // james:如果没有env定义,要设置一个默认的
if (designerEnvManager.nameEnvMap.size() <= 0) { if (needCheckEnv) {
String installHome = StableUtils.getInstallHome(); checkNameEnvMap();
if (installHome != null) {
String name = Inter.getLocText("FR-Engine_DEFAULT");
String envPath = StableUtils.pathJoin(new String[]{installHome, ProjectConstants.WEBAPP_NAME, ProjectConstants.WEBINF_NAME});
designerEnvManager.putEnv(name, LocalEnv.createEnv(envPath));
designerEnvManager.setCurEnvName(name);
}
} }
GeneralContext.addEnvChangedListener(new EnvChangedListener() { GeneralContext.addEnvChangedListener(new EnvChangedListener() {
@ -187,6 +185,19 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
return designerEnvManager; return designerEnvManager;
} }
public static void checkNameEnvMap() {
if (designerEnvManager == null || designerEnvManager.nameEnvMap.size() > 0) {
return;
}
String installHome = StableUtils.getInstallHome();
if (installHome != null) {
String name = Inter.getLocText("FR-Engine_DEFAULT");
String envPath = StableUtils.pathJoin(new String[]{installHome, ProjectConstants.WEBAPP_NAME, ProjectConstants.WEBINF_NAME});
designerEnvManager.putEnv(name, LocalEnv.createEnv(envPath));
designerEnvManager.setCurEnvName(name);
}
}
/** /**
* 添加设计器中相关的worker * 添加设计器中相关的worker
* *

4
designer_base/src/com/fr/design/actions/UpdateAction.java

@ -139,6 +139,10 @@ public abstract class UpdateAction extends ShortCut implements Action {
this.putValue(Action.SMALL_ICON, smallIcon); this.putValue(Action.SMALL_ICON, smallIcon);
} }
public void setSmallIcon(Icon[] smallIcon, boolean white) {
this.putValue(Action.SMALL_ICON, smallIcon);
}
/** /**
* Returns the mnemonic property setting. * Returns the mnemonic property setting.
* *

6
designer_base/src/com/fr/design/actions/core/ActionFactory.java

@ -24,11 +24,11 @@ public class ActionFactory {
private ActionFactory() { private ActionFactory() {
} }
private static Map<Class, Class<? extends QuickEditor>> floatEditor = new HashMap<Class, Class<? extends QuickEditor>>(); private static Map<Class, Class<? extends QuickEditor>> floatEditor = new HashMap<>();
private static Class chartCollectionClass = null; private static Class chartCollectionClass = null;
private static Map<Class, Class<? extends QuickEditor>> cellEditor = new HashMap<Class, Class<? extends QuickEditor>>(); private static Map<Class, Class<? extends QuickEditor>> cellEditor = new HashMap<>();
private static UpdateAction chartPreStyleAction = null; private static UpdateAction chartPreStyleAction = null;
@ -98,7 +98,7 @@ public class ActionFactory {
} }
/** /**
* kunsnat: 图表注册 悬浮元素编辑器 , 因为ChartCollecion和ChartQuickEditor一个在Chart,一个在Designer, 所以分开注册. * kunsnat: 图表注册 悬浮元素编辑器 , 因为ChartCollection和ChartQuickEditor一个在Chart,一个在Designer, 所以分开注册.
* *
* @param editor 待说明 * @param editor 待说明
*/ */

2
designer_base/src/com/fr/design/actions/file/SwitchExistEnv.java

@ -3,7 +3,6 @@ package com.fr.design.actions.file;
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.FRCoreContext;
import com.fr.dav.LocalEnv; import com.fr.dav.LocalEnv;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
@ -118,7 +117,6 @@ public class SwitchExistEnv extends MenuDef {
return; return;
} }
SignIn.signIn(selectedEnv); SignIn.signIn(selectedEnv);
FRCoreContext.resetBytes();
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshToolArea(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshToolArea();
fireDSChanged(); fireDSChanged();
} catch (Exception em) { } catch (Exception em) {

6
designer_base/src/com/fr/design/actions/help/alphafine/AlphaFineConfigManager.java

@ -1,8 +1,7 @@
package com.fr.design.actions.help.alphafine; package com.fr.design.actions.help.alphafine;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.FRCoreContext; import com.fr.license.function.VT4FR;
import com.fr.general.VT4FR;
import com.fr.stable.OperatingSystem; import com.fr.stable.OperatingSystem;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.xml.XMLPrintWriter; import com.fr.stable.xml.XMLPrintWriter;
@ -75,7 +74,8 @@ public class AlphaFineConfigManager implements XMLable {
} }
public static boolean isALPHALicAvailable() { public static boolean isALPHALicAvailable() {
return FRContext.getCurrentEnv() != null && VT4FR.isLicAvailable(FRCoreContext.getBytes()) && VT4FR.ALPHA_FINE.support();
return FRContext.getCurrentEnv() != null && VT4FR.AlphaFine.support();
} }
@Override @Override

7
designer_base/src/com/fr/design/constants/UIConstants.java

@ -120,6 +120,12 @@ public interface UIConstants {
public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.png"); public static final BufferedImage DRAG_BAR = BaseUtils.readImage("com/fr/design/images/control/bar.png");
public static final BufferedImage DRAG_BAR_LIGHT = BaseUtils.readImage("com/fr/design/images/control/bar-light.png");
public static final BufferedImage ARROW_NORTH = BaseUtils.readImage("com/fr/design/images/control/up_arrow.png");
public static final BufferedImage ARROW_SOUTH = BaseUtils.readImage("com/fr/design/images/control/down_arrow.png");
public static final BufferedImage ARROW_EAST = BaseUtils.readImage("com/fr/design/images/control/east_arrow.png");
public static final BufferedImage ARROW_WEST = BaseUtils.readImage("com/fr/design/images/control/west_arrow.png");
public static final BufferedImage DRAG_BAR_RIGHT = BaseUtils.readImage("com/fr/design/images/control/barm.png"); public static final BufferedImage DRAG_BAR_RIGHT = BaseUtils.readImage("com/fr/design/images/control/barm.png");
public static final BufferedImage DRAG_BAR_LEFT = BaseUtils.readImage("com/fr/design/images/control/barl.png"); public static final BufferedImage DRAG_BAR_LEFT = BaseUtils.readImage("com/fr/design/images/control/barl.png");
public static final BufferedImage DRAG_UP_NORMAL = BaseUtils.readImage("com/fr/design/images/control/upnor.png"); public static final BufferedImage DRAG_UP_NORMAL = BaseUtils.readImage("com/fr/design/images/control/upnor.png");
@ -131,6 +137,7 @@ public interface UIConstants {
public static final BufferedImage DRAG_LEFT_NORMAL = BaseUtils.readImage("com/fr/design/images/control/leftnor.png"); public static final BufferedImage DRAG_LEFT_NORMAL = BaseUtils.readImage("com/fr/design/images/control/leftnor.png");
public static final BufferedImage DRAG_LEFT_PRESS = BaseUtils.readImage("com/fr/design/images/control/leftpre.png"); public static final BufferedImage DRAG_LEFT_PRESS = BaseUtils.readImage("com/fr/design/images/control/leftpre.png");
public static final BufferedImage DRAG_DOT = BaseUtils.readImage("com/fr/design/images/control/dot.png"); public static final BufferedImage DRAG_DOT = BaseUtils.readImage("com/fr/design/images/control/dot.png");
public static final BufferedImage DRAG_LINE = BaseUtils.readImage("com/fr/design/images/control/dot-line.png");
public static final BufferedImage ACCESSIBLE_EDITOR_DOT = BaseUtils.readImage("com/fr/design/images/control/dot.png"); public static final BufferedImage ACCESSIBLE_EDITOR_DOT = BaseUtils.readImage("com/fr/design/images/control/dot.png");
public static final BufferedImage DRAG_DOT_VERTICAL = BaseUtils.readImage("com/fr/design/images/control/dotv.png"); public static final BufferedImage DRAG_DOT_VERTICAL = BaseUtils.readImage("com/fr/design/images/control/dotv.png");
public static final BufferedImage POP_BUTTON_DOWN = BaseUtils.readImage("com/fr/design/images/buttonicon/popdownarrow.png"); public static final BufferedImage POP_BUTTON_DOWN = BaseUtils.readImage("com/fr/design/images/buttonicon/popdownarrow.png");

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

@ -75,7 +75,7 @@ public class TableDataTree extends UserObjectRefreshJTree<TableDataSourceOP> {
this.setSize(dim); this.setSize(dim);
this.setPreferredSize(dim); this.setPreferredSize(dim);
this.setBackgroundNonSelectionColor(UIConstants.TREE_BACKGROUND); this.setBackgroundNonSelectionColor(UIConstants.TREE_BACKGROUND);
this.setForeground(UIConstants.FONT_COLOR); this.setTextSelectionColor(Color.WHITE);
this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE);
return this; return this;
} }

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

@ -159,10 +159,10 @@ public class TableDataTreePane extends BasicTableDataTreePane {
} }
protected void initbuttonGroup() { protected void initbuttonGroup() {
Icon[] iconArray = {BaseUtils.readIcon("/com/fr/design/images/data/datasource.png"), BaseUtils.readIcon("/com/fr/design/images/data/dock/serverdatabase.png")}; // Icon[] iconArray = {BaseUtils.readIcon("/com/fr/design/images/data/datasource.png"), BaseUtils.readIcon("/com/fr/design/images/data/dock/serverdatabase.png")};
final Integer[] modeArray = {TEMPLATE_TABLE_DATA, SERVER_TABLE_DATA}; final Integer[] modeArray = {TEMPLATE_TABLE_DATA, SERVER_TABLE_DATA};
String[] textArray = {Inter.getLocText(new String[]{"Template", "DS-TableData"}), Inter.getLocText("DS-Server_TableData")}; String[] textArray = {Inter.getLocText(new String[]{"Template", "DS-TableData"}), Inter.getLocText("DS-Server_TableData")};
buttonGroup = new UIHeadGroup(iconArray, textArray) { buttonGroup = new UIHeadGroup(textArray) {
public void tabChanged(int index) { public void tabChanged(int index) {
if (op != null) { if (op != null) {
op.setDataMode(modeArray[buttonGroup.getSelectedIndex()]); op.setDataMode(modeArray[buttonGroup.getSelectedIndex()]);

3
designer_base/src/com/fr/design/data/datapane/VerticalChoosePane.java

@ -15,6 +15,7 @@ import javax.swing.*;
import java.awt.*; import java.awt.*;
public class VerticalChoosePane extends ChoosePane implements DesignerBean { public class VerticalChoosePane extends ChoosePane implements DesignerBean {
private static final int RIGHTBORDER = 5;
public VerticalChoosePane(Previewable previewable) { public VerticalChoosePane(Previewable previewable) {
this(previewable, -1); this(previewable, -1);
@ -36,7 +37,7 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean {
JPanel rs = new JPanel(new BorderLayout(0, 0)); JPanel rs = new JPanel(new BorderLayout(0, 0));
rs.add(tableNameComboBox, BorderLayout.CENTER); rs.add(tableNameComboBox, BorderLayout.CENTER);
rs.add(GUICoreUtils.createFlowPane(new Component[]{new RefreshLabel(this), previewLabel}, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST); rs.add(GUICoreUtils.createFlowPane(new Component[]{new RefreshLabel(this), previewLabel}, FlowLayout.LEFT, LayoutConstants.HGAP_LARGE), BorderLayout.EAST);
rs.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, -RIGHTBORDER));
UILabel l1 = new UILabel(Inter.getLocText("FR-Designer_Database"), UILabel.LEFT); UILabel l1 = new UILabel(Inter.getLocText("FR-Designer_Database"), UILabel.LEFT);
UILabel l2 = new UILabel(Inter.getLocText("FR-Designer_Model"), UILabel.LEFT); UILabel l2 = new UILabel(Inter.getLocText("FR-Designer_Model"), UILabel.LEFT);
UILabel l3 = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Database", "FR-Designer_Table"}), UILabel.LEFT); UILabel l3 = new UILabel(Inter.getLocText(new String[]{"FR-Designer_Database", "FR-Designer_Table"}), UILabel.LEFT);

177
designer_base/src/com/fr/design/editor/ValueEditorPaneFactory.java

@ -65,9 +65,10 @@ public class ValueEditorPaneFactory {
* @return 返回公式编辑器面板 * @return 返回公式编辑器面板
*/ */
public static ValueEditorPane createFormulaValueEditorPane() { public static ValueEditorPane createFormulaValueEditorPane() {
return createValueEditorPane(new Editor[]{new FormulaEditor(Inter.getLocText("Parameter-Formula"))}, return createValueEditorPane(new Editor[]{new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"))},
StringUtils.EMPTY, StringUtils.EMPTY); StringUtils.EMPTY, StringUtils.EMPTY);
} }
/** /**
* 创建基本的值编辑器面板 * 创建基本的值编辑器面板
* *
@ -138,11 +139,13 @@ public class ValueEditorPaneFactory {
/** /**
* 创建不带公式面板的pane * 创建不带公式面板的pane
*
* @return 编辑器面板 * @return 编辑器面板
*/ */
public static ValueEditorPane createBasicEditorWithoutFormulaPane(){ public static ValueEditorPane createBasicEditorWithoutFormulaPane() {
return createValueEditorPane(basicEditorsWithoutFormula(), StringUtils.EMPTY, StringUtils.EMPTY); return createValueEditorPane(basicEditorsWithoutFormula(), StringUtils.EMPTY, StringUtils.EMPTY);
} }
/** /**
* 创建NoCRNoColumn * 创建NoCRNoColumn
* *
@ -154,19 +157,22 @@ public class ValueEditorPaneFactory {
/** /**
* 创建数值编辑器 * 创建数值编辑器
*
* @return 值编辑器 * @return 值编辑器
*/ */
public static ValueEditorPane createNumberValueEditorPane(){ public static ValueEditorPane createNumberValueEditorPane() {
return createValueEditorPane(numberEditors(), StringUtils.EMPTY, StringUtils.EMPTY); return createValueEditorPane(numberEditors(), StringUtils.EMPTY, StringUtils.EMPTY);
} }
/** /**
* 创建日期编辑器 * 创建日期编辑器
*
* @return 值编辑器 * @return 值编辑器
*/ */
public static ValueEditorPane createDateValueEditorPane(){ public static ValueEditorPane createDateValueEditorPane() {
return createValueEditorPane(dateEditors(), StringUtils.EMPTY, StringUtils.EMPTY); return createValueEditorPane(dateEditors(), StringUtils.EMPTY, StringUtils.EMPTY);
} }
/** /**
* 根据参数paraUseType 创建编辑器类型. * 根据参数paraUseType 创建编辑器类型.
* *
@ -199,12 +205,12 @@ public class ValueEditorPaneFactory {
* @return 值编辑器 * @return 值编辑器
*/ */
public static Editor<?>[] basicEditors() { public static Editor<?>[] basicEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"));
return new Editor[]{ return new Editor[]{
new TextEditor(), new TextEditor(),
new IntegerEditor(), new SpinnerIntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
new DateEditor(true, Inter.getLocText("Date")), new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(), new BooleanEditor(),
formulaEditor formulaEditor
}; };
@ -216,12 +222,12 @@ public class ValueEditorPaneFactory {
* @return 值编辑器 * @return 值编辑器
*/ */
public static Editor<?>[] formEditors() { public static Editor<?>[] formEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"));
return new Editor[]{ return new Editor[]{
new TextEditor(), new TextEditor(),
new IntegerEditor(), new IntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
new DateEditor(true, Inter.getLocText("Date")), new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(), new BooleanEditor(),
formulaEditor, formulaEditor,
new WidgetNameEditor(Inter.getLocText("Widget")) new WidgetNameEditor(Inter.getLocText("Widget"))
@ -234,48 +240,50 @@ public class ValueEditorPaneFactory {
* @return 值编辑器 * @return 值编辑器
*/ */
public static Editor<?>[] extendedEditors() { public static Editor<?>[] extendedEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"));
return new Editor[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(),
formulaEditor,
new ParameterEditor(),
new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell"))
};
}
/**
* 带单元格组的编辑器
*
* @return 值编辑器
*/
public static Editor<?>[] extendedCellGroupEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"));
return new Editor[]{ return new Editor[]{
new TextEditor(), new TextEditor(),
new IntegerEditor(), new IntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
new DateEditor(true, Inter.getLocText("Date")), new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(), new BooleanEditor(),
formulaEditor, formulaEditor,
new ParameterEditor(), new ParameterEditor(),
new ColumnRowEditor(Inter.getLocText("Cell")) new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")),
new ColumnRowGroupEditor(Inter.getLocText("FR-Designer-Cell_Group"))
}; };
} }
/** /**
* 带单元格组的编辑器 * 只有单元格和单元格组的编辑器
* @return 值编辑器 *
*/ * @return 编辑器b
public static Editor<?>[] extendedCellGroupEditors() { */
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); public static Editor<?>[] cellGroupEditor() {
return new Editor[]{ return new Editor[]{
new TextEditor(), new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")),
new IntegerEditor(), new ColumnRowGroupEditor(Inter.getLocText("FR-Designer-Cell_Group"))
new DoubleEditor(), };
new DateEditor(true, Inter.getLocText("Date")), }
new BooleanEditor(),
formulaEditor,
new ParameterEditor(),
new ColumnRowEditor(Inter.getLocText("Cell")),
new ColumnRowGroupEditor(Inter.getLocText("Cell_Group"))
};
}
/**
* 只有单元格和单元格组的编辑器
* @return 编辑器b
*/
public static Editor<?>[] cellGroupEditor() {
return new Editor[] {
new ColumnRowEditor(Inter.getLocText("Cell")),
new ColumnRowGroupEditor(Inter.getLocText("Cell_Group"))
};
}
/** /**
* URL的一些编辑器. * URL的一些编辑器.
@ -301,8 +309,8 @@ public class ValueEditorPaneFactory {
public static Editor<?>[] dateEditors(String popupName, String textEditorValue) { public static Editor<?>[] dateEditors(String popupName, String textEditorValue) {
return new Editor[]{ return new Editor[]{
new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("None") : popupName), new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("None") : popupName),
new DateEditor(true, Inter.getLocText("Date")), new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new FormulaEditor(Inter.getLocText("Parameter-Formula")) new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"))
}; };
} }
@ -312,17 +320,17 @@ public class ValueEditorPaneFactory {
* @return 值编辑器 * @return 值编辑器
*/ */
public static Editor<?>[] allEditors() { public static Editor<?>[] allEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"));
// formulaEditor.setEnabled(true); // formulaEditor.setEnabled(true);
return new Editor[]{ return new Editor[]{
new TextEditor(), new TextEditor(),
new IntegerEditor(), new IntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
new DateEditor(true, Inter.getLocText("Date")), new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(), new BooleanEditor(),
formulaEditor, formulaEditor,
new ParameterEditor(), new ParameterEditor(),
new ColumnRowEditor(Inter.getLocText("Cell")), new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")),
new ColumnSelectedEditor(), new ColumnSelectedEditor(),
//23328 allEditors中删除控件选项 //23328 allEditors中删除控件选项
// new WidgetNameEditor(Inter.getLocText("Widget")) // new WidgetNameEditor(Inter.getLocText("Widget"))
@ -331,14 +339,15 @@ public class ValueEditorPaneFactory {
/** /**
* 不带公式编辑器 * 不带公式编辑器
*
* @return 编辑器不带公式 * @return 编辑器不带公式
*/ */
public static Editor<?>[] basicEditorsWithoutFormula(){ public static Editor<?>[] basicEditorsWithoutFormula() {
return new Editor[]{ return new Editor[]{
new TextEditor(), new TextEditor(),
new IntegerEditor(), new IntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
new DateEditor(true, Inter.getLocText("Date")), new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(), new BooleanEditor(),
}; };
} }
@ -349,12 +358,12 @@ public class ValueEditorPaneFactory {
* @return 编辑器 * @return 编辑器
*/ */
public static Editor<?>[] noCRnoColumnEditors() { public static Editor<?>[] noCRnoColumnEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"));
return new Editor[]{ return new Editor[]{
new TextEditor(), new TextEditor(),
new IntegerEditor(), new IntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
new DateEditor(true, Inter.getLocText("Date")), new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(), new BooleanEditor(),
formulaEditor, formulaEditor,
new ParameterEditor(), new ParameterEditor(),
@ -363,10 +372,11 @@ public class ValueEditorPaneFactory {
/** /**
* 数值编辑器 * 数值编辑器
* @return 编辑器 *
* @return 编辑器
*/ */
public static Editor<?>[] numberEditors() { public static Editor<?>[] numberEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"));
return new Editor[]{ return new Editor[]{
new IntegerEditor(), new IntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
@ -377,12 +387,13 @@ public class ValueEditorPaneFactory {
/** /**
* 日期编辑器 * 日期编辑器
*
* @return 编辑器 * @return 编辑器
*/ */
public static Editor<?>[] dateEditors() { public static Editor<?>[] dateEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"));
return new Editor[]{ return new Editor[]{
new DateEditor(true, Inter.getLocText("Date")), new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
formulaEditor, formulaEditor,
new ParameterEditor(), new ParameterEditor(),
}; };
@ -394,14 +405,14 @@ public class ValueEditorPaneFactory {
* @return 存储过程的编辑器 * @return 存储过程的编辑器
*/ */
public static Editor<?>[] StoreProcedureEditors() { public static Editor<?>[] StoreProcedureEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"));
formulaEditor.setEnabled(true); formulaEditor.setEnabled(true);
return new Editor[]{ return new Editor[]{
new CursorEditor(), new CursorEditor(),
new TextEditor(), new TextEditor(),
new IntegerEditor(), new IntegerEditor(),
new DoubleEditor(), new DoubleEditor(),
new DateEditor(true, Inter.getLocText("Date")), new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(), new BooleanEditor(),
formulaEditor formulaEditor
}; };
@ -419,10 +430,10 @@ public class ValueEditorPaneFactory {
list.add(new TextEditor()); list.add(new TextEditor());
list.add(new IntegerEditor()); list.add(new IntegerEditor());
list.add(new DoubleEditor()); list.add(new DoubleEditor());
list.add(new DateEditor(true, Inter.getLocText("Date"))); list.add(new DateEditor(true, Inter.getLocText("FR-Designer_Date")));
list.add(new BooleanEditor()); list.add(new BooleanEditor());
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula")); FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"));
formulaEditor.setEnabled(true); formulaEditor.setEnabled(true);
list.add(formulaEditor); list.add(formulaEditor);
@ -436,31 +447,31 @@ public class ValueEditorPaneFactory {
* @return 值编辑器 * @return 值编辑器
*/ */
private static List<Editor> createEditors4Chart(int paraUseType) { private static List<Editor> createEditors4Chart(int paraUseType) {
if(paraUseType == ParameterTableModel.CHART_PIE_USE) { switch (paraUseType) {
return getPieEditor(); case ParameterTableModel.CHART_PIE_USE:
} else if(paraUseType == ParameterTableModel.CHART_MAP_USE) { return getPieEditor();
return getMapEditor(); case ParameterTableModel.CHART_MAP_USE:
} else if(paraUseType == ParameterTableModel.CHART_GIS_USE) { return getMapEditor();
return getGisEditor(); case ParameterTableModel.CHART_GIS_USE:
} else if(paraUseType == ParameterTableModel.CHART__XY_USE) { return getGisEditor();
return getXYEditor(); case ParameterTableModel.CHART__XY_USE:
} else if(paraUseType == ParameterTableModel.CHART_BUBBLE_USE) { return getXYEditor();
return getBubbbleEdtor(); case ParameterTableModel.CHART_BUBBLE_USE:
} else if(paraUseType == ParameterTableModel.CHART_NO_USE) { return getBubbbleEdtor();
return getChartNoUseEditor(); case ParameterTableModel.CHART_NO_USE:
} else if(paraUseType == ParameterTableModel.CHART_METER_USE) { return getChartNoUseEditor();
return getMeterEditor(); case ParameterTableModel.CHART_METER_USE:
} else if(paraUseType == ParameterTableModel.CHART_STOCK_USE) { return getMeterEditor();
return getStockEditor(); case ParameterTableModel.CHART_STOCK_USE:
} else if(paraUseType == ParameterTableModel.CHART_GANTT_USE) { return getStockEditor();
return getGanttEditor(); case ParameterTableModel.CHART_GANTT_USE:
} else if(paraUseType == ParameterTableModel.FORM_ELEMENTCASE_USE) { return getGanttEditor();
return getFormElementCaseEditor(); case ParameterTableModel.FORM_ELEMENTCASE_USE:
} else if(paraUseType == ParameterTableModel.FORM_CHART_USE) { return getFormElementCaseEditor();
return getFormChartEditor(); case ParameterTableModel.FORM_CHART_USE:
} return getFormChartEditor();
else { default:
return getChartEditor(); return getChartEditor();
} }
} }

2
designer_base/src/com/fr/design/editor/editor/IntegerEditor.java

@ -18,7 +18,7 @@ public class IntegerEditor extends NumberEditor<Integer> {
} }
public IntegerEditor(Integer value) { public IntegerEditor(Integer value) {
super(value, Inter.getLocText("Parameter-Integer")); super(value, Inter.getLocText("FR-Designer_Parameter_Integer"));
} }
@Override @Override

65
designer_base/src/com/fr/design/editor/editor/SpinnerIntegerEditor.java

@ -0,0 +1,65 @@
package com.fr.design.editor.editor;
import com.fr.base.Utils;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.general.Inter;
import com.fr.stable.StringUtils;
import java.awt.*;
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
public class SpinnerIntegerEditor extends Editor<Integer> {
private UISpinner spinner;
private String oldValue = StringUtils.EMPTY;
public SpinnerIntegerEditor(){
this.setLayout(FRGUIPaneFactory.createBorderLayout());
spinner = new UISpinner(-Integer.MAX_VALUE, Integer.MAX_VALUE, 1, 0);
this.add(spinner, BorderLayout.CENTER);
this.spinner.addKeyListener(textKeyListener);
this.setName(Inter.getLocText("FR-Designer_Parameter_Integer"));
}
@Override
public Integer getValue() {
return new Integer((int) this.spinner.getValue());
}
@Override
public void setValue(Integer value) {
if (value == null) {
value = new Integer(0);
}
this.spinner.setValue(value.intValue());
oldValue = Utils.objectToString(value);
}
@Override
public boolean accept(Object object) {
return object != null && object instanceof Integer;
}
public String getIconName() {
return "type_int";
}
KeyListener textKeyListener = new KeyAdapter() {
public void keyReleased(KeyEvent evt) {
int code = evt.getKeyCode();
if (code == KeyEvent.VK_ESCAPE) {
spinner.setValue(Double.parseDouble(oldValue));
}
if (code == KeyEvent.VK_ENTER) {
fireEditingStopped();
} else {
fireStateChanged();
}
}
};
}

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

@ -496,7 +496,7 @@ public class MutilTempalteTabPane extends JComponent implements MouseListener, M
*/ */
private int paintSelectedTab(Graphics2D g2d, Icon sheeticon, double templateStartX, String sheetName, Icon closeIcon) { private int paintSelectedTab(Graphics2D g2d, Icon sheeticon, double templateStartX, String sheetName, Icon closeIcon) {
double[] x = {templateStartX, templateStartX, templateStartX + realWidth, templateStartX + realWidth, templateStartX}; double[] x = {templateStartX, templateStartX, templateStartX + realWidth, templateStartX + realWidth, templateStartX};
double[] y = {-1, getHeight(), getHeight(), -1, -1}; double[] y = {1, getHeight() + 1, getHeight() + 1, 1, 1};
RoundRectangle2D.Double rect1 = new RoundRectangle2D.Double(templateStartX, 1, this.getWidth(), this.getHeight(), 7, 7); RoundRectangle2D.Double rect1 = new RoundRectangle2D.Double(templateStartX, 1, this.getWidth(), this.getHeight(), 7, 7);
g2d.setPaint(new GradientPaint(1, 1, UIConstants.SELECT_TAB, 1, getHeight() - 1, UIConstants.SELECT_TAB)); g2d.setPaint(new GradientPaint(1, 1, UIConstants.SELECT_TAB, 1, getHeight() - 1, UIConstants.SELECT_TAB));
//选了30度和60度的特殊角度的x,y作为经过的两个点的坐标 //选了30度和60度的特殊角度的x,y作为经过的两个点的坐标

8
designer_base/src/com/fr/design/foldablepane/HeaderPane.java

@ -22,10 +22,15 @@ public class HeaderPane extends JPanel {
private int headHeight; private int headHeight;
private Color bgColor; private Color bgColor;
private boolean isShow; private boolean isShow;
private boolean isPressed = false;
private String title; private String title;
private Image image; private Image image;
private int fontSize; private int fontSize;
public void setPressed(boolean pressed) {
this.isPressed = pressed;
}
public void setShow(boolean isShow) { public void setShow(boolean isShow) {
this.isShow = isShow; this.isShow = isShow;
} }
@ -60,7 +65,8 @@ public class HeaderPane extends JPanel {
private BufferedImage createPanelImage() { private BufferedImage createPanelImage() {
BufferedImage panelImage = new BufferedImage(getWidth(), headHeight, BufferedImage.TYPE_INT_ARGB); BufferedImage panelImage = new BufferedImage(getWidth(), headHeight, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = panelImage.createGraphics(); Graphics2D g2d = panelImage.createGraphics();
g2d.setColor(UIConstants.COMPONENT_BACKGROUND_COLOR);
g2d.setColor(isPressed ? UIConstants.POPUP_TITLE_BACKGROUND : UIConstants.COMPONENT_BACKGROUND_COLOR);
headWidth = this.getWidth(); headWidth = this.getWidth();
g2d.fillRect(0, 0, headWidth, headHeight); g2d.fillRect(0, 0, headWidth, headHeight);
g2d.setFont(new Font("SimSun", 0, fontSize)); g2d.setFont(new Font("SimSun", 0, fontSize));

17
designer_base/src/com/fr/design/foldablepane/UIExpandablePane.java

@ -58,7 +58,8 @@ public class UIExpandablePane extends JPanel {
} }
class PanelAction extends MouseAdapter { class PanelAction extends MouseAdapter {
public void mousePressed(MouseEvent e) { @Override
public void mouseClicked(MouseEvent e) {
HeaderPane hp = (HeaderPane) e.getSource(); HeaderPane hp = (HeaderPane) e.getSource();
if (contentPanel.isShowing()) { if (contentPanel.isShowing()) {
contentPanel.setVisible(false); contentPanel.setVisible(false);
@ -67,9 +68,23 @@ public class UIExpandablePane extends JPanel {
contentPanel.setVisible(true); contentPanel.setVisible(true);
hp.setShow(true); hp.setShow(true);
} }
hp.setPressed(false);
hp.getParent().validate(); hp.getParent().validate();
hp.getParent().repaint(); hp.getParent().repaint();
} }
public void mousePressed(MouseEvent e) {
HeaderPane hp = (HeaderPane) e.getSource();
hp.setPressed(true);
hp.getParent().repaint();
}
@Override
public void mouseExited(MouseEvent e) {
HeaderPane hp = (HeaderPane) e.getSource();
hp.setPressed(false);
hp.getParent().repaint();
}
} }

2
designer_base/src/com/fr/design/gui/controlpane/UIControlPane.java

@ -302,6 +302,8 @@ public abstract class UIControlPane extends BasicPane implements UnrepeatedNameH
ShortCut addItem = addItemShortCut().getShortCut(); ShortCut addItem = addItemShortCut().getShortCut();
addItem.intoJToolBar(topToolBar); addItem.intoJToolBar(topToolBar);
topToolBar.validate(); topToolBar.validate();
this.controlUpdatePane = createControlUpdatePane();//REPORT-4841 刷新一下编辑面板
cardPane.add(controlUpdatePane, "EDIT");
this.repaint(); this.repaint();
} }

14
designer_base/src/com/fr/design/gui/ibutton/UIToggleButton.java

@ -48,7 +48,7 @@ public class UIToggleButton extends UIButton implements GlobalNameObserver{
} }
/** /**
* 需要反白的按钮接口 * 需要反白的按钮接口(组合按钮情况-UIButtonGroup)
* support icons[normalIcon, selectedIcon] * support icons[normalIcon, selectedIcon]
* @param icons * @param icons
*/ */
@ -67,6 +67,18 @@ public class UIToggleButton extends UIButton implements GlobalNameObserver{
addMouseListener(getMouseListener()); addMouseListener(getMouseListener());
} }
/**
* 需要反白的按钮接口(单个按钮情况)-再次点击取消选中状态
* support icons[normalIcon, selectedIcon]
* @param icons
*/
public UIToggleButton(Icon[] icons, boolean needRelease) {
super(icons[0], null, icons[1]);
setSelectedIcon(icons[1]);
setExtraPainted(true);
addMouseListener(getMouseListener());
}
public void setGlobalName(String name){ public void setGlobalName(String name){
toggleButtonName = name ; toggleButtonName = name ;
} }

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

@ -397,8 +397,8 @@ public class UIResizableContainer extends JPanel {
Image upButton = (upModel == UIConstants.MODEL_NORMAL ? UIConstants.DRAG_UP_NORMAL : UIConstants.DRAG_UP_PRESS); Image upButton = (upModel == UIConstants.MODEL_NORMAL ? UIConstants.DRAG_UP_NORMAL : UIConstants.DRAG_UP_PRESS);
Image downButton = (downModel == UIConstants.MODEL_NORMAL ? UIConstants.DRAG_DOWN_NORMAL : UIConstants.DRAG_DOWN_PRESS); Image downButton = (downModel == UIConstants.MODEL_NORMAL ? UIConstants.DRAG_DOWN_NORMAL : UIConstants.DRAG_DOWN_PRESS);
g.drawImage(UIConstants.DRAG_BAR, 0, 0, getWidth(), getHeight(), null); g.drawImage(UIConstants.DRAG_BAR_LIGHT, 0, 0, getWidth(), getHeight(), null);
g.drawImage(UIConstants.DRAG_DOT, (getWidth() - toolPaneHeight) / 2, 3, toolPaneHeight, 5, null); g.drawImage(UIConstants.DRAG_LINE, (getWidth() - toolPaneHeight) / 2, 3, toolPaneHeight, 5, null);
g.drawImage(upButton, ARROW_MARGIN, 3, toolPaneHeight, 5, null); g.drawImage(upButton, ARROW_MARGIN, 3, toolPaneHeight, 5, null);
g.drawImage(downButton, getWidth() - toolPaneHeight - ARROW_MARGIN, 3, toolPaneHeight, 5, null); g.drawImage(downButton, getWidth() - toolPaneHeight - ARROW_MARGIN, 3, toolPaneHeight, 5, null);
} }
@ -488,7 +488,7 @@ public class UIResizableContainer extends JPanel {
public void paint(Graphics g) { public void paint(Graphics g) {
Image button; Image button;
if (direction == Constants.RIGHT) { if (direction == Constants.RIGHT) {
g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null); g.drawImage(UIConstants.DRAG_BAR_LIGHT, 0, 0, toolPaneHeight, getHeight(), null);
if (containerWidth == toolPaneHeight) { if (containerWidth == toolPaneHeight) {
if (model == UIConstants.MODEL_NORMAL) { if (model == UIConstants.MODEL_NORMAL) {
button = UIConstants.DRAG_RIGHT_NORMAL; button = UIConstants.DRAG_RIGHT_NORMAL;
@ -504,7 +504,7 @@ public class UIResizableContainer extends JPanel {
} }
g.drawImage(button, 3, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null); g.drawImage(button, 3, ARROW_MARGIN_VERTICAL, 5, toolPaneHeight, null);
} else { } else {
g.drawImage(UIConstants.DRAG_BAR, 0, 0, toolPaneHeight, getHeight(), null); g.drawImage(UIConstants.DRAG_BAR_LIGHT, 0, 0, toolPaneHeight, getHeight(), null);
if (containerWidth == toolPaneHeight) { if (containerWidth == toolPaneHeight) {
if (model == UIConstants.MODEL_NORMAL) { if (model == UIConstants.MODEL_NORMAL) {
button = UIConstants.DRAG_LEFT_NORMAL; button = UIConstants.DRAG_LEFT_NORMAL;

5
designer_base/src/com/fr/design/gui/itree/filetree/EnvFileTree.java

@ -1,7 +1,6 @@
package com.fr.design.gui.itree.filetree; package com.fr.design.gui.itree.filetree;
import java.awt.Component; import java.awt.*;
import java.awt.Dimension;
import java.io.File; import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@ -107,7 +106,7 @@ public class EnvFileTree extends RefreshableJTree {
dim.height += 2; dim.height += 2;
this.setPreferredSize(dim); this.setPreferredSize(dim);
this.setBackgroundNonSelectionColor(UIConstants.TREE_BACKGROUND); this.setBackgroundNonSelectionColor(UIConstants.TREE_BACKGROUND);
this.setForeground(UIConstants.FONT_COLOR); this.setTextSelectionColor(Color.WHITE);
this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE); this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE);
return this; return this;
} }

14
designer_base/src/com/fr/design/gui/style/AlignmentPane.java

@ -80,11 +80,15 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
imageLayoutComboBox = new UIComboBox(LAYOUT); imageLayoutComboBox = new UIComboBox(LAYOUT);
initTextRotationCombox(); initTextRotationCombox();
Icon[] hAlignmentIconArray = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), Icon[][] hAlignmentIconArray = {{BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_left_normal_white.png")},
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal_white.png")},
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"), {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal_white.png")},
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png"), {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png")},
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png")}; {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png")}};
// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_center_normal.png"),
// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png"),
// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_s_normal.png"),
// BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/defaultAlignment.png")};
Integer[] hAlignment = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT, Integer.valueOf(Constants.DISTRIBUTED), Constants.NULL}; Integer[] hAlignment = new Integer[]{Constants.LEFT, Constants.CENTER, Constants.RIGHT, Integer.valueOf(Constants.DISTRIBUTED), Constants.NULL};
hAlignmentPane = new UIButtonGroup<Integer>(hAlignmentIconArray, hAlignment); hAlignmentPane = new UIButtonGroup<Integer>(hAlignmentIconArray, hAlignment);
hAlignmentPane.setAllToolTips(new String[]{Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Left"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Center"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Right"), hAlignmentPane.setAllToolTips(new String[]{Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Left"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Center"), Inter.getLocText("FR-Designer-StyleAlignment_Tooltips_Right"),

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 B

After

Width:  |  Height:  |  Size: 440 B

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 B

After

Width:  |  Height:  |  Size: 317 B

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 468 B

After

Width:  |  Height:  |  Size: 522 B

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

After

Width:  |  Height:  |  Size: 299 B

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 509 B

After

Width:  |  Height:  |  Size: 395 B

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 317 B

BIN
designer_base/src/com/fr/design/images/chart/ChartType.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 138 B

BIN
designer_base/src/com/fr/design/images/control/bar-light.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

BIN
designer_base/src/com/fr/design/images/control/dot-line.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 100 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

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

@ -856,7 +856,7 @@ RP_Authority_Edit=Authority
Warnning=Warning Warnning=Warning
RoleName_Can_Not_Be_Null=RoleName_Can_Not_Be_Null RoleName_Can_Not_Be_Null=RoleName_Can_Not_Be_Null
Application=Applications Application=Applications
Formula_Dictionary_Display_Examples_Html=<html>the real value is \ FR-Designer-Formula_Dictionary_Display_Examples_Html=<html>the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$, <br>the result is 1, 2, ..., 100 and -1, -2, ..., -100.<br></html>
ECP-error_pwd= ECP-error_pwd=
FR-Hyperlink_ChartHyperlink= FR-Hyperlink_ChartHyperlink=
M_Edit-FormatBrush=Format Painter M_Edit-FormatBrush=Format Painter
@ -1240,6 +1240,7 @@ Rose_Red=Rose Red
StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=The value of rotation must between -90 and 90 degrees StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=The value of rotation must between -90 and 90 degrees
HF-Move_Left=To the left HF-Move_Left=To the left
Cell_Group=Cell Group Cell_Group=Cell Group
FR-Designer-Cell_Group=Cell Group
Week=Week Week=Week
PageSetup-Orientation=Orientation PageSetup-Orientation=Orientation
M-Open_Recent=Open Recent M-Open_Recent=Open Recent
@ -1425,7 +1426,7 @@ Out_Thick_Border_Line=Out Thick Border Line
FR-App-File_Lookup_range= FR-App-File_Lookup_range=
ReportColumns-Columns_to=Columns to ReportColumns-Columns_to=Columns to
Transparent=Transparent Transparent=Transparent
Parameter-Integer=Integer FR-Designer_Parameter_Integer=Integer
PDF-Print_Setting=PDF Print Setting PDF-Print_Setting=PDF Print Setting
Server-Embedded_Server=Embedded Server Server-Embedded_Server=Embedded Server
M_Server-Server_Config_Manager=Server Configuration Manager M_Server-Server_Config_Manager=Server Configuration Manager

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

@ -859,7 +859,7 @@ RP_Authority_Edit=Permission
Warnning=Warning Warnning=Warning
RoleName_Can_Not_Be_Null=Role name can not be null or duplicate RoleName_Can_Not_Be_Null=Role name can not be null or duplicate
Application=Applications Application=Applications
Formula_Dictionary_Display_Examples_Html=<html>the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$, <br>the result is 1, 2, ..., 100 and -1, -2, ..., -100.<br></html> FR-Designer-Formula_Dictionary_Display_Examples_Html=<html>Tip: the real value is \=range(100), the real value($$$)'s display value is \=0 - $$$, <br>the result is 1, 2, ..., 100 and -1, -2, ..., -100.<br></html>
ECP-error_pwd=Password Error ECP-error_pwd=Password Error
FR-Hyperlink_ChartHyperlink=Chart Hyperlink FR-Hyperlink_ChartHyperlink=Chart Hyperlink
M_Edit-FormatBrush=Format Painter M_Edit-FormatBrush=Format Painter
@ -1242,6 +1242,7 @@ Rose_Red=Rose Red
StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=Rotation value must between -90 and 90 degrees StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=Rotation value must between -90 and 90 degrees
HF-Move_Left=Left shift HF-Move_Left=Left shift
Cell_Group=Cell Group Cell_Group=Cell Group
FR-Designer-Cell_Group=Cell Group
Week=Week Week=Week
PageSetup-Orientation=Orientation PageSetup-Orientation=Orientation
M-Open_Recent=Open Recent M-Open_Recent=Open Recent
@ -1427,7 +1428,7 @@ Out_Thick_Border_Line=Thick Border
FR-App-File_Lookup_range=Search range FR-App-File_Lookup_range=Search range
ReportColumns-Columns_to=Split To ReportColumns-Columns_to=Split To
Transparent=Transparent Transparent=Transparent
Parameter-Integer=Integer FR-Designer_Parameter_Integer=Integer
PDF-Print_Setting=PDF Print Setting PDF-Print_Setting=PDF Print Setting
Server-Embedded_Server=Built-in server Server-Embedded_Server=Built-in server
M_Server-Server_Config_Manager=Server Configuration Manager M_Server-Server_Config_Manager=Server Configuration Manager

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

@ -857,7 +857,7 @@ RP_Authority_Edit=\u6A29\u9650\u7DE8\u96C6
Warnning=\u30EA\u30DE\u30A4\u30F3\u30C9 Warnning=\u30EA\u30DE\u30A4\u30F3\u30C9
RoleName_Can_Not_Be_Null=\u5F79\u5272\u540D\u306F\u7A7A\u6B04\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u305A\u3001\u91CD\u8907\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u305B\u3093 RoleName_Can_Not_Be_Null=\u5F79\u5272\u540D\u306F\u7A7A\u6B04\u306B\u3059\u308B\u3053\u3068\u304C\u3067\u304D\u305A\u3001\u91CD\u8907\u3059\u308B\u3053\u3068\u3082\u3067\u304D\u307E\u305B\u3093
Application=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3 Application=\u30A2\u30D7\u30EA\u30B1\u30FC\u30B7\u30E7\u30F3
Formula_Dictionary_Display_Examples_Html=<html>\u5B9F\u969B\u306E\u5024\u304C \=range(100)\u306E\u3068\u304D\u3001\u5B9F\u969B\u306E\u5024($$$)\u306E\u8868\u793A\u3059\u308B\u5024\u306E\u6570\u5F0F\u304C \= 0 - $$$\u306E\u3068\u304D\u3001\n\u6700\u7D42\u7684\u306A\u5B9F\u969B\u306E\u5024\u306F\u30011, 2, ..., 100\u3067\u3042\u308A\u3001\n\u305D\u306E\u8868\u793A\u7D50\u679C\u306F-1, -2, ..., -100\u3068\u306A\u308B\u3002<br></html> FR-Designer-Formula_Dictionary_Display_Examples_Html=<html>\u30D2\u30F3\u30C8: \u5B9F\u969B\u306E\u5024\u304C \=range(100)\u306E\u3068\u304D\u3001\u5B9F\u969B\u306E\u5024($$$)\u306E\u8868\u793A\u3059\u308B\u5024\u306E\u6570\u5F0F\u304C \= 0 - $$$\u306E\u3068\u304D\u3001\n\u6700\u7D42\u7684\u306A\u5B9F\u969B\u306E\u5024\u306F\u30011, 2, ..., 100\u3067\u3042\u308A\u3001\n\u305D\u306E\u8868\u793A\u7D50\u679C\u306F-1, -2, ..., -100\u3068\u306A\u308B\u3002<br></html>
ECP-error_pwd=\u30D1\u30B9\u30EF\u30FC\u30C9\u30A8\u30E9\u30FC ECP-error_pwd=\u30D1\u30B9\u30EF\u30FC\u30C9\u30A8\u30E9\u30FC
FR-Hyperlink_ChartHyperlink=\u30B0\u30E9\u30D5\u30CF\u30A4\u30D1\u30FC\u30EA\u30F3\u30AF FR-Hyperlink_ChartHyperlink=\u30B0\u30E9\u30D5\u30CF\u30A4\u30D1\u30FC\u30EA\u30F3\u30AF
M_Edit-FormatBrush=\u66F8\u5F0F\u30D6\u30E9\u30B7(B) M_Edit-FormatBrush=\u66F8\u5F0F\u30D6\u30E9\u30B7(B)
@ -1240,6 +1240,7 @@ Rose_Red=\u30ED\u30FC\u30BA\u30EC\u30C3\u30C9
StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=\u56DE\u8EE2\u5024\u306F-90\u304B\u308990\u5EA6 StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=\u56DE\u8EE2\u5024\u306F-90\u304B\u308990\u5EA6
HF-Move_Left=\u5DE6\u3078\u79FB\u52D5\u3059\u308B HF-Move_Left=\u5DE6\u3078\u79FB\u52D5\u3059\u308B
Cell_Group=\u30BB\u30EB\u7D44 Cell_Group=\u30BB\u30EB\u7D44
FR-Designer-Cell_Group=\u30BB\u30EB\u7D44
Week=\u5468 Week=\u5468
PageSetup-Orientation=\u65B9\u5411 PageSetup-Orientation=\u65B9\u5411
M-Open_Recent=\u6700\u8FD1\u958B\u3044\u305F\u3082\u306E M-Open_Recent=\u6700\u8FD1\u958B\u3044\u305F\u3082\u306E
@ -1427,7 +1428,7 @@ Out_Thick_Border_Line=\u30DC\u30C3\u30AF\u30B9\u30D5\u30EC\u30FC\u30E0\u30E9\u30
FR-App-File_Lookup_range=\u691C\u7D22\u7BC4\u56F2 FR-App-File_Lookup_range=\u691C\u7D22\u7BC4\u56F2
ReportColumns-Columns_to=\u306E\u3088\u3046\u306B\u6539\u5217\u3059\u308B ReportColumns-Columns_to=\u306E\u3088\u3046\u306B\u6539\u5217\u3059\u308B
Transparent=\u900F\u660E Transparent=\u900F\u660E
Parameter-Integer=\u6574\u6570\u578B FR-Designer_Parameter_Integer=\u6574\u6570\u578B
PDF-Print_Setting=PDF\u5370\u5237\u8A2D\u5B9A PDF-Print_Setting=PDF\u5370\u5237\u8A2D\u5B9A
Server-Embedded_Server=\u5185\u8535\u30B5\u30FC\u30D0\u30FC Server-Embedded_Server=\u5185\u8535\u30B5\u30FC\u30D0\u30FC
M_Server-Server_Config_Manager=\u30B5\u30FC\u30D0\u30FC\u914D\u7F6E(S) M_Server-Server_Config_Manager=\u30B5\u30FC\u30D0\u30FC\u914D\u7F6E(S)

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

@ -857,7 +857,7 @@ RP_Authority_Edit=\uAD8C\uD55C\uD3B8\uC9D1
Warnning=\uC54C\uB9BC Warnning=\uC54C\uB9BC
RoleName_Can_Not_Be_Null=\uC5ED\uD560\uC774\uB984\uC740\uBE44\uC5B4\uC788\uAC70\uB098\uC911\uBCF5\uB418\uC5B4\uC11C\uB294\uC548\uB429\uB2C8\uB2E4. RoleName_Can_Not_Be_Null=\uC5ED\uD560\uC774\uB984\uC740\uBE44\uC5B4\uC788\uAC70\uB098\uC911\uBCF5\uB418\uC5B4\uC11C\uB294\uC548\uB429\uB2C8\uB2E4.
Application=\uC560\uD50C\uB9AC\uCF00\uC774\uC158 Application=\uC560\uD50C\uB9AC\uCF00\uC774\uC158
Formula_Dictionary_Display_Examples_Html=<html>\uC2E4\uC81C\uAC12\uBC94\uC704:\=0 - $$$\uFF0C<br>\uCD5C\uC885\uACB0\uACFC\uC758\uC2E4\uC81C\uAC12: 1, 2, ..., 100,\uD45C\uC2DC\uAC12: -1, -2, ... , -100. <br>&nbsp;</html> FR-Designer-Formula_Dictionary_Display_Examples_Html=<html>\uD301: \uC2E4\uC81C\uAC12\uBC94\uC704:\=0 - $$$\uFF0C<br>\uCD5C\uC885\uACB0\uACFC\uC758\uC2E4\uC81C\uAC12: 1, 2, ..., 100,\uD45C\uC2DC\uAC12: -1, -2, ... , -100. <br>&nbsp;</html>
ECP-error_pwd=\uBE44\uBC00\uBC88\uD638\uC785\uB825\uC624\uB958 ECP-error_pwd=\uBE44\uBC00\uBC88\uD638\uC785\uB825\uC624\uB958
FR-Hyperlink_ChartHyperlink=\uCC28\uD2B8\uD558\uC774\uD37C\uB9C1\uD06C FR-Hyperlink_ChartHyperlink=\uCC28\uD2B8\uD558\uC774\uD37C\uB9C1\uD06C
M_Edit-FormatBrush=\uC11C\uC2DD\uD504\uB9B0\uD2B8(B) M_Edit-FormatBrush=\uC11C\uC2DD\uD504\uB9B0\uD2B8(B)
@ -1241,6 +1241,7 @@ Rose_Red=\uB85C\uC988\uBE68\uAC15
StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=\uD68C\uC804\uAC12\uC740-90\uB3C4\uC5D0\uC11C 90\uB3C4\uAE4C\uC9C0 StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=\uD68C\uC804\uAC12\uC740-90\uB3C4\uC5D0\uC11C 90\uB3C4\uAE4C\uC9C0
HF-Move_Left=\uC67C\uCABD\uC73C\uB85C\uC774\uB3D9 HF-Move_Left=\uC67C\uCABD\uC73C\uB85C\uC774\uB3D9
Cell_Group=\uC140\uADF8\uB8F9 Cell_Group=\uC140\uADF8\uB8F9
FR-Designer-Cell_Group=\uC140\uADF8\uB8F9
Week=\uC8FC Week=\uC8FC
PageSetup-Orientation=\uBC29\uD5A5 PageSetup-Orientation=\uBC29\uD5A5
M-Open_Recent=\uCD5C\uADFC\uC5F4\uC5B4\uBCF8 M-Open_Recent=\uCD5C\uADFC\uC5F4\uC5B4\uBCF8
@ -1426,7 +1427,7 @@ Out_Thick_Border_Line=\uAD75\uC740\uBC14\uAE65\uCABD\uD14C\uB450\uB9AC\uC120
FR-App-File_Lookup_range=\uBC94\uC704\uAC80\uC0C9 FR-App-File_Lookup_range=\uBC94\uC704\uAC80\uC0C9
ReportColumns-Columns_to=\uC140\uB098\uB204\uAE30 ReportColumns-Columns_to=\uC140\uB098\uB204\uAE30
Transparent=\uD22C\uBA85 Transparent=\uD22C\uBA85
Parameter-Integer=\uC804\uCCB4\uD0C0\uC785 FR-Designer_Parameter_Integer=\uC804\uCCB4\uD0C0\uC785
PDF-Print_Setting=PDF\uC778\uC1C4\uC124\uC815 PDF-Print_Setting=PDF\uC778\uC1C4\uC124\uC815
Server-Embedded_Server=\uB0B4\uC7A5\uB41C\uC11C\uBC84 Server-Embedded_Server=\uB0B4\uC7A5\uB41C\uC11C\uBC84
M_Server-Server_Config_Manager=\uC11C\uBC84\uAD6C\uC131 M_Server-Server_Config_Manager=\uC11C\uBC84\uAD6C\uC131

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

@ -860,7 +860,7 @@ RP_Authority_Edit=\u6743\u9650\u7F16\u8F91
Warnning=\u63D0\u9192 Warnning=\u63D0\u9192
RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8BB8\u4E3A\u7A7A\u4E14\u4E0D\u80FD\u91CD\u590D RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8BB8\u4E3A\u7A7A\u4E14\u4E0D\u80FD\u91CD\u590D
Application=\u5E94\u7528\u7A0B\u5E8F Application=\u5E94\u7528\u7A0B\u5E8F
Formula_Dictionary_Display_Examples_Html=<html>\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \=range(100),\u5BF9\u5B9E\u9645\u503C\u8303\u56F4\u5185\u7684\u6BCF\u4E2A$$$\u7684\u663E\u793A\u516C\u5F0F\u4E3A \=0 - $$$\uFF0C<br>\u5219\u6700\u7EC8\u7684\u7ED3\u679C\u5B9E\u9645\u503C\u4E3A1, 2, ..., 100,\u663E\u793A\u503C\u4E3A-1, -2, ... , -100\u3002<br>&nbsp;</html> FR-Designer-Formula_Dictionary_Display_Examples_Html=<html>\u63D0\u793A\uFF1A\u5B9E\u9645\u503C\u8303\u56F4\u4E3A \=range(100),\u5BF9\u5B9E\u9645\u503C\u8303\u56F4\u5185\u7684\u6BCF\u4E2A$$$\u7684\u663E\u793A\u516C\u5F0F\u4E3A \=0 - $$$\uFF0C\u5219\u6700\u7EC8\u7684\u7ED3\u679C\u5B9E\u9645\u503C\u4E3A1, 2, ..., 100,\u663E\u793A\u503C\u4E3A-1, -2, ... , -100\u3002<br>&nbsp;</html>
ECP-error_pwd=\u5BC6\u7801\u9519\u8BEF ECP-error_pwd=\u5BC6\u7801\u9519\u8BEF
FR-Hyperlink_ChartHyperlink=\u56FE\u8868\u8D85\u94FE FR-Hyperlink_ChartHyperlink=\u56FE\u8868\u8D85\u94FE
M_Edit-FormatBrush=\u683C\u5F0F\u5237(B) M_Edit-FormatBrush=\u683C\u5F0F\u5237(B)
@ -1243,6 +1243,7 @@ Rose_Red=\u73AB\u7470\u7EA2
StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=\u65CB\u8F6C\u503C\u5FC5\u987B\u5728\u8D1F90\u5EA6\u523090\u5EA6 StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=\u65CB\u8F6C\u503C\u5FC5\u987B\u5728\u8D1F90\u5EA6\u523090\u5EA6
HF-Move_Left=\u5DE6\u79FB HF-Move_Left=\u5DE6\u79FB
Cell_Group=\u5355\u5143\u683C\u7EC4 Cell_Group=\u5355\u5143\u683C\u7EC4
FR-Designer-Cell_Group=\u5355\u5143\u683C\u7EC4
Week=\u5468 Week=\u5468
PageSetup-Orientation=\u65B9\u5411 PageSetup-Orientation=\u65B9\u5411
M-Open_Recent=\u6700\u8FD1\u6253\u5F00\u7684 M-Open_Recent=\u6700\u8FD1\u6253\u5F00\u7684
@ -1428,7 +1429,7 @@ Out_Thick_Border_Line=\u7C97\u5323\u6846\u7EBF
FR-App-File_Lookup_range=\u67E5\u627E\u8303\u56F4 FR-App-File_Lookup_range=\u67E5\u627E\u8303\u56F4
ReportColumns-Columns_to=\u5206\u680F\u6210 ReportColumns-Columns_to=\u5206\u680F\u6210
Transparent=\u900F\u660E Transparent=\u900F\u660E
Parameter-Integer=\u6574\u578B FR-Designer_Parameter_Integer=\u6574\u578B
PDF-Print_Setting=PDF\u6253\u5370\u8BBE\u7F6E PDF-Print_Setting=PDF\u6253\u5370\u8BBE\u7F6E
Server-Embedded_Server=\u5167\u7F6E\u7684\u670D\u52A1\u5668 Server-Embedded_Server=\u5167\u7F6E\u7684\u670D\u52A1\u5668
M_Server-Server_Config_Manager=\u670D\u52A1\u5668\u914D\u7F6E M_Server-Server_Config_Manager=\u670D\u52A1\u5668\u914D\u7F6E

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

@ -859,7 +859,7 @@ RP_Authority_Edit=\u6B0A\u9650\u7DE8\u8F2F
Warnning=\u63D0\u9192 Warnning=\u63D0\u9192
RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8A31\u70BA\u7A7A\u4E14\u4E0D\u80FD\u91CD\u8907 RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8A31\u70BA\u7A7A\u4E14\u4E0D\u80FD\u91CD\u8907
Application=\u61C9\u7528\u7A0B\u5F0F Application=\u61C9\u7528\u7A0B\u5F0F
Formula_Dictionary_Display_Examples_Html=<html>\u5BE6\u969B\u503C\u7BC4\u570D\u70BA \=range(100),\u5C0D\u5BE6\u969B\u503C\u7BC4\u570D\u5167\u7684\u6BCF\u500B$$$\u7684\u986F\u793A\u516C\u5F0F\u70BA \=0 - $$$\uFF0C<br>\u5247\u6700\u7D42\u7684\u7D50\u679C\u5BE6\u969B\u503C\u70BA1, 2, ..., 100,\u986F\u793A\u503C\u70BA-1, -2, ... , -100\u3002<br>&nbsp;</html> FR-Designer-Formula_Dictionary_Display_Examples_Html=<html>\u63D0\u793A\uFF1A\u5BE6\u969B\u503C\u7BC4\u570D\u70BA \=range(100),\u5C0D\u5BE6\u969B\u503C\u7BC4\u570D\u5167\u7684\u6BCF\u500B$$$\u7684\u986F\u793A\u516C\u5F0F\u70BA \=0 - $$$\uFF0C<br>\u5247\u6700\u7D42\u7684\u7D50\u679C\u5BE6\u969B\u503C\u70BA1, 2, ..., 100,\u986F\u793A\u503C\u70BA-1, -2, ... , -100\u3002<br>&nbsp;</html>
ECP-error_pwd=\u5BC6\u78BC\u932F\u8AA4 ECP-error_pwd=\u5BC6\u78BC\u932F\u8AA4
FR-Hyperlink_ChartHyperlink=\u5716\u8868\u8D85\u93C8 FR-Hyperlink_ChartHyperlink=\u5716\u8868\u8D85\u93C8
M_Edit-FormatBrush=\u8907\u88FD\u683C\u5F0F(B) M_Edit-FormatBrush=\u8907\u88FD\u683C\u5F0F(B)
@ -1242,6 +1242,7 @@ Rose_Red=\u73AB\u7470\u7D05
StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=\u65CB\u8F49\u503C\u5FC5\u9808\u5728\u8CA090\u5EA6\u523090\u5EA6 StyleAlignment-The_value_of_rotation_must_between_-90_and_90_degrees=\u65CB\u8F49\u503C\u5FC5\u9808\u5728\u8CA090\u5EA6\u523090\u5EA6
HF-Move_Left=\u5DE6\u79FB HF-Move_Left=\u5DE6\u79FB
Cell_Group=\u5132\u5B58\u683C\u7D44 Cell_Group=\u5132\u5B58\u683C\u7D44
FR-Designer-Cell_Group=\u5132\u5B58\u683C\u7D44
Week=\u5468 Week=\u5468
PageSetup-Orientation=\u65B9\u5411 PageSetup-Orientation=\u65B9\u5411
M-Open_Recent=\u958B\u555F\u6700\u8FD1\u4F7F\u7528\u6A94 M-Open_Recent=\u958B\u555F\u6700\u8FD1\u4F7F\u7528\u6A94
@ -1426,7 +1427,7 @@ Out_Thick_Border_Line=\u7C97\u5323\u6846\u7DDA
FR-App-File_Lookup_range=\u67E5\u627E\u7BC4\u570D FR-App-File_Lookup_range=\u67E5\u627E\u7BC4\u570D
ReportColumns-Columns_to=\u5206\u6B04\u6210 ReportColumns-Columns_to=\u5206\u6B04\u6210
Transparent=\u900F\u660E Transparent=\u900F\u660E
Parameter-Integer=\u6574\u578B FR-Designer_Parameter_Integer=\u6574\u578B
PDF-Print_Setting=PDF\u5217\u5370\u8A2D\u5B9A PDF-Print_Setting=PDF\u5217\u5370\u8A2D\u5B9A
Server-Embedded_Server=\u5167\u7F6E\u7684\u4F3A\u670D\u5668 Server-Embedded_Server=\u5167\u7F6E\u7684\u4F3A\u670D\u5668
M_Server-Server_Config_Manager=\u4F3A\u670D\u5668\u914D\u7F6E(S) M_Server-Server_Config_Manager=\u4F3A\u670D\u5668\u914D\u7F6E(S)

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

@ -10,7 +10,6 @@ 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;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.help.alphafine.AlphaFineConfigManager;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.data.datapane.TableDataTreePane;
@ -27,7 +26,6 @@ import com.fr.design.gui.imenu.UIMenuHighLight;
import com.fr.design.gui.iscrollbar.UIScrollBar; import com.fr.design.gui.iscrollbar.UIScrollBar;
import com.fr.design.gui.itoolbar.UIToolbar; import com.fr.design.gui.itoolbar.UIToolbar;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.hold.DefaultTitlePlace;
import com.fr.design.mainframe.loghandler.LogMessageBar; import com.fr.design.mainframe.loghandler.LogMessageBar;
import com.fr.design.mainframe.toolbar.ToolBarMenuDock; import com.fr.design.mainframe.toolbar.ToolBarMenuDock;
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
@ -42,6 +40,7 @@ import com.fr.general.ComparatorUtils;
import com.fr.general.FRLogger; import com.fr.general.FRLogger;
import com.fr.general.GeneralContext; import com.fr.general.GeneralContext;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.env.EnvContext;
import com.fr.plugin.context.PluginContext; import com.fr.plugin.context.PluginContext;
import com.fr.plugin.injectable.PluginModule; import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.manage.PluginFilter; import com.fr.plugin.manage.PluginFilter;
@ -233,11 +232,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
basePane.add(centerPane, BorderLayout.CENTER); basePane.add(centerPane, BorderLayout.CENTER);
laoyoutWestPane(); laoyoutWestPane();
// JPanel eastRegionPane = new JPanel(new BorderLayout());
// eastRegionPane.add(EastRegionContainerPane.getInstance(), BorderLayout.CENTER);
// eastRegionPane.add(JSliderPane.getInstance(), BorderLayout.SOUTH);
// basePane.add(eastRegionPane, BorderLayout.EAST);
basePane.add(EastRegionContainerPane.getInstance(), BorderLayout.EAST); basePane.add(EastRegionContainerPane.getInstance(), BorderLayout.EAST);
basePane.setBounds(0, 0, contentWidth, contentHeight); basePane.setBounds(0, 0, contentWidth, contentHeight);
@ -332,16 +326,17 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
} }
private void refreshNorthEastPane(JPanel northEastPane, ToolBarMenuDock ad) { private void refreshNorthEastPane(JPanel northEastPane, ToolBarMenuDock ad) {
northEastPane.removeAll(); northEastPane.removeAll();
northEastPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0));
northEastPane.add(LogMessageBar.getInstance());
TitlePlaceProcessor processor = ExtraDesignClassManager.getInstance().getSingle(TitlePlaceProcessor.MARK_STRING); TitlePlaceProcessor processor = ExtraDesignClassManager.getInstance().getSingle(TitlePlaceProcessor.MARK_STRING);
if (processor == null) { if (processor != null) {
processor = new DefaultTitlePlace(); processor.hold(northEastPane, LogMessageBar.getInstance(), ad.createBBSLoginPane());
} }
processor.hold(northEastPane, LogMessageBar.getInstance(), ad.createBBSLoginPane());
if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) { if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) {
northEastPane.add(ad.createAlphaFinePane(), BorderLayout.CENTER); northEastPane.add(ad.createAlphaFinePane());
} }
northEastPane.add(ad.createBBSLoginPane());
} }
@ -966,8 +961,9 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
Env currentEnv = FRContext.getCurrentEnv(); Env currentEnv = FRContext.getCurrentEnv();
try { try {
EnvContext.fireBeforeSignOut();
currentEnv.signOut(); currentEnv.signOut();
GeneralContext.fireEnvSignOutListener(); EnvContext.fireAfterSignOut();
} catch (Exception e) { } catch (Exception e) {
FRContext.getLogger().error(e.getMessage(), e); FRContext.getLogger().error(e.getMessage(), e);
} }

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

@ -466,6 +466,17 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
} }
} }
public boolean isConditionAttrPaneEnabled() {
return propertyItemMap.get(KEY_CONDITION_ATTR).isEnabled();
}
public boolean isWidgetSettingsPaneEnabled() {
return propertyItemMap.get(KEY_WIDGET_SETTINGS).isEnabled();
}
public boolean isCellAttrPaneEnabled() {
return propertyItemMap.get(KEY_CELL_ATTR).isEnabled();
}
class PropertyItem { class PropertyItem {

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

@ -2,6 +2,7 @@ package com.fr.design.mainframe;
import com.fr.base.*; import com.fr.base.*;
import com.fr.base.io.IOFile; import com.fr.base.io.IOFile;
import com.fr.base.iofileattr.TemplateIdAttrMark;
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;
@ -46,6 +47,7 @@ import com.fr.general.Inter;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.stable.core.UUID;
import com.fr.stable.project.ProjectConstants; import com.fr.stable.project.ProjectConstants;
import javax.swing.*; import javax.swing.*;
@ -1066,12 +1068,12 @@ public abstract class JTemplate<T extends IOFile, U extends BaseUndoState<?>> ex
} }
/** /**
* 由于老版本的模板没有模板ID当勾选使用参数模板时候就加一个模板ID * 由于老版本的模板没有模板ID当勾选使用参数模板时候就加一个模板ID attr
* @param isUseParamTemplate 是否使用参数模板 * @param isUseParamTemplate 是否使用参数模板
*/ */
public void needAddTemplateId(boolean isUseParamTemplate) { public void needAddTemplateIdAttr(boolean isUseParamTemplate) {
if (isUseParamTemplate && StringUtils.isEmpty(template.getTemplateID())) { if (isUseParamTemplate && template.getAttrMark(TemplateIdAttrMark.XML_TAG) == null) {
template.initTemplateID(); template.addAttrMark(new TemplateIdAttrMark(UUID.randomUUID().toString()));
} }
} }
} }

14
designer_base/src/com/fr/design/mainframe/hold/DefaultTitlePlace.java

@ -1,14 +0,0 @@
package com.fr.design.mainframe.hold;
import com.fr.design.fun.impl.AbstractTitleProcessor;
import java.awt.*;
public class DefaultTitlePlace extends AbstractTitleProcessor {
@Override
public void hold(Container container, Component loggerComponent, Component loginComponent) {
container.add(loggerComponent, BorderLayout.WEST);
container.add(loginComponent, BorderLayout.EAST);
}
}

3
designer_base/src/com/fr/design/parameter/ParameterDesignerProvider.java

@ -3,6 +3,7 @@ package com.fr.design.parameter;
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.design.mainframe.AuthorityEditPane; import com.fr.design.mainframe.AuthorityEditPane;
import com.fr.design.mainframe.JTemplate;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -31,6 +32,8 @@ public interface ParameterDesignerProvider {
void refreshParameter(ParaDefinitePane paraDefinitePane); void refreshParameter(ParaDefinitePane paraDefinitePane);
void refreshParameter(ParaDefinitePane paraDefinitePane, JTemplate jt);
boolean isWithQueryButton(); boolean isWithQueryButton();
java.util.List<String> getAllXCreatorNameList(); java.util.List<String> getAllXCreatorNameList();

6
designer_base/src/com/fr/design/present/dict/FormulaDictPane.java

@ -5,6 +5,7 @@ import com.fr.base.Formula;
import com.fr.data.impl.FormulaDictionary; import com.fr.data.impl.FormulaDictionary;
import com.fr.design.beans.FurtherBasicBeanPane; import com.fr.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.LayoutConstants; import com.fr.design.constants.LayoutConstants;
import com.fr.design.constants.UIConstants;
import com.fr.design.editor.editor.FormulaEditor; import com.fr.design.editor.editor.FormulaEditor;
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;
@ -47,13 +48,14 @@ public class FormulaDictPane extends FurtherBasicBeanPane<FormulaDictionary> {
double[] rowSize = {p, p, p}; double[] rowSize = {p, p, p};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}}; int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}};
UILabel tag = new UILabel(Inter.getLocText("Formula_Dictionary_Display_Examples_Html")); UILabel tag = new UILabel(Inter.getLocText("FR-Designer-Formula_Dictionary_Display_Examples_Html"));
tag.setForeground(new Color(51, 51, 52));
tag.setPreferredSize(new Dimension(225, 80)); tag.setPreferredSize(new Dimension(225, 80));
JPanel t = new JPanel(new BorderLayout()); JPanel t = new JPanel(new BorderLayout());
t.add(tag, BorderLayout.CENTER); t.add(tag, BorderLayout.CENTER);
Formula vf = new Formula("$$$"); Formula vf = new Formula("$$$");
valueFormulaEditor = new FormulaEditor("", vf); valueFormulaEditor = new FormulaEditor(StringUtils.EMPTY, vf);
JPanel valueFormulaContainer = new JPanel(new FlowLayout(FlowLayout.RIGHT, LEFT_BORDER, 0)); JPanel valueFormulaContainer = new JPanel(new FlowLayout(FlowLayout.RIGHT, LEFT_BORDER, 0));
valueFormulaContainer.setBorder(BorderFactory.createEmptyBorder(0, -LEFT_BORDER, 0, -LEFT_BORDER)); valueFormulaContainer.setBorder(BorderFactory.createEmptyBorder(0, -LEFT_BORDER, 0, -LEFT_BORDER));

27
designer_base/src/com/fr/design/utils/gui/GUICoreUtils.java

@ -221,6 +221,33 @@ public abstract class GUICoreUtils{
return (UIToggleButton) object; return (UIToggleButton) object;
} }
/**
* 创建工具栏组件-反白icon
* @param updateAction 更新动作
* @return UIToggleButton 按钮
*
*/
public static UIToggleButton createToolBarComponentWhiteIcon(UpdateAction updateAction) {
UIToggleButton button = new UIToggleButton((Icon[]) updateAction.getValue(Action.SMALL_ICON), true);
button.set4ToolbarButton();
Integer mnemonicInteger = (Integer) updateAction.getValue(Action.MNEMONIC_KEY);
if (mnemonicInteger != null) {
button.setMnemonic((char) mnemonicInteger.intValue());
}
button.addActionListener(updateAction);
button.registerKeyboardAction(updateAction, updateAction.getAccelerator(), JComponent.WHEN_IN_FOCUSED_WINDOW);
updateAction.putValue(UIToggleButton.class.getName(), button);
button.setText(StringUtils.EMPTY);
button.setEnabled(updateAction.isEnabled());
button.setToolTipText(ActionFactory.createButtonToolTipText(updateAction));
return button;
}
/** /**
* 设置一个窗口 * 设置一个窗口
* *

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

@ -3,7 +3,6 @@ package com.fr.env;
import com.fr.base.AbstractEnv; import com.fr.base.AbstractEnv;
import com.fr.base.EnvException; import com.fr.base.EnvException;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.FRCoreContext;
import com.fr.base.ModifiedTable; import com.fr.base.ModifiedTable;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.base.StoreProcedureParameter; import com.fr.base.StoreProcedureParameter;
@ -35,16 +34,16 @@ import com.fr.general.FRLogger;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.LogRecordTime; import com.fr.general.LogRecordTime;
import com.fr.general.VT4FR;
import com.fr.general.http.HttpClient; import com.fr.general.http.HttpClient;
import com.fr.json.JSONArray; import com.fr.json.JSONArray;
import com.fr.json.JSONException; import com.fr.json.JSONException;
import com.fr.json.JSONObject; import com.fr.json.JSONObject;
import com.fr.license.function.VT4FR;
import com.fr.regist.License;
import com.fr.share.ShareConstants; import com.fr.share.ShareConstants;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.EncodeConstants; import com.fr.stable.EncodeConstants;
import com.fr.stable.JavaCompileInfo; import com.fr.stable.JavaCompileInfo;
import com.fr.stable.LicUtils;
import com.fr.stable.ProductConstants; import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils; import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -56,8 +55,7 @@ import com.fr.stable.xml.XMLTools;
import com.fr.stable.xml.XMLableReader; import com.fr.stable.xml.XMLableReader;
import com.fr.web.ResourceConstants; import com.fr.web.ResourceConstants;
import javax.swing.JOptionPane; import javax.swing.*;
import javax.swing.UIManager;
import javax.xml.transform.Source; import javax.xml.transform.Source;
import javax.xml.transform.Transformer; import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerConfigurationException;
@ -65,7 +63,7 @@ import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory; import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource; import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamResult;
import java.awt.Component; import java.awt.*;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
@ -198,7 +196,7 @@ public class RemoteEnv extends AbstractEnv {
private String createUserID() throws EnvException { private String createUserID() throws EnvException {
// 如果登录之后userID还是null // 如果登录之后userID还是null
if (this.userID == null) { if (this.userID == null) {
if (!VT4FR.REMOTE_DESIGN.support() && licNotSupport <= 0) { if (!VT4FR.RemoteDesign.support() && licNotSupport <= 0) {
licNotSupport++; licNotSupport++;
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Lic_does_not_Support_Remote")); JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Lic_does_not_Support_Remote"));
} }
@ -1438,7 +1436,6 @@ public class RemoteEnv extends AbstractEnv {
return; return;
} }
SignIn.signIn(remoteEnv); SignIn.signIn(remoteEnv);
FRCoreContext.resetBytes();
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshToolArea(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshToolArea();
} catch (Exception em) { } catch (Exception em) {
FRContext.getLogger().error(em.getMessage(), em); FRContext.getLogger().error(em.getMessage(), em);
@ -2036,7 +2033,7 @@ public class RemoteEnv extends AbstractEnv {
@Override @Override
public String getLicName() { public String getLicName() {
return LicUtils.FILE_NAME; return License.FILE_NAME;
} }
@Override @Override

7
designer_base/src/com/fr/env/SignIn.java vendored

@ -3,9 +3,9 @@ package com.fr.env;
import com.fr.base.Env; import com.fr.base.Env;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.general.ComparatorUtils;
import com.fr.design.utils.DesignUtils; import com.fr.design.utils.DesignUtils;
import com.fr.general.GeneralContext; import com.fr.general.ComparatorUtils;
import com.fr.general.env.EnvContext;
public class SignIn { public class SignIn {
@ -33,8 +33,9 @@ public class SignIn {
return; return;
} }
try { try {
GeneralContext.fireEnvSignOutListener(); EnvContext.fireBeforeSignOut();
lastSelectedEnv.signOut(); lastSelectedEnv.signOut();
EnvContext.fireAfterSignOut();
} catch (Exception e) { } catch (Exception e) {
FRContext.getLogger().error(e.getMessage(), e); FRContext.getLogger().error(e.getMessage(), e);
} }

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

@ -171,7 +171,8 @@ public abstract class BaseDesigner extends ToolBarMenuDock {
protected void initLanguage() { protected void initLanguage() {
//这两句的位置不能随便调换,因为会影响语言切换的问题 //这两句的位置不能随便调换,因为会影响语言切换的问题
FRContext.setLanguage(DesignerEnvManager.getEnvManager().getLanguage()); FRContext.setLanguage(DesignerEnvManager.getEnvManager(false).getLanguage());
DesignerEnvManager.checkNameEnvMap();
} }
protected void initDefaultFont() { protected void initDefaultFont() {

10
designer_chart/src/com/fr/design/chart/ChartTypePane.java

@ -5,7 +5,6 @@ package com.fr.design.chart;
*/ */
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.FRCoreContext;
import com.fr.chart.base.ChartInternationalNameContentBean; import com.fr.chart.base.ChartInternationalNameContentBean;
import com.fr.chart.chartattr.Chart; import com.fr.chart.chartattr.Chart;
import com.fr.chart.chartattr.ChartCollection; import com.fr.chart.chartattr.ChartCollection;
@ -17,8 +16,8 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.Inter; import com.fr.general.Inter;
import com.fr.general.RegistEditionException; import com.fr.license.exception.RegistEditionException;
import com.fr.general.VT4FR; import com.fr.license.function.VT4FR;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.ListSelectionEvent; import javax.swing.event.ListSelectionEvent;
@ -159,7 +158,7 @@ public class ChartTypePane extends ChartCommonWizardPane {
if(chart.getPlot() != null){ if(chart.getPlot() != null){
if(chart.getPlot() instanceof MapPlot && !supportMap()){ if(chart.getPlot() instanceof MapPlot && !supportMap()){
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Chart-Map_Not_Supported")); JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Chart-Map_Not_Supported"));
throw new RegistEditionException(VT4FR.CHART_MAP); throw new RegistEditionException(VT4FR.ChartMap);
} }
if (chart.getPlot() != null) { if (chart.getPlot() != null) {
@ -173,8 +172,7 @@ public class ChartTypePane extends ChartCommonWizardPane {
} }
private boolean supportMap() { private boolean supportMap() {
byte[] bytes = FRCoreContext.getBytes(); return VT4FR.ChartMap.support();
return VT4FR.isLicAvailable(bytes) && VT4FR.CHART_MAP.support();
} }
public void update(ChartCollection cc) { public void update(ChartCollection cc) {

2
designer_chart/src/com/fr/design/mainframe/chart/gui/other/ChartInteractivePane.java

@ -821,7 +821,7 @@ public class ChartInteractivePane extends BasicScrollPane<Chart> implements UIOb
if(isAutoRefresh.isSelected() && autoRefreshTime.getValue() >= 2) { if(isAutoRefresh.isSelected() && autoRefreshTime.getValue() >= 2) {
plot.setAutoRefreshPerSecond((int) autoRefreshTime.getValue()); plot.setAutoRefreshPerSecond((int) autoRefreshTime.getValue());
} else { } else {
plot.setAutoRefreshPerSecond(-1); plot.setAutoRefreshPerSecond(0);
} }
} }
} }

15
designer_chart/src/com/fr/plugin/chart/designer/component/VanChartTooltipContentPane.java

@ -219,6 +219,8 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
updateFormatPane(attrTooltipContent); updateFormatPane(attrTooltipContent);
updateFormatsWithPaneWidth(attrTooltipContent);
htmlLabelPane.update(attrTooltipContent.getHtmlLabel()); htmlLabelPane.update(attrTooltipContent.getHtmlLabel());
return attrTooltipContent; return attrTooltipContent;
@ -241,4 +243,17 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
changedPercentFormatPane.update(attrTooltipContent.getChangedPercentFormat()); changedPercentFormatPane.update(attrTooltipContent.getChangedPercentFormat());
} }
} }
/**
* CHART-1295
* 通过格式的面板宽度来判断在自定义js代码中是否显示this.seriesName字符串
* 图表对于其他的格式有要求也可以在这里继续添加
* @param attrTooltipContent
*/
private void updateFormatsWithPaneWidth (AttrTooltipContent attrTooltipContent) {
int paneWidth = seriesNameFormatPane.getWidth();
if (paneWidth == 0) {
attrTooltipContent.getSeriesFormat().setEnable(false);
}
}
} }

BIN
designer_chart/src/com/fr/plugin/chart/map/images/mapData.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 B

After

Width:  |  Height:  |  Size: 493 B

157
designer_form/src/com/fr/design/designer/beans/models/SelectionModel.java

@ -136,37 +136,7 @@ public class SelectionModel {
private void unselectedPaste() { private void unselectedPaste() {
if (designer.getClass().equals(FormDesigner.class)) { if (designer.getClass().equals(FormDesigner.class)) {
if (selection.getSelectedCreator() instanceof XWFitLayout) { if (selection.getSelectedCreator() instanceof XWFitLayout) {
if (selection.getSelectedCreator().getClass().equals(XWTabFitLayout.class)) { pasteXWFitLayout();
XLayoutContainer container = (XLayoutContainer) selection.getSelectedCreator();
//tab布局编辑器内部左上角第一个坐标点
int leftUpX = container.toData().getMargin().getLeft() + 1;
int leftUpY = container.toData().getMargin().getTop() + 1;
//选中第一个坐标点坐在的组件
selection.setSelectedCreator((XCreator) container.getComponentAt(leftUpX, leftUpY));
Rectangle rectangle = selection.getRelativeBounds();
if (hasSelectedPasteSource()) {
selectedPaste();
} else {
FormSelectionUtils.paste2Container(designer, container, clipboard,
rectangle.x + rectangle.width / 2,
rectangle.y + DELTA_X_Y);
}
} else {
//自适应布局编辑器内部左上角第一个坐标点
int leftUpX = designer.getRootComponent().toData().getMargin().getLeft() + 1;
int leftUpY = designer.getRootComponent().toData().getMargin().getTop() + 1;
//选中第一个坐标点坐在的组件
selection.setSelectedCreator((XCreator) designer.getRootComponent().getComponentAt(leftUpX, leftUpY));
Rectangle rectangle = selection.getRelativeBounds();
if (hasSelectedPasteSource()) {
selectedPaste();
} else {
FormSelectionUtils.paste2Container(designer, designer.getRootComponent(),
clipboard,
rectangle.x + rectangle.width / 2,
rectangle.y + DELTA_X_Y);
}
}
} else { } else {
//绝对布局 //绝对布局
//编辑器外面还有两层容器,使用designer.getRootComponent()获取到的是编辑器中层的容器,不是编辑器表层 //编辑器外面还有两层容器,使用designer.getRootComponent()获取到的是编辑器中层的容器,不是编辑器表层
@ -186,6 +156,40 @@ public class SelectionModel {
} }
} }
private void pasteXWFitLayout() {
if (selection.getSelectedCreator().getClass().equals(XWTabFitLayout.class)) {
XLayoutContainer container = (XLayoutContainer) selection.getSelectedCreator();
//tab布局编辑器内部左上角第一个坐标点
int leftUpX = container.toData().getMargin().getLeft() + 1;
int leftUpY = container.toData().getMargin().getTop() + 1;
//选中第一个坐标点坐在的组件
selection.setSelectedCreator((XCreator) container.getComponentAt(leftUpX, leftUpY));
Rectangle rectangle = selection.getRelativeBounds();
if (hasSelectedPasteSource()) {
selectedPaste();
} else {
FormSelectionUtils.paste2Container(designer, container, clipboard,
rectangle.x + rectangle.width / 2,
rectangle.y + DELTA_X_Y);
}
} else {
//自适应布局编辑器内部左上角第一个坐标点
int leftUpX = designer.getRootComponent().toData().getMargin().getLeft() + 1;
int leftUpY = designer.getRootComponent().toData().getMargin().getTop() + 1;
//选中第一个坐标点坐在的组件
selection.setSelectedCreator((XCreator) designer.getRootComponent().getComponentAt(leftUpX, leftUpY));
Rectangle rectangle = selection.getRelativeBounds();
if (hasSelectedPasteSource()) {
selectedPaste();
} else {
FormSelectionUtils.paste2Container(designer, designer.getRootComponent(),
clipboard,
rectangle.x + rectangle.width / 2,
rectangle.y + DELTA_X_Y);
}
}
}
/** /**
* 粘贴时选择组件 * 粘贴时选择组件
*/ */
@ -227,7 +231,11 @@ public class SelectionModel {
XCreator[] roots = selection.getSelectedCreators(); XCreator[] roots = selection.getSelectedCreators();
if (roots.length > 0) { if (roots.length > 0) {
boolean isInPara = true; // 在参数面板内删除控件
for (XCreator creator : roots) { for (XCreator creator : roots) {
if (isInPara && !(creator.getParent() instanceof XWParameterLayout)) {
isInPara = false;
}
if (creator.acceptType(XWParameterLayout.class)) { if (creator.acceptType(XWParameterLayout.class)) {
designer.removeParaComponent(); designer.removeParaComponent();
} }
@ -236,8 +244,7 @@ public class SelectionModel {
// 清除被选中的组件 // 清除被选中的组件
selection.reset(); selection.reset();
} }
setSelectedCreator(designer.getRootComponent()); setSelectedCreator(isInPara ? designer.getParaComponent() : designer.getRootComponent());
FormSelectionUtils.rebuildSelection(designer);
// 触发事件 // 触发事件
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_DELETED); designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_DELETED);
designer.repaint(); designer.repaint();
@ -401,45 +408,57 @@ public class SelectionModel {
if (x < (bounds.x - XCreatorConstants.RESIZE_BOX_SIZ)) { if (x < (bounds.x - XCreatorConstants.RESIZE_BOX_SIZ)) {
return Location.outer; return Location.outer;
} else if ((x >= (bounds.x - XCreatorConstants.RESIZE_BOX_SIZ)) && (x <= bounds.x)) { } else if ((x >= (bounds.x - XCreatorConstants.RESIZE_BOX_SIZ)) && (x <= bounds.x)) {
if (y < (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) { return getDirectionLeft(bounds, y);
return Location.outer;
} else if ((y >= (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) && (y <= bounds.y)) {
return Location.left_top;
} else if ((y > bounds.y) && (y < (bounds.y + bounds.height))) {
return Location.left;
} else if ((y >= (bounds.y + bounds.height))
&& (y <= (bounds.y + bounds.height + XCreatorConstants.RESIZE_BOX_SIZ))) {
return Location.left_bottom;
} else {
return Location.outer;
}
} else if ((x > bounds.x) && (x < (bounds.x + bounds.width))) { } else if ((x > bounds.x) && (x < (bounds.x + bounds.width))) {
if (y < (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) { return getDirectionCenter(bounds, y);
return Location.outer;
} else if ((y >= (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) && (y <= bounds.y)) {
return Location.top;
} else if ((y > bounds.y) && (y < (bounds.y + bounds.height))) {
return Location.inner;
} else if ((y >= (bounds.y + bounds.height))
&& (y <= (bounds.y + bounds.height + XCreatorConstants.RESIZE_BOX_SIZ))) {
return Location.bottom;
} else {
return Location.outer;
}
} else if ((x >= (bounds.x + bounds.width)) } else if ((x >= (bounds.x + bounds.width))
&& (x <= (bounds.x + bounds.width + XCreatorConstants.RESIZE_BOX_SIZ))) { && (x <= (bounds.x + bounds.width + XCreatorConstants.RESIZE_BOX_SIZ))) {
if (y < (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) { return getDirectionRight(bounds, y);
return Location.outer; } else {
} else if ((y >= (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) && (y <= bounds.y)) { return Location.outer;
return Location.right_top; }
} else if ((y > bounds.y) && (y < (bounds.y + bounds.height))) { }
return Location.right;
} else if ((y >= (bounds.y + bounds.height)) private Direction getDirectionRight(Rectangle bounds, int y) {
&& (y <= (bounds.y + bounds.height + XCreatorConstants.RESIZE_BOX_SIZ))) { if (y < (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) {
return Location.right_bottom; return Location.outer;
} else { } else if ((y >= (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) && (y <= bounds.y)) {
return Location.outer; return Location.right_top;
} } else if ((y > bounds.y) && (y < (bounds.y + bounds.height))) {
return Location.right;
} else if ((y >= (bounds.y + bounds.height))
&& (y <= (bounds.y + bounds.height + XCreatorConstants.RESIZE_BOX_SIZ))) {
return Location.right_bottom;
} else {
return Location.outer;
}
}
private Direction getDirectionCenter(Rectangle bounds, int y) {
if (y < (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) {
return Location.outer;
} else if ((y >= (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) && (y <= bounds.y)) {
return Location.top;
} else if ((y > bounds.y) && (y < (bounds.y + bounds.height))) {
return Location.inner;
} else if ((y >= (bounds.y + bounds.height))
&& (y <= (bounds.y + bounds.height + XCreatorConstants.RESIZE_BOX_SIZ))) {
return Location.bottom;
} else {
return Location.outer;
}
}
private Direction getDirectionLeft(Rectangle bounds, int y) {
if (y < (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) {
return Location.outer;
} else if ((y >= (bounds.y - XCreatorConstants.RESIZE_BOX_SIZ)) && (y <= bounds.y)) {
return Location.left_top;
} else if ((y > bounds.y) && (y < (bounds.y + bounds.height))) {
return Location.left;
} else if ((y >= (bounds.y + bounds.height))
&& (y <= (bounds.y + bounds.height + XCreatorConstants.RESIZE_BOX_SIZ))) {
return Location.left_bottom;
} else { } else {
return Location.outer; return Location.outer;
} }

40
designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java

@ -37,16 +37,7 @@ import com.fr.design.designer.creator.XWAbsoluteLayout;
import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.design.designer.properties.FormWidgetAuthorityEditPane; import com.fr.design.designer.properties.FormWidgetAuthorityEditPane;
import com.fr.design.form.util.XCreatorConstants; import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.mainframe.AuthorityEditPane; import com.fr.design.mainframe.*;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.mainframe.FormArea;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.FormDesignerModeForSpecial;
import com.fr.design.mainframe.FormParaPane;
import com.fr.design.mainframe.FormWidgetDetailPane;
import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.WidgetToolBarPane;
import com.fr.design.parameter.ParaDefinitePane; import com.fr.design.parameter.ParaDefinitePane;
import com.fr.design.parameter.ParameterDesignerProvider; import com.fr.design.parameter.ParameterDesignerProvider;
import com.fr.design.parameter.ParameterPropertyPane; import com.fr.design.parameter.ParameterPropertyPane;
@ -79,6 +70,9 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
private static final int SECOND_H_LOCATION = 170; private static final int SECOND_H_LOCATION = 170;
private static final int ADD_HEIGHT = 20; private static final int ADD_HEIGHT = 20;
private static final int H_GAP = 105; private static final int H_GAP = 105;
private static final int SUBMIT_BUTTON_H_LOCATION = 270;
private static final int PARA_IMAGE_SHIFT_X = -4;
private static final int FORM_AREA_PADDING_LEFT = 13;
private static Image paraImage = BaseUtils.readImage("/com/fr/design/images/form/parameter.png"); private static Image paraImage = BaseUtils.readImage("/com/fr/design/images/form/parameter.png");
@ -175,12 +169,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
@Override @Override
public void fireCreatorModified(DesignerEvent evt) { public void fireCreatorModified(DesignerEvent evt) {
if (evt.getCreatorEventID() == DesignerEvent.CREATOR_ADDED if (evt.getCreatorEventID() != DesignerEvent.CREATOR_SELECTED) {
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_CUTED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_PASTED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_DELETED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_EDITED
|| evt.getCreatorEventID() == DesignerEvent.CREATOR_RENAMED) {
paraDefinitePane.setParameterArray( paraDefinitePane.setParameterArray(
paraDefinitePane.getNoRepeatParas(DesignModelAdapter.getCurrentModelAdapter().getParameters())); paraDefinitePane.getNoRepeatParas(DesignModelAdapter.getCurrentModelAdapter().getParameters()));
paraDefinitePane.refreshParameter(); paraDefinitePane.refreshParameter();
@ -196,7 +185,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
*/ */
public Component createWrapper() { public Component createWrapper() {
FormArea area = new FormArea(this, false); FormArea area = new FormArea(this, false);
area.setBorder(BorderFactory.createEmptyBorder(0, 13, 0, 0)); area.setBorder(BorderFactory.createEmptyBorder(0, FORM_AREA_PADDING_LEFT, 0, 0));
return area; return area;
} }
@ -224,6 +213,16 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
* @param p 参数面板 * @param p 参数面板
*/ */
public void refreshParameter(ParaDefinitePane p) { public void refreshParameter(ParaDefinitePane p) {
refreshParameter(p, DesignerContext.getDesignerFrame().getSelectedJTemplate());
}
/**
* 刷新参数
*
* @param p 参数面板
* @param jt 当前模版
*/
public void refreshParameter(ParaDefinitePane p, JTemplate jt) {
XLayoutContainer rootContainer = this.getRootComponent(); XLayoutContainer rootContainer = this.getRootComponent();
java.util.List<String> namelist = getAllXCreatorNameList(rootContainer); java.util.List<String> namelist = getAllXCreatorNameList(rootContainer);
// parameterArray是报表的所有参数, nameList是已经在参数面板添加过控件的参数名 // parameterArray是报表的所有参数, nameList是已经在参数面板添加过控件的参数名
@ -240,8 +239,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
} }
ParameterPropertyPane.getInstance().getParameterToolbarPane().populateBean( ParameterPropertyPane.getInstance().getParameterToolbarPane().populateBean(
p.getParameterArray() == null ? new Parameter[0] : p.getParameterArray()); p.getParameterArray() == null ? new Parameter[0] : p.getParameterArray());
EastRegionContainerPane.getInstance().setParameterHeight(ParameterPropertyPane.getInstance().getPreferredSize().height); ParameterPropertyPane.getInstance().refreshState(jt);
} }
/** /**
@ -439,7 +437,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
} }
for (Parameter p : paras) { for (Parameter p : paras) {
if (p.getName().equalsIgnoreCase(creator.toData().getWidgetName())) { if (p.getName().equalsIgnoreCase(creator.toData().getWidgetName())) {
g.drawImage(paraImage, creator.getX() - 4, creator.getY() + 2, null); g.drawImage(paraImage, creator.getX() + PARA_IMAGE_SHIFT_X, creator.getY() + 2, null);
break; break;
} }
} }
@ -617,7 +615,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
formSubmitButton.setWidgetName("Search"); formSubmitButton.setWidgetName("Search");
formSubmitButton.setText(Inter.getLocText("FR-Designer_Query")); formSubmitButton.setText(Inter.getLocText("FR-Designer_Query"));
xCreator = XCreatorUtils.createXCreator(formSubmitButton); xCreator = XCreatorUtils.createXCreator(formSubmitButton);
if (!(this.autoAddComponent(xCreator, 270, FIRST_V_LOCATION + V_COMPONENT_GAP if (!(this.autoAddComponent(xCreator, SUBMIT_BUTTON_H_LOCATION, FIRST_V_LOCATION + V_COMPONENT_GAP
* (currentIndex / NUM_IN_A_LINE)))) { * (currentIndex / NUM_IN_A_LINE)))) {
return false; return false;
} }

17
designer_form/src/com/fr/design/mainframe/FormDesigner.java

@ -123,6 +123,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
private static final int SECOND_H_LOCATION = 170; private static final int SECOND_H_LOCATION = 170;
private static final int ADD_HEIGHT = 20; private static final int ADD_HEIGHT = 20;
private static final int H_GAP = 105; private static final int H_GAP = 105;
private static final int SUBMIT_BUTTON_H_LOCATION = 270;
public FormDesigner(Form form) { public FormDesigner(Form form) {
this(form, null); this(form, null);
@ -257,7 +258,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
currentIndex++; currentIndex++;
parameterArray = (Parameter[]) ArrayUtils.removeElement(parameterArray, parameter); parameterArray = (Parameter[]) ArrayUtils.removeElement(parameterArray, parameter);
refreshParameter(); refreshParameter();
EastRegionContainerPane.getInstance().refreshDownPane(); fireTargetModified();
} }
/** /**
@ -294,14 +295,14 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
formSubmitButton.setWidgetName("Search"); formSubmitButton.setWidgetName("Search");
formSubmitButton.setText(Inter.getLocText("FR-Designer_Query")); formSubmitButton.setText(Inter.getLocText("FR-Designer_Query"));
xCreator = XCreatorUtils.createXCreator(formSubmitButton); xCreator = XCreatorUtils.createXCreator(formSubmitButton);
if (!(this.autoAddComponent(xCreator, 270, FIRST_V_LOCATION + V_COMPONENT_GAP if (!(this.autoAddComponent(xCreator, SUBMIT_BUTTON_H_LOCATION, FIRST_V_LOCATION + V_COMPONENT_GAP
* (currentIndex / NUM_IN_A_LINE)))) { * (currentIndex / NUM_IN_A_LINE)))) {
return; return;
} }
currentIndex = currentIndex + NUM_IN_A_LINE - currentIndex % NUM_IN_A_LINE; currentIndex = currentIndex + NUM_IN_A_LINE - currentIndex % NUM_IN_A_LINE;
parameterArray = (Parameter[]) ArrayUtils.removeElement(parameterArray, parameter); parameterArray = (Parameter[]) ArrayUtils.removeElement(parameterArray, parameter);
refreshParameter(); refreshParameter();
EastRegionContainerPane.getInstance().refreshDownPane(); fireTargetModified();
} }
/** /**
@ -667,9 +668,8 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
// 只有选择组件时不触发模版更新,其他都要触发 // 只有选择组件时不触发模版更新,其他都要触发
if (evt.getCreatorEventID() != DesignerEvent.CREATOR_SELECTED) { if (evt.getCreatorEventID() != DesignerEvent.CREATOR_SELECTED) {
FormDesigner.this.fireTargetModified(); FormDesigner.this.fireTargetModified();
//bug59192 setParameterArray(getNoRepeatParas(getTarget().getParameters()));
//setParameterArray(getNoRepeatParas(getTarget().getParameters())); refreshParameter();
//refreshParameter();
} }
} }
@ -1147,7 +1147,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
* 同步 * 同步
*/ */
public void populateRootSize() { public void populateRootSize() {
// do nothing
} }
/** /**
@ -1233,6 +1233,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
*/ */
@Override @Override
public void stopEditing() { public void stopEditing() {
// do nothing
} }
/** /**
@ -1412,7 +1413,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
parent = parent.getParent(); parent = parent.getParent();
} }
Object[] components = path.toArray(); Object[] components = (Object[]) path.toArray();
if (components.length == 0) { if (components.length == 0) {
return null; return null;
} }

2
designer_form/src/com/fr/design/mainframe/FormWidgetDetailPane.java

@ -147,6 +147,7 @@ public class FormWidgetDetailPane extends FormDockView{
private void initReuWidgetPanel() { private void initReuWidgetPanel() {
elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList(); elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList();
downPane = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList, false)); downPane = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList, false));
downPane.setBorder(null);
reuWidgetPanel.add(downPane); reuWidgetPanel.add(downPane);
} }
@ -429,6 +430,7 @@ public class FormWidgetDetailPane extends FormDockView{
public void refreshDownPanel(boolean isEdit) { public void refreshDownPanel(boolean isEdit) {
reuWidgetPanel.remove(downPane); reuWidgetPanel.remove(downPane);
downPane = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList, isEdit)); downPane = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList, isEdit));
downPane.setBorder(null);
reuWidgetPanel.add(downPane); reuWidgetPanel.add(downPane);
repaintContainer(); repaintContainer();

17
designer_form/src/com/fr/design/mainframe/JForm.java

@ -328,10 +328,10 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
private void setPropertyPaneChange(XComponent comp) { private void setPropertyPaneChange(XComponent comp) {
if (comp == null) { if (comp == null) {
ParameterPropertyPane.getInstance().setAddParaPaneVisible(false); ParameterPropertyPane.getInstance().setAddParaPaneVisible(false, this);
return; return;
} }
ParameterPropertyPane.getInstance().setAddParaPaneVisible(comp instanceof XWParameterLayout); ParameterPropertyPane.getInstance().setAddParaPaneVisible(isAddParaPaneVisible(comp), this);
editingComponent = comp.createToolPane(this, formDesign); editingComponent = comp.createToolPane(this, formDesign);
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.FORM); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.FORM);
if (BaseUtils.isAuthorityEditing()) { if (BaseUtils.isAuthorityEditing()) {
@ -342,6 +342,16 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
} }
} }
private boolean isAddParaPaneVisible(XComponent comp) {
boolean isVisible = false;
try {
isVisible = comp instanceof XWParameterLayout || ((XCreator) comp).getParent() instanceof XWParameterLayout;
} catch (Throwable throwable) {
// 发生异常则返回 false
}
return isVisible;
}
public JComponent getEditingPane() { public JComponent getEditingPane() {
return editingComponent; return editingComponent;
} }
@ -546,6 +556,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
//撤销的时候要重新选择的body布局 //撤销的时候要重新选择的body布局
this.formDesign.getSelectionModel().setSelectedCreators(FormSelectionUtils.rebuildSelection(formDesign.getRootComponent(), this.formDesign.getSelectionModel().setSelectedCreators(FormSelectionUtils.rebuildSelection(formDesign.getRootComponent(),
formDesign.getRootComponent() == selectedBodyLayout() ? u.getSelectWidgets() : new Widget[]{selectedBodyLayout().toData()})); formDesign.getRootComponent() == selectedBodyLayout() ? u.getSelectWidgets() : new Widget[]{selectedBodyLayout().toData()}));
refreshToolArea();
} else { } else {
String widgetName = this.formDesign.getElementCaseContainerName(); String widgetName = this.formDesign.getElementCaseContainerName();
//这儿太坑了,u.getForm() 与 getTarget内容不一样 //这儿太坑了,u.getForm() 与 getTarget内容不一样
@ -718,7 +729,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.FORM); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.FORM);
EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(WidgetPropertyPane.getInstance(formDesign)); EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(WidgetPropertyPane.getInstance(formDesign));
ParameterPropertyPane parameterPropertyPane = ParameterPropertyPane.getInstance(formDesign); ParameterPropertyPane parameterPropertyPane = ParameterPropertyPane.getInstance(formDesign);
parameterPropertyPane.setAddParaPaneVisible(false); parameterPropertyPane.setAddParaPaneVisible(false, this);
EastRegionContainerPane.getInstance().addParameterPane(parameterPropertyPane); EastRegionContainerPane.getInstance().addParameterPane(parameterPropertyPane);
EastRegionContainerPane.getInstance().setParameterHeight(parameterPropertyPane.getPreferredSize().height); EastRegionContainerPane.getInstance().setParameterHeight(parameterPropertyPane.getPreferredSize().height);

16
designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java

@ -4,10 +4,7 @@ import com.fr.design.constants.UIConstants;
import com.fr.design.designer.creator.XWParameterLayout; import com.fr.design.designer.creator.XWParameterLayout;
import com.fr.design.dialog.BasicScrollPane; import com.fr.design.dialog.BasicScrollPane;
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.*;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.FormHierarchyTreePane;
import com.fr.design.mainframe.JForm;
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
@ -87,18 +84,23 @@ public class ParameterPropertyPane extends JPanel{
} }
// 显示或隐藏添加参数面板 // 显示或隐藏添加参数面板
public void refreshState(JTemplate jt) {
setAddParaPaneVisible(toolbarPane.hasSelectedLabelItem(), jt);
}
// 显示或隐藏添加参数面板
public void refreshState() { public void refreshState() {
setAddParaPaneVisible(toolbarPane.hasSelectedLabelItem()); refreshState(DesignerContext.getDesignerFrame().getSelectedJTemplate());
} }
public void setAddParaPaneVisible(boolean isVisible) { public void setAddParaPaneVisible(boolean isVisible, JTemplate jt) {
if (isVisible == addParaPane.isVisible() || formHierarchyTreePaneWrapper == null) { if (isVisible == addParaPane.isVisible() || formHierarchyTreePaneWrapper == null) {
return; return;
} }
// 表单中,只有添加并选中参数面板时,才显示 // 表单中,只有添加并选中参数面板时,才显示
boolean hideInJForm; boolean hideInJForm;
try { try {
hideInJForm = DesignerContext.getDesignerFrame().getSelectedJTemplate() instanceof JForm && hideInJForm = jt instanceof JForm &&
!(FormHierarchyTreePane.getInstance().getComponentTree().getSelectionPath().getLastPathComponent() instanceof XWParameterLayout); !(FormHierarchyTreePane.getInstance().getComponentTree().getSelectionPath().getLastPathComponent() instanceof XWParameterLayout);
} catch (NullPointerException ex) { } catch (NullPointerException ex) {
hideInJForm = true; hideInJForm = true;

16
designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java

@ -35,6 +35,7 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
private static final int BUTTON_HEIGHT = 20; private static final int BUTTON_HEIGHT = 20;
private static final int WIDTH = 225; private static final int WIDTH = 225;
private static final int L_H = 18; private static final int L_H = 18;
private static final int LABEL_PADDING_LEFT = 4;
public ParameterToolBarPane() { public ParameterToolBarPane() {
this.setLayout(new FlowParameterPaneLayout()); this.setLayout(new FlowParameterPaneLayout());
@ -47,9 +48,9 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
return new Dimension(super.getPreferredSize().width, 18); return new Dimension(super.getPreferredSize().width, 18);
} }
}; };
label.setText(Inter.getLocText("FR-Following_parameters_are_not_generated")+":"); label.setText(Inter.getLocText("FR-Following_parameters_are_not_generated") + ":");
label.setHorizontalAlignment(SwingConstants.LEFT); label.setHorizontalAlignment(SwingConstants.LEFT);
label.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 0)); label.setBorder(BorderFactory.createEmptyBorder(0, LABEL_PADDING_LEFT, 0, 0));
this.add(label); this.add(label);
addAll = new UIButton(Inter.getLocText("FR-Designer_Add_all")); addAll = new UIButton(Inter.getLocText("FR-Designer_Add_all"));
@ -68,7 +69,7 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
public Parameter getTargetParameter(UIButton button) { public Parameter getTargetParameter(UIButton button) {
int index = parameterSelectedLabellist.indexOf(button); int index = parameterSelectedLabellist.indexOf(button);
if(index < 0 || index > parameterList.length - 1) { if (index < 0 || index > parameterList.length - 1) {
return null; return null;
} }
return parameterList[index]; return parameterList[index];
@ -82,7 +83,6 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
this.add(label); this.add(label);
if (parameterArray.length == 0) { if (parameterArray.length == 0) {
ParameterPropertyPane.getInstance().refreshState();
this.setVisible(false); this.setVisible(false);
this.repaint(); this.repaint();
return; return;
@ -103,7 +103,6 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
this.add(addAll); this.add(addAll);
this.doLayout(); this.doLayout();
ParameterPropertyPane.getInstance().refreshState();
this.repaint(); this.repaint();
} }
@ -124,12 +123,15 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
private class FlowParameterPaneLayout implements LayoutManager { private class FlowParameterPaneLayout implements LayoutManager {
public FlowParameterPaneLayout() { public FlowParameterPaneLayout() {
// do nothing
} }
public void addLayoutComponent(String name, Component comp) { public void addLayoutComponent(String name, Component comp) {
// do nothing
} }
public void removeLayoutComponent(Component comp) { public void removeLayoutComponent(Component comp) {
// do nothing
} }
public Dimension preferredLayoutSize(Container parent) { public Dimension preferredLayoutSize(Container parent) {
@ -137,7 +139,7 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
layoutContainer(parent); layoutContainer(parent);
int h= ((parameterSelectedLabellist.size() == 0) ? 0 : breakid * (BUTTON_HEIGHT + GAP_V) + GAP_BV + L_H + GAP_H + addAll.getPreferredSize().height); int h= (parameterSelectedLabellist.isEmpty() ? 0 : breakid * (BUTTON_HEIGHT + GAP_V) + GAP_BV + L_H + GAP_H + addAll.getPreferredSize().height);
return new Dimension(w, h); return new Dimension(w, h);
} }
@ -155,7 +157,7 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
breakid = 1; breakid = 1;
for (UIButton tab : parameterSelectedLabellist) { for (UIButton tab : parameterSelectedLabellist) {
Dimension dim = tab.getPreferredSize(); Dimension dim = tab.getPreferredSize();
if(x + dim.width > width) { if (x + dim.width > width) {
breakid++; breakid++;
x = 0; x = 0;
y += (dim.height + GAP_V); y += (dim.height + GAP_V);

2
designer_form/src/com/fr/design/parameter/RootDesignDefinePane.java

@ -128,7 +128,7 @@ public class RootDesignDefinePane extends AbstractDataModify<WParameterLayout> {
wParameterLayout.setDelayDisplayContent(displayReport.isSelected()); wParameterLayout.setDelayDisplayContent(displayReport.isSelected());
wParameterLayout.setUseParamsTemplate(useParamsTemplate.isSelected()); wParameterLayout.setUseParamsTemplate(useParamsTemplate.isSelected());
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
jTemplate.needAddTemplateId(useParamsTemplate.isSelected()); jTemplate.needAddTemplateIdAttr(useParamsTemplate.isSelected());
wParameterLayout.setBackground((Background) background.getValue()); wParameterLayout.setBackground((Background) background.getValue());
wParameterLayout.setPosition((int)hAlignmentPane.getSelectedItem()); wParameterLayout.setPosition((int)hAlignmentPane.getSelectedItem());
return wParameterLayout; return wParameterLayout;

Loading…
Cancel
Save