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;
public abstract class ButtonGroupAction extends ElementCaseAction{
protected Icon[] iconArray;
protected Icon[][] iconArray;
protected Integer[] valueArray;
private UIButtonGroup<Integer> group;
protected ButtonGroupAction(ElementCasePane t, Icon[] iconArray, Integer[] valueArray) {
protected ButtonGroupAction(ElementCasePane t, Icon[][] iconArray, Integer[] valueArray) {
super(t);
this.iconArray = iconArray;
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.mainframe.CellElementPropertyPane;
import com.fr.design.mainframe.EastRegionContainerPane;
import java.awt.event.ActionEvent;
@ -20,4 +21,9 @@ public abstract class CellAttributeTableAction extends UpdateAction {
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().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().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 {
private static final Icon[] normalBlackIcon = 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_center_normal.png"),
BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/h_right_normal.png")};
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_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_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_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};
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());
}
/**
* 更新Style
*
* @param style style
*/
public void updateStyle(Style style) {
UIButtonGroup<Integer> buttonGroup = createToolBarComponent();
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);
}
/**
* 更新Style
*
* @param style style
*/
public void updateStyle(Style style) {
setSelectedIndex(BaseUtils.getAlignment4Horizontal(style));
}
/**
* 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 {
private UIToggleButton button;
protected Style style;
private final static Icon blackIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png");
private final static Icon whiteIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold_white.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")};
public ReportFontBoldAction(ElementCasePane t) {
super(t);
this.setName(Inter.getLocText("FRFont-bold"));
this.setSmallIcon(blackIcon);
this.setSmallIcon(ICONS, true);
}
/**
* 根据按钮状态获取格式
*
* @param style
* @param defStyle
* @return
*/
@Override
public Style executeStyle(Style style, Style defStyle) {
button = createToolBarComponent();
button.setIcon(getToggleButtonIcon(button.isSelected()));
button.setSelected(!button.isSelected());
if (button.isSelected()) {
setSelectedFont(style);
button.setSelected(false);
} else {
setUnselectedFont(style);
button.setSelected(true);
}
/**
* 根据按钮状态获取格式
*
* @param style
* @param defStyle
* @return
*/
@Override
public Style executeStyle(Style style, Style defStyle) {
createToolBarComponent().setSelected(!createToolBarComponent().isSelected());
if (createToolBarComponent().isSelected()) {
setSelectedFont(style);
createToolBarComponent().setSelected(false);
} else {
setUnselectedFont(style);
createToolBarComponent().setSelected(true);
}
return this.style;
}
protected Icon getToggleButtonIcon(boolean isSelected) {
return isSelected ? blackIcon : whiteIcon;
}
protected void setSelectedFont(Style style) {
this.style = StyleUtils.boldReportFont(style);
@ -66,22 +60,20 @@ public class ReportFontBoldAction extends AbstractStyleAction implements ToggleB
this.style = StyleUtils.unBoldReportFont(style);
}
/**
* Update Style.
*/
@Override
public void updateStyle(Style style) {
if (style == null) {
return;
}
FRFont frFont = style.getFRFont();
if (frFont == null) {
return;
}
button = createToolBarComponent();
button.setSelected(isStyle(frFont));
button.setIcon(getToggleButtonIcon(!button.isSelected()));
}
/**
* Update Style.
*/
@Override
public void updateStyle(Style style) {
if (style == null) {
return;
}
FRFont frFont = style.getFRFont();
if (frFont == null) {
return;
}
createToolBarComponent().setSelected(isStyle(frFont));
}
protected boolean isStyle(FRFont frFont) {
return frFont.isBold();
@ -95,7 +87,7 @@ public class ReportFontBoldAction extends AbstractStyleAction implements ToggleB
@Override
public UIToggleButton createToolBarComponent() {
if (button == null) {
button = GUICoreUtils.createToolBarComponent(this);
button = GUICoreUtils.createToolBarComponentWhiteIcon(this);
button.setEventBannded(true);
}
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 {
private final static Icon blackIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png");
private final static Icon whiteIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic_white.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")};
public ReportFontItalicAction(ElementCasePane t) {
super(t);
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);
}
protected Icon getToggleButtonIcon(boolean isSelected) {
return isSelected ? blackIcon : whiteIcon;
}
protected boolean isStyle(FRFont frFont) {
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 {
private final static Icon blackIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline.png");
private final static Icon whiteIcon = BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/underline_white.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")};
public ReportFontUnderlineAction(ElementCasePane t) {
super(t);
this.setName(Inter.getLocText("FRFont-Underline"));
this.setSmallIcon(blackIcon);
this.setSmallIcon(ICONS, true);
}
protected void setSelectedFont (Style style) {
@ -36,9 +35,6 @@ public class ReportFontUnderlineAction extends ReportFontBoldAction {
this.style = StyleUtils.setReportFontUnderline(style, false);
}
protected Icon getToggleButtonIcon(boolean isSelected) {
return isSelected ? blackIcon : whiteIcon;
}
protected boolean isStyle(FRFont frFont) {
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;
import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList;
import com.fr.base.Style;
import com.fr.base.chart.BaseChartCollection;
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.general.FRLogger;
import com.fr.general.Inter;
import com.fr.grid.Grid;
import com.fr.grid.selection.FloatSelection;
import com.fr.report.ReportHelper;
import com.fr.report.cell.FloatElement;
import com.fr.report.elementcase.TemplateElementCase;
import com.fr.stable.Constants;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.unit.FU;
import com.fr.stable.unit.OLDPIX;
import javax.swing.*;
@ -85,11 +90,31 @@ public class ChartFloatAction extends ElementCaseAction {
FloatElement newFloatElement;
try {
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.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();
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));

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

@ -4,6 +4,7 @@
package com.fr.design.actions.insert.flot;
import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList;
import com.fr.base.ScreenResolution;
import com.fr.design.actions.ElementCaseAction;
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.report.SelectImagePane;
import com.fr.general.Inter;
import com.fr.grid.Grid;
import com.fr.grid.selection.FloatSelection;
import com.fr.report.ReportHelper;
import com.fr.report.cell.FloatElement;
import com.fr.report.cell.cellattr.CellImage;
import com.fr.report.elementcase.TemplateElementCase;
import com.fr.stable.CoreGraphHelper;
import com.fr.stable.unit.FU;
@ -87,12 +91,33 @@ public class ImageFloatAction extends ElementCaseAction {
CoreGraphHelper.waitForImage(image);
floatElement.setValue(image);
int resolution = ScreenResolution.getScreenResolution();
Grid grid = reportPane.getGrid();
int resolution = grid.getResolution();
floatElement.setWidth(FU.valueOfPix(image.getWidth(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());
reportPane.addFloatElementToCenterOfElementPane(floatElement);
// reportPane.addFloatElementToCenterOfElementPane(floatElement);
reportPane.getEditingElementCase().addFloatElement(floatElement);
reportPane.setSelection(new FloatSelection(floatElement.getName()));
returnValue = true;

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

@ -1,5 +1,6 @@
package com.fr.design.cell.bar;
import com.fr.design.constants.UIConstants;
import com.fr.general.ComparatorUtils;
import javax.swing.*;
@ -63,48 +64,16 @@ public class DynamicScrollButton extends BasicArrowButton {
private void paintArrow(Graphics g, Dimension size) {
switch (direction) {
case SwingConstants.NORTH:
g.drawLine(8, 5, 8, 5);
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);
g.drawImage(UIConstants.ARROW_NORTH, 0, 0, this);
break;
case SwingConstants.SOUTH:
g.drawLine(5, 6, 5, 6);
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);
g.drawImage(UIConstants.ARROW_SOUTH, 0, 0, this);
break;
case SwingConstants.EAST:
g.drawLine(6, 5, 6, 5);
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);
g.drawImage(UIConstants.ARROW_EAST, 0, 0, this);
break;
case SwingConstants.WEST:
g.drawLine(4, 8, 4, 8);
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);
g.drawImage(UIConstants.ARROW_WEST, 0, 0, this);
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;
public AlphaFinePane() {
setPreferredSize(new Dimension(24,24));
setLayout(new BorderLayout());
if (DesignerEnvManager.getEnvManager().getAlphaFineConfigManager().isEnabled()) {
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;
import com.fr.base.FRContext;
import com.fr.base.FRCoreContext;
import com.fr.general.*;
import com.fr.general.ComparatorUtils;
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.json.JSONException;
import com.fr.json.JSONObject;
import com.fr.license.function.VT4FR;
import com.fr.stable.CodeUtils;
import com.fr.stable.EnvChangedListener;
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() {

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

@ -1,415 +1,415 @@
package com.fr.design.module;
import com.fr.base.*;
import com.fr.base.io.XMLEncryptUtils;
import com.fr.base.process.ProcessOperator;
import com.fr.base.remote.RemoteDeziConstants;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.insert.cell.*;
import com.fr.design.actions.insert.flot.ChartFloatAction;
import com.fr.design.actions.insert.flot.FormulaFloatAction;
import com.fr.design.actions.insert.flot.ImageFloatAction;
import com.fr.design.actions.insert.flot.TextBoxFloatAction;
import com.fr.design.actions.server.StyleListAction;
import com.fr.design.fun.ElementUIProvider;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.javascript.ProcessTransitionAdapter;
import com.fr.design.mainframe.*;
import com.fr.design.mainframe.bbs.BBSGuestPane;
import com.fr.design.mainframe.form.FormECCompositeProvider;
import com.fr.design.mainframe.form.FormECDesignerProvider;
import com.fr.design.mainframe.form.FormElementCaseDesigner;
import com.fr.design.mainframe.form.FormReportComponentComposite;
import com.fr.design.mainframe.loghandler.DesignerLogImpl;
import com.fr.design.parameter.WorkBookParameterReader;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.file.FILE;
import com.fr.general.*;
import com.fr.general.xml.GeneralXMLTools;
import com.fr.io.importer.Excel2007ReportImporter;
import com.fr.io.importer.ExcelReportImporter;
import com.fr.main.impl.WorkBook;
import com.fr.quickeditor.ChartQuickEditor;
import com.fr.quickeditor.cellquick.*;
import com.fr.quickeditor.floatquick.FloatImageQuickEditor;
import com.fr.quickeditor.floatquick.FloatStringQuickEditor;
import com.fr.report.cell.CellElementValueConverter;
import com.fr.report.cell.cellattr.core.RichText;
import com.fr.report.cell.cellattr.core.SubReport;
import com.fr.report.cell.cellattr.core.group.DSColumn;
import com.fr.report.cell.painter.BiasTextPainter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.fun.LogProvider;
import com.fr.stable.script.CalculatorProviderContext;
import com.fr.stable.script.ValueConverter;
import com.fr.stable.web.ServletContext;
import com.fr.stable.web.ServletContextAdapter;
import com.fr.stable.xml.ObjectTokenizer;
import com.fr.stable.xml.ObjectXMLWriterFinder;
import com.fr.start.BBSGuestPaneProvider;
import com.fr.xml.ReportXMLUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Set;
public class DesignerModule extends DesignModule {
static {
ServletContext.addServletContextListener(new ServletContextAdapter() {
public void onServletStart() {
ModuleContext.startModule(DesignerModule.class.getName());
}
});
}
/**
* 启动设计器模块
*/
public void start() {
super.start();
justStartModules4Engine();
justStartModules4Designer();
CalculatorProviderContext.setValueConverter(valueConverter());
GeneralXMLTools.Object_Tokenizer = startXMLReadObjectTokenizer();
GeneralXMLTools.Object_XML_Writer_Finder = startObjectXMLWriterFinder();
addAdapterForPlate();
registerCellEditor();
registerFloatEditor();
registerData4Form();
registerOtherPane();
InformationCollector.getInstance().collectStartTime();
ExtraDesignClassManager.getInstance().getFeedback().didFeedback();
StableFactory.registerMarkedObject(LogProvider.MARK_STRING, DesignerLogImpl.getInstance());
}
private void registerOtherPane() {
StableFactory.registerMarkedClass(BBSGuestPaneProvider.XML_TAG, BBSGuestPane.class);
}
/**
* kunsnat:注册单元格选中Editor
*/
private void registerCellEditor() {
ActionFactory.registerCellEditor(String.class, CellStringQuickEditor.class);
ActionFactory.registerCellEditor(Number.class, CellStringQuickEditor.class);
ActionFactory.registerCellEditor(Formula.class, CellFormulaQuickEditor.class);
ActionFactory.registerCellEditor(SubReport.class, CellSubReportEditor.class);
ActionFactory.registerCellEditor(RichText.class, CellRichTextEditor.class);
ActionFactory.registerCellEditor(DSColumn.class, CellDSColumnEditor.class);
ActionFactory.registerCellEditor(Image.class, CellImageQuickEditor.class);
ActionFactory.registerCellEditor(BiasTextPainter.class, CellBiasTextPainterEditor.class);
ActionFactory.registerCellEditor(BufferedImage.class, CellImageQuickEditor.class);
ActionFactory.registerChartCellEditorInEditor(ChartQuickEditor.class);
Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING);
for (ElementUIProvider provider : providers) {
ActionFactory.registerCellEditor(provider.targetObjectClass(), provider.quickEditor());
}
}
public String getInterNationalName() {
return Inter.getLocText("FR-Module_Designer");
}
/**
* kunnat: 注册悬浮选中Editor
*/
private void registerFloatEditor() {
ActionFactory.registerFloatEditor(String.class, FloatStringQuickEditor.class);
ActionFactory.registerFloatEditor(Formula.class, FloatStringQuickEditor.class);
FloatImageQuickEditor floatImageQuickEditor = new FloatImageQuickEditor();
ActionFactory.registerFloatEditor(Image.class, FloatImageQuickEditor.class);
ActionFactory.registerFloatEditor(BufferedImage.class, FloatImageQuickEditor.class);
ActionFactory.registerChartFloatEditorInEditor(ChartQuickEditor.class);
}
/**
* kunsnat: 一些模块信息 必须跟随设计器启动,
* 比如 读取CC.XML, 设计器启动之后, 马上会读取XML, 需要Chart_Module中的注册信息
*/
private void justStartModules4Engine() {
ModuleContext.startModule(ENGINE_MODULE);
}
private void justStartModules4Designer() {
ModuleContext.startModule(CHART_DESIGNER_MODULE);
ModuleContext.startModule(FORM_DESIGNER_MODULE);
}
/**
* CellElementValueConverter用来处理设计器格子里的值将公式/数组/其他元素转换成对应的值
*
* @return 返回处理格子值的转换器
*/
public ValueConverter valueConverter() {
return new CellElementValueConverter();
}
@Override
/*
* 针对不同的对象在读取Object对象的xml的时候需要使用不同的对象生成器
* @return 返回对象生成器
*/
public ObjectTokenizer startXMLReadObjectTokenizer() {
return new ReportXMLUtils.ReportObjectTokenizer();
}
/**
* 针对不同的对象在写对象的XML时需要使用不同的XML生成器
*
* @return 返回xml生成器
*/
@Override
public ObjectXMLWriterFinder startObjectXMLWriterFinder() {
return new ReportXMLUtils.ReportObjectXMLWriterFinder();
}
//wei:fs的模块中可能有需要设计器界面做设置的地方,在这边添加
private void addAdapterForPlate() {
ProcessTransitionAdapter.setProcessTransitionAdapter(new ProcessTransitionAdapter() {
@Override
protected String[] getTransitionNamesByBook(String book) {
return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getTransitionNamesByBook(book);
}
@Override
protected String[] getParaNames(String book) {
return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getParaNames(book);
}
@Override
protected ParameterProvider[] getParas(String book) {
return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getParas(book);
}
protected MultiFieldParameter[] getAllMultiFieldParas(String book) {
return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getAllMultiFieldParas(book);
}
});
}
private static abstract class AbstractWorkBookApp implements App<WorkBook> {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public JTemplate<WorkBook, ?> openTemplate(FILE tplFile) {
return new JWorkBook(asIOFile(tplFile), tplFile);
}
@Override
public String mark4Provider() {
return getClass().getName();
}
@Override
public void process() {
}
@Override
public void undo() {
}
}
@Override
/*
* 返回设计器能打开的模板类型的一个数组列表
* @return 可以打开的模板类型的数组
*/
public App[] apps4TemplateOpener() {
return new App[]{getCptApp(), getXlsApp(), getXlsxApp()};
}
private AbstractWorkBookApp getXlsxApp() {
return new AbstractWorkBookApp() {
@Override
public String[] defaultExtentions() {
return new String[]{"xlsx"};
}
@Override
public WorkBook asIOFile(FILE tplFile) {
WorkBook workbook = null;
try {
workbook = new Excel2007ReportImporter().generateWorkBookByStream(tplFile.asInputStream());
} catch (Exception exp) {
FRContext.getLogger().error("Failed to generate xlsx from " + tplFile, exp);
}
return workbook;
}
};
}
private AbstractWorkBookApp getXlsApp() {
return new AbstractWorkBookApp() {
@Override
public String[] defaultExtentions() {
return new String[]{"xls"};
}
@Override
public WorkBook asIOFile(FILE tplFile) {
WorkBook workbook = null;
try {
workbook = new ExcelReportImporter().generateWorkBookByStream(tplFile.asInputStream());
} catch (Exception exp) {
FRContext.getLogger().error("Failed to generate xls from " + tplFile, exp);
}
return workbook;
}
};
}
private AbstractWorkBookApp getCptApp() {
return new AbstractWorkBookApp() {
public String[] defaultExtentions() {
return new String[]{"cpt"};
}
public WorkBook asIOFile(FILE file) {
if (XMLEncryptUtils.isCptEncoded() &&
!XMLEncryptUtils.checkVaild(DesignerEnvManager.getEnvManager().getEncryptionKey())) {
if (!new DecodeDialog(file).isPwdRight()) {
FRContext.getLogger().error(Inter.getLocText("ECP-error_pwd"));
return new WorkBook();
}
}
WorkBook tpl = new WorkBook();
// richer:打开报表通知
FRContext.getLogger().info(Inter.getLocText(new String[]{"LOG-Is_Being_Openned", "LOG-Please_Wait"}, new String[]{"\"" + file.getName() + "\"" + ",", "..."}));
TempNameStyle namestyle = TempNameStyle.getInstance();
namestyle.clear();
String checkStr = StringUtils.EMPTY;
try {
checkStr = IOUtils.inputStream2String(file.asInputStream());
tpl.readStream(file.asInputStream());
} catch (Exception exp) {
String errorMessage = StringUtils.EMPTY;
errorMessage = ComparatorUtils.equals(RemoteDeziConstants.INVALID_USER, checkStr) ? Inter.getLocText("FR-Designer_No-Privilege")
: Inter.getLocText("NS-exception_readError");
FRContext.getLogger().error(errorMessage + file, exp);
}
checkNameStyle(namestyle);
return tpl;
}
};
}
private static void checkNameStyle(TempNameStyle namestyle) {
Iterator it = namestyle.getIterator();
ArrayList<String> al = new ArrayList<String>();
while (it.hasNext()) {
al.add((String) it.next());
}
if (!al.isEmpty()) {
showConfirmDialog(al);
}
}
private static void showConfirmDialog(final ArrayList<String> namelist) {
final JDialog jd = new JDialog();
// 模态一下,因为可能会多个样式丢失
// jd.setModal(true);
jd.setAlwaysOnTop(true);
jd.setSize(450, 150);
jd.setResizable(false);
jd.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png"));
String message = namelist.toString().replaceAll("\\[", "").replaceAll("\\]", "");
UILabel jl = new UILabel(Inter.getLocText(new String[]{"Current_custom_global", "Has_been_gone"}, new String[]{message}));
jl.setHorizontalAlignment(SwingConstants.CENTER);
jd.add(jl, BorderLayout.CENTER);
JPanel jp = new JPanel();
// ”是“按钮,点击之后将生成一个全局样式,并写入xml
UIButton confirmButton = new UIButton(Inter.getLocText("FR-Designer_Yes"));
confirmButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
for (int i = 0; i < namelist.size(); i++) {
ConfigManager.getProviderInstance().putStyle(namelist.get(i), Style.DEFAULT_STYLE);
FRContext.getCurrentEnv().writeResource(ConfigManager.getProviderInstance());
}
} catch (Exception ex) {
FRLogger.getLogger().error(ex.getMessage());
}
jd.dispose();
new StyleListAction().actionPerformed(e);// 弹窗
}
});
UIButton noButton = new UIButton(Inter.getLocText("FR-Designer_No"));
noButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
jd.dispose();
}
});
jp.add(confirmButton);
jp.add(noButton);
jd.setTitle(Inter.getLocText("FR-Custom_styles_lost"));
jd.add(jp, BorderLayout.SOUTH);
GUICoreUtils.centerWindow(jd);
jd.setVisible(true);
}
public Class<?>[] actionsForInsertCellElement() {
return (Class<?>[]) ArrayUtils.addAll(new Class<?>[]{
DSColumnCellAction.class,
GeneralCellAction.class,
RichTextCellAction.class,
FormulaCellAction.class,
ChartCellAction.class,
ImageCellAction.class,
BiasCellAction.class,
SubReportCellAction.class
}, super.actionsForInsertCellElement());
}
public Class<?>[] actionsForInsertFloatElement() {
return (Class<?>[]) ArrayUtils.addAll(new Class<?>[]{
TextBoxFloatAction.class,
FormulaFloatAction.class,
ChartFloatAction.class,
ImageFloatAction.class
}, super.actionsForInsertFloatElement());
}
private void registerData4Form() {
StableFactory.registerMarkedClass(FormECDesignerProvider.XML_TAG, FormElementCaseDesigner.class);
StableFactory.registerMarkedClass(FormECCompositeProvider.XML_TAG, FormReportComponentComposite.class);
DesignModuleFactory.registerParameterReader(new WorkBookParameterReader());
}
package com.fr.design.module;
import com.fr.base.*;
import com.fr.base.io.XMLEncryptUtils;
import com.fr.base.process.ProcessOperator;
import com.fr.base.remote.RemoteDeziConstants;
import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.actions.insert.cell.*;
import com.fr.design.actions.insert.flot.ChartFloatAction;
import com.fr.design.actions.insert.flot.FormulaFloatAction;
import com.fr.design.actions.insert.flot.ImageFloatAction;
import com.fr.design.actions.insert.flot.TextBoxFloatAction;
import com.fr.design.actions.server.StyleListAction;
import com.fr.design.fun.ElementUIProvider;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.javascript.ProcessTransitionAdapter;
import com.fr.design.mainframe.*;
import com.fr.design.mainframe.bbs.BBSGuestPane;
import com.fr.design.mainframe.form.FormECCompositeProvider;
import com.fr.design.mainframe.form.FormECDesignerProvider;
import com.fr.design.mainframe.form.FormElementCaseDesigner;
import com.fr.design.mainframe.form.FormReportComponentComposite;
import com.fr.design.mainframe.loghandler.DesignerLogImpl;
import com.fr.design.parameter.WorkBookParameterReader;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.file.FILE;
import com.fr.general.*;
import com.fr.general.xml.GeneralXMLTools;
import com.fr.io.importer.Excel2007ReportImporter;
import com.fr.io.importer.ExcelReportImporter;
import com.fr.main.impl.WorkBook;
import com.fr.quickeditor.chartquick.BasicChartQuickEditor;
import com.fr.quickeditor.chartquick.FloatChartQuickEditor;
import com.fr.quickeditor.cellquick.*;
import com.fr.quickeditor.floatquick.FloatImageQuickEditor;
import com.fr.quickeditor.floatquick.FloatStringQuickEditor;
import com.fr.report.cell.CellElementValueConverter;
import com.fr.report.cell.cellattr.core.RichText;
import com.fr.report.cell.cellattr.core.SubReport;
import com.fr.report.cell.cellattr.core.group.DSColumn;
import com.fr.report.cell.painter.BiasTextPainter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.ParameterProvider;
import com.fr.stable.StringUtils;
import com.fr.stable.bridge.StableFactory;
import com.fr.stable.fun.LogProvider;
import com.fr.stable.script.CalculatorProviderContext;
import com.fr.stable.script.ValueConverter;
import com.fr.stable.web.ServletContext;
import com.fr.stable.web.ServletContextAdapter;
import com.fr.stable.xml.ObjectTokenizer;
import com.fr.stable.xml.ObjectXMLWriterFinder;
import com.fr.start.BBSGuestPaneProvider;
import com.fr.xml.ReportXMLUtils;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Set;
public class DesignerModule extends DesignModule {
static {
ServletContext.addServletContextListener(new ServletContextAdapter() {
public void onServletStart() {
ModuleContext.startModule(DesignerModule.class.getName());
}
});
}
/**
* 启动设计器模块
*/
public void start() {
super.start();
justStartModules4Engine();
justStartModules4Designer();
CalculatorProviderContext.setValueConverter(valueConverter());
GeneralXMLTools.Object_Tokenizer = startXMLReadObjectTokenizer();
GeneralXMLTools.Object_XML_Writer_Finder = startObjectXMLWriterFinder();
addAdapterForPlate();
registerCellEditor();
registerFloatEditor();
registerData4Form();
registerOtherPane();
InformationCollector.getInstance().collectStartTime();
ExtraDesignClassManager.getInstance().getFeedback().didFeedback();
StableFactory.registerMarkedObject(LogProvider.MARK_STRING, DesignerLogImpl.getInstance());
}
private void registerOtherPane() {
StableFactory.registerMarkedClass(BBSGuestPaneProvider.XML_TAG, BBSGuestPane.class);
}
/**
* kunsnat:注册单元格选中Editor
*/
private void registerCellEditor() {
ActionFactory.registerCellEditor(String.class, CellStringQuickEditor.class);
ActionFactory.registerCellEditor(Number.class, CellStringQuickEditor.class);
ActionFactory.registerCellEditor(Formula.class, CellFormulaQuickEditor.class);
ActionFactory.registerCellEditor(SubReport.class, CellSubReportEditor.class);
ActionFactory.registerCellEditor(RichText.class, CellRichTextEditor.class);
ActionFactory.registerCellEditor(DSColumn.class, CellDSColumnEditor.class);
ActionFactory.registerCellEditor(Image.class, CellImageQuickEditor.class);
ActionFactory.registerCellEditor(BiasTextPainter.class, CellBiasTextPainterEditor.class);
ActionFactory.registerCellEditor(BufferedImage.class, CellImageQuickEditor.class);
ActionFactory.registerChartCellEditorInEditor(BasicChartQuickEditor.class);
Set<ElementUIProvider> providers = ExtraDesignClassManager.getInstance().getArray(ElementUIProvider.MARK_STRING);
for (ElementUIProvider provider : providers) {
ActionFactory.registerCellEditor(provider.targetObjectClass(), provider.quickEditor());
}
}
public String getInterNationalName() {
return Inter.getLocText("FR-Module_Designer");
}
/**
* kunnat: 注册悬浮选中Editor
*/
private void registerFloatEditor() {
ActionFactory.registerFloatEditor(String.class, FloatStringQuickEditor.class);
ActionFactory.registerFloatEditor(Formula.class, FloatStringQuickEditor.class);
ActionFactory.registerFloatEditor(Image.class, FloatImageQuickEditor.class);
ActionFactory.registerFloatEditor(BufferedImage.class, FloatImageQuickEditor.class);
ActionFactory.registerChartFloatEditorInEditor(FloatChartQuickEditor.class);
}
/**
* kunsnat: 一些模块信息 必须跟随设计器启动,
* 比如 读取CC.XML, 设计器启动之后, 马上会读取XML, 需要Chart_Module中的注册信息
*/
private void justStartModules4Engine() {
ModuleContext.startModule(ENGINE_MODULE);
}
private void justStartModules4Designer() {
ModuleContext.startModule(CHART_DESIGNER_MODULE);
ModuleContext.startModule(FORM_DESIGNER_MODULE);
}
/**
* CellElementValueConverter用来处理设计器格子里的值将公式/数组/其他元素转换成对应的值
*
* @return 返回处理格子值的转换器
*/
public ValueConverter valueConverter() {
return new CellElementValueConverter();
}
@Override
/*
* 针对不同的对象在读取Object对象的xml的时候需要使用不同的对象生成器
* @return 返回对象生成器
*/
public ObjectTokenizer startXMLReadObjectTokenizer() {
return new ReportXMLUtils.ReportObjectTokenizer();
}
/**
* 针对不同的对象在写对象的XML时需要使用不同的XML生成器
*
* @return 返回xml生成器
*/
@Override
public ObjectXMLWriterFinder startObjectXMLWriterFinder() {
return new ReportXMLUtils.ReportObjectXMLWriterFinder();
}
//wei:fs的模块中可能有需要设计器界面做设置的地方,在这边添加
private void addAdapterForPlate() {
ProcessTransitionAdapter.setProcessTransitionAdapter(new ProcessTransitionAdapter() {
@Override
protected String[] getTransitionNamesByBook(String book) {
return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getTransitionNamesByBook(book);
}
@Override
protected String[] getParaNames(String book) {
return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getParaNames(book);
}
@Override
protected ParameterProvider[] getParas(String book) {
return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getParas(book);
}
protected MultiFieldParameter[] getAllMultiFieldParas(String book) {
return StableFactory.getMarkedObject(ProcessOperator.MARK_STRING, ProcessOperator.class, ProcessOperator.EMPTY).getAllMultiFieldParas(book);
}
});
}
private static abstract class AbstractWorkBookApp implements App<WorkBook> {
@Override
public int currentAPILevel() {
return CURRENT_LEVEL;
}
@Override
public JTemplate<WorkBook, ?> openTemplate(FILE tplFile) {
return new JWorkBook(asIOFile(tplFile), tplFile);
}
@Override
public String mark4Provider() {
return getClass().getName();
}
@Override
public void process() {
}
@Override
public void undo() {
}
}
@Override
/*
* 返回设计器能打开的模板类型的一个数组列表
* @return 可以打开的模板类型的数组
*/
public App[] apps4TemplateOpener() {
return new App[]{getCptApp(), getXlsApp(), getXlsxApp()};
}
private AbstractWorkBookApp getXlsxApp() {
return new AbstractWorkBookApp() {
@Override
public String[] defaultExtentions() {
return new String[]{"xlsx"};
}
@Override
public WorkBook asIOFile(FILE tplFile) {
WorkBook workbook = null;
try {
workbook = new Excel2007ReportImporter().generateWorkBookByStream(tplFile.asInputStream());
} catch (Exception exp) {
FRContext.getLogger().error("Failed to generate xlsx from " + tplFile, exp);
}
return workbook;
}
};
}
private AbstractWorkBookApp getXlsApp() {
return new AbstractWorkBookApp() {
@Override
public String[] defaultExtentions() {
return new String[]{"xls"};
}
@Override
public WorkBook asIOFile(FILE tplFile) {
WorkBook workbook = null;
try {
workbook = new ExcelReportImporter().generateWorkBookByStream(tplFile.asInputStream());
} catch (Exception exp) {
FRContext.getLogger().error("Failed to generate xls from " + tplFile, exp);
}
return workbook;
}
};
}
private AbstractWorkBookApp getCptApp() {
return new AbstractWorkBookApp() {
public String[] defaultExtentions() {
return new String[]{"cpt"};
}
public WorkBook asIOFile(FILE file) {
if (XMLEncryptUtils.isCptEncoded() &&
!XMLEncryptUtils.checkVaild(DesignerEnvManager.getEnvManager().getEncryptionKey())) {
if (!new DecodeDialog(file).isPwdRight()) {
FRContext.getLogger().error(Inter.getLocText("ECP-error_pwd"));
return new WorkBook();
}
}
WorkBook tpl = new WorkBook();
// richer:打开报表通知
FRContext.getLogger().info(Inter.getLocText(new String[]{"LOG-Is_Being_Openned", "LOG-Please_Wait"}, new String[]{"\"" + file.getName() + "\"" + ",", "..."}));
TempNameStyle namestyle = TempNameStyle.getInstance();
namestyle.clear();
String checkStr = StringUtils.EMPTY;
try {
checkStr = IOUtils.inputStream2String(file.asInputStream());
tpl.readStream(file.asInputStream());
} catch (Exception exp) {
String errorMessage = StringUtils.EMPTY;
errorMessage = ComparatorUtils.equals(RemoteDeziConstants.INVALID_USER, checkStr) ? Inter.getLocText("FR-Designer_No-Privilege")
: Inter.getLocText("NS-exception_readError");
FRContext.getLogger().error(errorMessage + file, exp);
}
checkNameStyle(namestyle);
return tpl;
}
};
}
private static void checkNameStyle(TempNameStyle namestyle) {
Iterator it = namestyle.getIterator();
ArrayList<String> al = new ArrayList<String>();
while (it.hasNext()) {
al.add((String) it.next());
}
if (!al.isEmpty()) {
showConfirmDialog(al);
}
}
private static void showConfirmDialog(final ArrayList<String> namelist) {
final JDialog jd = new JDialog();
// 模态一下,因为可能会多个样式丢失
// jd.setModal(true);
jd.setAlwaysOnTop(true);
jd.setSize(450, 150);
jd.setResizable(false);
jd.setIconImage(BaseUtils.readImage("/com/fr/base/images/oem/logo.png"));
String message = namelist.toString().replaceAll("\\[", "").replaceAll("\\]", "");
UILabel jl = new UILabel(Inter.getLocText(new String[]{"Current_custom_global", "Has_been_gone"}, new String[]{message}));
jl.setHorizontalAlignment(SwingConstants.CENTER);
jd.add(jl, BorderLayout.CENTER);
JPanel jp = new JPanel();
// ”是“按钮,点击之后将生成一个全局样式,并写入xml
UIButton confirmButton = new UIButton(Inter.getLocText("FR-Designer_Yes"));
confirmButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
for (int i = 0; i < namelist.size(); i++) {
ConfigManager.getProviderInstance().putStyle(namelist.get(i), Style.DEFAULT_STYLE);
FRContext.getCurrentEnv().writeResource(ConfigManager.getProviderInstance());
}
} catch (Exception ex) {
FRLogger.getLogger().error(ex.getMessage());
}
jd.dispose();
new StyleListAction().actionPerformed(e);// 弹窗
}
});
UIButton noButton = new UIButton(Inter.getLocText("FR-Designer_No"));
noButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
jd.dispose();
}
});
jp.add(confirmButton);
jp.add(noButton);
jd.setTitle(Inter.getLocText("FR-Custom_styles_lost"));
jd.add(jp, BorderLayout.SOUTH);
GUICoreUtils.centerWindow(jd);
jd.setVisible(true);
}
public Class<?>[] actionsForInsertCellElement() {
return (Class<?>[]) ArrayUtils.addAll(new Class<?>[]{
DSColumnCellAction.class,
GeneralCellAction.class,
RichTextCellAction.class,
FormulaCellAction.class,
ChartCellAction.class,
ImageCellAction.class,
BiasCellAction.class,
SubReportCellAction.class
}, super.actionsForInsertCellElement());
}
public Class<?>[] actionsForInsertFloatElement() {
return (Class<?>[]) ArrayUtils.addAll(new Class<?>[]{
TextBoxFloatAction.class,
FormulaFloatAction.class,
ChartFloatAction.class,
ImageFloatAction.class
}, super.actionsForInsertFloatElement());
}
private void registerData4Form() {
StableFactory.registerMarkedClass(FormECDesignerProvider.XML_TAG, FormElementCaseDesigner.class);
StableFactory.registerMarkedClass(FormECCompositeProvider.XML_TAG, FormReportComponentComposite.class);
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.setLayout(FRGUIPaneFactory.createBorderLayout());
setComponentBg(this);
// formParaDesignEditor = new FormParaDesigner(new FormParameterUI());
paraDesignEditor = DesignModuleFactory.getFormParaDesigner();
if (paraDesignEditor == null) {
return;
}
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() {
@Override
public void targetModified(TargetModifiedEvent e) {
@ -93,7 +104,6 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
paraDesignEditor.addListener(this);
propertyChangeListener = new PropertyChangeAdapter() {
@Override
public void propertyChange() {
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() {
@Override
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
public void itemStateChanged(ItemEvent e) {
if (propertyChangeListener != null) {
@ -128,7 +132,6 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
}
});
setButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
@ -298,7 +301,7 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
*/
public void refreshParameter() {
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;
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.ScreenResolution;
import com.fr.design.constants.UIConstants;
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.
*/
@ -29,16 +26,16 @@ public class GridCorner extends BaseGridComponent {
this.addMouseListener(l);
this.addMouseMotionListener(l);
}
/**
* Paints component
*/
@Override
public void paintComponent(Graphics g) {
public void paintComponent(Graphics g) {
Graphics2D g2d = (Graphics2D) g;
ElementCasePane reportPane = this.getElementCasePane();
float time = (float)reportPane.getResolution()/ ScreenResolution.getScreenResolution();
float time = (float) reportPane.getResolution() / ScreenResolution.getScreenResolution();
//size
Dimension size = this.getSize();
Rectangle2D rect2D = new Rectangle2D.Double(0, 0, size.getWidth(), size.getHeight());
@ -50,9 +47,9 @@ public class GridCorner extends BaseGridComponent {
g2d.setPaint(reportPane.getBackground());
GraphHelper.fill(g2d, rect2D);
}
paintArc(g2d, size, time);
//画左边的边框线.
g2d.setColor(reportPane.getGridColumn().getSeparatorLineColor());
GraphHelper.drawLine(g2d, 0, 0, 0, size.getHeight());
@ -66,7 +63,7 @@ public class GridCorner extends BaseGridComponent {
* Gets the preferred size.
*/
@Override
public Dimension getPreferredSize() {
public Dimension getPreferredSize() {
ElementCasePane reportPane = this.getElementCasePane();
if (!reportPane.isColumnHeaderVisible() || !reportPane.isRowHeaderVisible()) {
@ -74,28 +71,31 @@ public class GridCorner extends BaseGridComponent {
}
return new Dimension(reportPane.getGridRow().getPreferredSize().width,
reportPane.getGridColumn().getPreferredSize().height);
reportPane.getGridColumn().getPreferredSize().height);
}
/**
* Gets corner background.
*/
@Override
public Color getBackground() {
public Color getBackground() {
return super.getBackground();
}
private void paintArc(Graphics2D g2d, Dimension size, float time) {
g2d.setColor(Color.gray);
int width = (int) (size.width - (16 * time));
int avgWidth = width / 3;
int height = (int) (size.height - (8 * time));
int avgHeight = height / 3;
for (int i = 0; i < 3; i ++) {
for (int j = 0; j < 3; j ++) {
GraphHelper.fillArc(g2d, (8 * time) + (i * avgWidth), (4 * time) + (j * avgHeight), 3, 3, 0, 360);
}
}
g2d.setColor(UIConstants.LINE_COLOR);
float height = 2 * time;
float width = 2 * time;
float hgap = 4 * time;
float vgap = 3 * time;
int x = (int) ((size.width - (hgap * 2 + width * 3)) / 2);
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);
UIExpandablePane boundsPane = WidgetBoundsPaneFactory.createAbsoluteBoundsPane(x, y, width, height);
this.add(boundsPane, BorderLayout.CENTER);
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
}
private void initListener(Container parentComponent) {

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

@ -1,166 +1,156 @@
/*
* Copyright(c) 2001-2010, FineReport Inc, All Rights Reserved.
*/
package com.fr.poly.creator;
import java.awt.*;
import java.awt.image.BufferedImage;
import javax.swing.*;
import com.fr.base.ScreenResolution;
import com.fr.design.DesignState;
import com.fr.design.designer.TargetComponent;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.chart.MiddleChartComponent;
import com.fr.design.menu.MenuDef;
import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef;
import com.fr.design.module.DesignModuleFactory;
import com.fr.design.selection.QuickEditor;
import com.fr.quickeditor.ChartQuickEditor;
import com.fr.report.poly.PolyChartBlock;
import com.fr.stable.unit.FU;
import com.fr.stable.unit.UNIT;
import com.fr.stable.unit.UnitRectangle;
/**
* @author richer
* @since 6.5.4 创建于2011-5-10
*/
public class ChartBlockCreator extends BlockCreator<PolyChartBlock> {
private MiddleChartComponent cpm;
private ChartBlockEditor editor;
//图表默认宽高330*240
private static final UNIT DEFAULT_WIDTH = FU.getInstance(12573000);
private static final UNIT DEFAULT_HEIGHT = FU.getInstance(9144000);
public ChartBlockCreator() {
}
public ChartBlockCreator(PolyChartBlock block) {
super(block);
}
public void setResolution(int resolution){
this.resolution = resolution;
}
/**
* 初始化
* @return 初始化的控件.
*/
public JComponent initMonitor() {
cpm = DesignModuleFactory.getChartComponent(getValue().getChartCollection());
cpm.setBorder(BorderFactory.createLineBorder(Color.lightGray));
return cpm;
}
public UnitRectangle getDefaultBlockBounds() {
return new UnitRectangle(UNIT.ZERO, UNIT.ZERO, DEFAULT_WIDTH, DEFAULT_HEIGHT);
}
@Override
public BlockEditor getEditor() {
if (editor == null) {
editor = new ChartBlockEditor(designer, this);
}
return editor;
}
@Override
public int getX(float 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);
}
editor.checkChartButtonsEnable();
}
@Override
public PolyChartBlock getValue() {
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];
}
/**
* 在Form的工具栏组
*
* @return 组件数组
*
* @date 2015-2-5-上午11:31:46
*
*/
public JComponent[] toolBarButton4Form() {
return new JComponent[0];
}
/**
* 目标的列表
* @return 返回列表.
*/
public MenuDef[] menus4Target() {
return new MenuDef[0];
}
public int getMenuState(){
return DesignState.POLY_SHEET;
}
/**
* 模板的Menu
* @return 模板的menu
*/
public ShortCut[] shortcut4TemplateMenu() {
return new ShortCut[0];
}
@Override
public PolyElementCasePane getEditingElementCasePane() {
return null;
}
@Override
public QuickEditor getQuickEditor(TargetComponent tc) {
ChartQuickEditor quitEditor = new ChartQuickEditor();
quitEditor.populate(tc);
return quitEditor;
}
package com.fr.poly.creator;
import com.fr.design.DesignState;
import com.fr.design.designer.TargetComponent;
import com.fr.design.gui.chart.MiddleChartComponent;
import com.fr.design.menu.MenuDef;
import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef;
import com.fr.design.module.DesignModuleFactory;
import com.fr.design.selection.QuickEditor;
import com.fr.quickeditor.chartquick.PolyChartQuickEditor;
import com.fr.report.poly.PolyChartBlock;
import com.fr.stable.unit.FU;
import com.fr.stable.unit.UNIT;
import com.fr.stable.unit.UnitRectangle;
import javax.swing.*;
import java.awt.*;
/**
* @author richer
* @since 6.5.4 创建于2011-5-10
*/
public class ChartBlockCreator extends BlockCreator<PolyChartBlock> {
private MiddleChartComponent cpm;
private ChartBlockEditor editor;
//图表默认宽高330*240
private static final UNIT DEFAULT_WIDTH = FU.getInstance(12573000);
private static final UNIT DEFAULT_HEIGHT = FU.getInstance(9144000);
public ChartBlockCreator() {
}
public ChartBlockCreator(PolyChartBlock block) {
super(block);
}
public void setResolution(int resolution) {
this.resolution = resolution;
}
/**
* 初始化
*
* @return 初始化的控件.
*/
public JComponent initMonitor() {
cpm = DesignModuleFactory.getChartComponent(getValue().getChartCollection());
cpm.setBorder(BorderFactory.createLineBorder(Color.lightGray));
return cpm;
}
public UnitRectangle getDefaultBlockBounds() {
return new UnitRectangle(UNIT.ZERO, UNIT.ZERO, DEFAULT_WIDTH, DEFAULT_HEIGHT);
}
@Override
public BlockEditor getEditor() {
if (editor == null) {
editor = new ChartBlockEditor(designer, this);
}
return editor;
}
@Override
public int getX(float 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);
}
editor.checkChartButtonsEnable();
}
@Override
public PolyChartBlock getValue() {
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];
}
/**
* 在Form的工具栏组
*
* @return 组件数组
* @date 2015-2-5-上午11:31:46
*/
public JComponent[] toolBarButton4Form() {
return new JComponent[0];
}
/**
* 目标的列表
*
* @return 返回列表.
*/
public MenuDef[] menus4Target() {
return new MenuDef[0];
}
public int getMenuState() {
return DesignState.POLY_SHEET;
}
/**
* 模板的Menu
*
* @return 模板的menu
*/
public ShortCut[] shortcut4TemplateMenu() {
return new ShortCut[0];
}
@Override
public PolyElementCasePane getEditingElementCasePane() {
return null;
}
@Override
public QuickEditor getQuickEditor(TargetComponent tc) {
PolyChartQuickEditor quitEditor = new PolyChartQuickEditor();
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 f = TableLayout.FILL;
double[] columnSize = {p, f};
double[] rowSize = {p, p};
JComponent centerBody = createCenterBody();
JPanel topContent = initTopContent();
if (isScrollAll()) {
double[] scrollAllRowSize = {p, p};
prepareScrollBar();
topContent.setBorder(BorderFactory.createMatteBorder(10, 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[]{centerBody, null}
};
leftContentPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, HGAP, VGAP);
leftContentPane = TableLayoutHelper.createGapTableLayoutPane(components, scrollAllRowSize, columnSize, HGAP, VGAP);
this.setLayout(new CellElementBarLayout(leftContentPane) {
@Override
public void layoutContainer(Container parent) {
@ -104,6 +104,7 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
this.add(scrollBar);
this.add(leftContentPane);
} else {
double[] scrollContentRowSize = {p, f};
topContent.setBorder(BorderFactory.createMatteBorder(10, 10, 0, 10, this.getBackground()));
centerBody.setBorder(BorderFactory.createMatteBorder(0, 0, 0, 0, this.getBackground()));
Component[][] components = new Component[][]{
@ -111,7 +112,7 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
new Component[]{centerBody, null}
};
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.
*/
public static DesignerEnvManager getEnvManager() {
return getEnvManager(true);
}
public static DesignerEnvManager getEnvManager(boolean needCheckEnv) {
if (designerEnvManager == null) {
designerEnvManager = new DesignerEnvManager();
try {
@ -162,14 +166,8 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
}
// james:如果没有env定义,要设置一个默认的
if (designerEnvManager.nameEnvMap.size() <= 0) {
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);
}
if (needCheckEnv) {
checkNameEnvMap();
}
GeneralContext.addEnvChangedListener(new EnvChangedListener() {
@ -187,6 +185,19 @@ public class DesignerEnvManager implements XMLReadable, XMLWriter {
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
*

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);
}
public void setSmallIcon(Icon[] smallIcon, boolean white) {
this.putValue(Action.SMALL_ICON, smallIcon);
}
/**
* 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 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 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;
@ -98,7 +98,7 @@ public class ActionFactory {
}
/**
* kunsnat: 图表注册 悬浮元素编辑器 , 因为ChartCollecion和ChartQuickEditor一个在Chart,一个在Designer, 所以分开注册.
* kunsnat: 图表注册 悬浮元素编辑器 , 因为ChartCollection和ChartQuickEditor一个在Chart,一个在Designer, 所以分开注册.
*
* @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.Env;
import com.fr.base.FRContext;
import com.fr.base.FRCoreContext;
import com.fr.dav.LocalEnv;
import com.fr.design.DesignerEnvManager;
import com.fr.design.actions.UpdateAction;
@ -118,7 +117,6 @@ public class SwitchExistEnv extends MenuDef {
return;
}
SignIn.signIn(selectedEnv);
FRCoreContext.resetBytes();
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshToolArea();
fireDSChanged();
} 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;
import com.fr.base.FRContext;
import com.fr.base.FRCoreContext;
import com.fr.general.VT4FR;
import com.fr.license.function.VT4FR;
import com.fr.stable.OperatingSystem;
import com.fr.stable.StringUtils;
import com.fr.stable.xml.XMLPrintWriter;
@ -75,7 +74,8 @@ public class AlphaFineConfigManager implements XMLable {
}
public static boolean isALPHALicAvailable() {
return FRContext.getCurrentEnv() != null && VT4FR.isLicAvailable(FRCoreContext.getBytes()) && VT4FR.ALPHA_FINE.support();
return FRContext.getCurrentEnv() != null && VT4FR.AlphaFine.support();
}
@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_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_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");
@ -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_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_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 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");

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.setPreferredSize(dim);
this.setBackgroundNonSelectionColor(UIConstants.TREE_BACKGROUND);
this.setForeground(UIConstants.FONT_COLOR);
this.setTextSelectionColor(Color.WHITE);
this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE);
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() {
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};
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) {
if (op != null) {
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.*;
public class VerticalChoosePane extends ChoosePane implements DesignerBean {
private static final int RIGHTBORDER = 5;
public VerticalChoosePane(Previewable previewable) {
this(previewable, -1);
@ -36,7 +37,7 @@ public class VerticalChoosePane extends ChoosePane implements DesignerBean {
JPanel rs = new JPanel(new BorderLayout(0, 0));
rs.add(tableNameComboBox, BorderLayout.CENTER);
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 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);

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

@ -65,9 +65,10 @@ public class ValueEditorPaneFactory {
* @return 返回公式编辑器面板
*/
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);
}
/**
* 创建基本的值编辑器面板
*
@ -138,11 +139,13 @@ public class ValueEditorPaneFactory {
/**
* 创建不带公式面板的pane
*
* @return 编辑器面板
*/
public static ValueEditorPane createBasicEditorWithoutFormulaPane(){
public static ValueEditorPane createBasicEditorWithoutFormulaPane() {
return createValueEditorPane(basicEditorsWithoutFormula(), StringUtils.EMPTY, StringUtils.EMPTY);
}
/**
* 创建NoCRNoColumn
*
@ -154,19 +157,22 @@ public class ValueEditorPaneFactory {
/**
* 创建数值编辑器
*
* @return 值编辑器
*/
public static ValueEditorPane createNumberValueEditorPane(){
public static ValueEditorPane createNumberValueEditorPane() {
return createValueEditorPane(numberEditors(), StringUtils.EMPTY, StringUtils.EMPTY);
}
/**
* 创建日期编辑器
*
* @return 值编辑器
*/
public static ValueEditorPane createDateValueEditorPane(){
public static ValueEditorPane createDateValueEditorPane() {
return createValueEditorPane(dateEditors(), StringUtils.EMPTY, StringUtils.EMPTY);
}
/**
* 根据参数paraUseType 创建编辑器类型.
*
@ -199,12 +205,12 @@ public class ValueEditorPaneFactory {
* @return 值编辑器
*/
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[]{
new TextEditor(),
new IntegerEditor(),
new SpinnerIntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Inter.getLocText("Date")),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(),
formulaEditor
};
@ -216,12 +222,12 @@ public class ValueEditorPaneFactory {
* @return 值编辑器
*/
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[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Inter.getLocText("Date")),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(),
formulaEditor,
new WidgetNameEditor(Inter.getLocText("Widget"))
@ -234,48 +240,50 @@ public class ValueEditorPaneFactory {
* @return 值编辑器
*/
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[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Inter.getLocText("Date")),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(),
formulaEditor,
new ParameterEditor(),
new ColumnRowEditor(Inter.getLocText("Cell"))
new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")),
new ColumnRowGroupEditor(Inter.getLocText("FR-Designer-Cell_Group"))
};
}
/**
* 带单元格组的编辑器
* @return 值编辑器
*/
public static Editor<?>[] extendedCellGroupEditors() {
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula"));
return new Editor[]{
new TextEditor(),
new IntegerEditor(),
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"))
};
}
/**
* 只有单元格和单元格组的编辑器
*
* @return 编辑器b
*/
public static Editor<?>[] cellGroupEditor() {
return new Editor[]{
new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")),
new ColumnRowGroupEditor(Inter.getLocText("FR-Designer-Cell_Group"))
};
}
/**
* URL的一些编辑器.
@ -301,8 +309,8 @@ public class ValueEditorPaneFactory {
public static Editor<?>[] dateEditors(String popupName, String textEditorValue) {
return new Editor[]{
new NoneEditor(textEditorValue, StringUtils.isEmpty(popupName) ? Inter.getLocText("None") : popupName),
new DateEditor(true, Inter.getLocText("Date")),
new FormulaEditor(Inter.getLocText("Parameter-Formula"))
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"))
};
}
@ -312,17 +320,17 @@ public class ValueEditorPaneFactory {
* @return 值编辑器
*/
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);
return new Editor[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Inter.getLocText("Date")),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(),
formulaEditor,
new ParameterEditor(),
new ColumnRowEditor(Inter.getLocText("Cell")),
new ColumnRowEditor(Inter.getLocText("FR-Designer_Cell")),
new ColumnSelectedEditor(),
//23328 allEditors中删除控件选项
// new WidgetNameEditor(Inter.getLocText("Widget"))
@ -331,14 +339,15 @@ public class ValueEditorPaneFactory {
/**
* 不带公式编辑器
*
* @return 编辑器不带公式
*/
public static Editor<?>[] basicEditorsWithoutFormula(){
public static Editor<?>[] basicEditorsWithoutFormula() {
return new Editor[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Inter.getLocText("Date")),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(),
};
}
@ -349,12 +358,12 @@ public class ValueEditorPaneFactory {
* @return 编辑器
*/
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[]{
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Inter.getLocText("Date")),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(),
formulaEditor,
new ParameterEditor(),
@ -363,10 +372,11 @@ public class ValueEditorPaneFactory {
/**
* 数值编辑器
* @return 编辑器
*
* @return 编辑器
*/
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[]{
new IntegerEditor(),
new DoubleEditor(),
@ -377,12 +387,13 @@ public class ValueEditorPaneFactory {
/**
* 日期编辑器
*
* @return 编辑器
*/
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[]{
new DateEditor(true, Inter.getLocText("Date")),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
formulaEditor,
new ParameterEditor(),
};
@ -394,14 +405,14 @@ public class ValueEditorPaneFactory {
* @return 存储过程的编辑器
*/
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);
return new Editor[]{
new CursorEditor(),
new TextEditor(),
new IntegerEditor(),
new DoubleEditor(),
new DateEditor(true, Inter.getLocText("Date")),
new DateEditor(true, Inter.getLocText("FR-Designer_Date")),
new BooleanEditor(),
formulaEditor
};
@ -419,10 +430,10 @@ public class ValueEditorPaneFactory {
list.add(new TextEditor());
list.add(new IntegerEditor());
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());
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("Parameter-Formula"));
FormulaEditor formulaEditor = new FormulaEditor(Inter.getLocText("FR-Designer_Parameter-Formula"));
formulaEditor.setEnabled(true);
list.add(formulaEditor);
@ -436,31 +447,31 @@ public class ValueEditorPaneFactory {
* @return 值编辑器
*/
private static List<Editor> createEditors4Chart(int paraUseType) {
if(paraUseType == ParameterTableModel.CHART_PIE_USE) {
return getPieEditor();
} else if(paraUseType == ParameterTableModel.CHART_MAP_USE) {
return getMapEditor();
} else if(paraUseType == ParameterTableModel.CHART_GIS_USE) {
return getGisEditor();
} else if(paraUseType == ParameterTableModel.CHART__XY_USE) {
return getXYEditor();
} else if(paraUseType == ParameterTableModel.CHART_BUBBLE_USE) {
return getBubbbleEdtor();
} else if(paraUseType == ParameterTableModel.CHART_NO_USE) {
return getChartNoUseEditor();
} else if(paraUseType == ParameterTableModel.CHART_METER_USE) {
return getMeterEditor();
} else if(paraUseType == ParameterTableModel.CHART_STOCK_USE) {
return getStockEditor();
} else if(paraUseType == ParameterTableModel.CHART_GANTT_USE) {
return getGanttEditor();
} else if(paraUseType == ParameterTableModel.FORM_ELEMENTCASE_USE) {
return getFormElementCaseEditor();
} else if(paraUseType == ParameterTableModel.FORM_CHART_USE) {
return getFormChartEditor();
}
else {
return getChartEditor();
switch (paraUseType) {
case ParameterTableModel.CHART_PIE_USE:
return getPieEditor();
case ParameterTableModel.CHART_MAP_USE:
return getMapEditor();
case ParameterTableModel.CHART_GIS_USE:
return getGisEditor();
case ParameterTableModel.CHART__XY_USE:
return getXYEditor();
case ParameterTableModel.CHART_BUBBLE_USE:
return getBubbbleEdtor();
case ParameterTableModel.CHART_NO_USE:
return getChartNoUseEditor();
case ParameterTableModel.CHART_METER_USE:
return getMeterEditor();
case ParameterTableModel.CHART_STOCK_USE:
return getStockEditor();
case ParameterTableModel.CHART_GANTT_USE:
return getGanttEditor();
case ParameterTableModel.FORM_ELEMENTCASE_USE:
return getFormElementCaseEditor();
case ParameterTableModel.FORM_CHART_USE:
return getFormChartEditor();
default:
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) {
super(value, Inter.getLocText("Parameter-Integer"));
super(value, Inter.getLocText("FR-Designer_Parameter_Integer"));
}
@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) {
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);
g2d.setPaint(new GradientPaint(1, 1, UIConstants.SELECT_TAB, 1, getHeight() - 1, UIConstants.SELECT_TAB));
//选了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 Color bgColor;
private boolean isShow;
private boolean isPressed = false;
private String title;
private Image image;
private int fontSize;
public void setPressed(boolean pressed) {
this.isPressed = pressed;
}
public void setShow(boolean isShow) {
this.isShow = isShow;
}
@ -60,7 +65,8 @@ public class HeaderPane extends JPanel {
private BufferedImage createPanelImage() {
BufferedImage panelImage = new BufferedImage(getWidth(), headHeight, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = panelImage.createGraphics();
g2d.setColor(UIConstants.COMPONENT_BACKGROUND_COLOR);
g2d.setColor(isPressed ? UIConstants.POPUP_TITLE_BACKGROUND : UIConstants.COMPONENT_BACKGROUND_COLOR);
headWidth = this.getWidth();
g2d.fillRect(0, 0, headWidth, headHeight);
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 {
public void mousePressed(MouseEvent e) {
@Override
public void mouseClicked(MouseEvent e) {
HeaderPane hp = (HeaderPane) e.getSource();
if (contentPanel.isShowing()) {
contentPanel.setVisible(false);
@ -67,9 +68,23 @@ public class UIExpandablePane extends JPanel {
contentPanel.setVisible(true);
hp.setShow(true);
}
hp.setPressed(false);
hp.getParent().validate();
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();
addItem.intoJToolBar(topToolBar);
topToolBar.validate();
this.controlUpdatePane = createControlUpdatePane();//REPORT-4841 刷新一下编辑面板
cardPane.add(controlUpdatePane, "EDIT");
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]
* @param icons
*/
@ -67,6 +67,18 @@ public class UIToggleButton extends UIButton implements GlobalNameObserver{
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){
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 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_DOT, (getWidth() - toolPaneHeight) / 2, 3, toolPaneHeight, 5, null);
g.drawImage(UIConstants.DRAG_BAR_LIGHT, 0, 0, getWidth(), getHeight(), null);
g.drawImage(UIConstants.DRAG_LINE, (getWidth() - toolPaneHeight) / 2, 3, toolPaneHeight, 5, null);
g.drawImage(upButton, 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) {
Image button;
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 (model == UIConstants.MODEL_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);
} 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 (model == UIConstants.MODEL_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;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.*;
import java.io.File;
import java.util.ArrayList;
import java.util.Arrays;
@ -107,7 +106,7 @@ public class EnvFileTree extends RefreshableJTree {
dim.height += 2;
this.setPreferredSize(dim);
this.setBackgroundNonSelectionColor(UIConstants.TREE_BACKGROUND);
this.setForeground(UIConstants.FONT_COLOR);
this.setTextSelectionColor(Color.WHITE);
this.setBackgroundSelectionColor(UIConstants.FLESH_BLUE);
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);
initTextRotationCombox();
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_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")};
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_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_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/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};
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"),

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
RoleName_Can_Not_Be_Null=RoleName_Can_Not_Be_Null
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=
FR-Hyperlink_ChartHyperlink=
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
HF-Move_Left=To the left
Cell_Group=Cell Group
FR-Designer-Cell_Group=Cell Group
Week=Week
PageSetup-Orientation=Orientation
M-Open_Recent=Open Recent
@ -1425,7 +1426,7 @@ Out_Thick_Border_Line=Out Thick Border Line
FR-App-File_Lookup_range=
ReportColumns-Columns_to=Columns to
Transparent=Transparent
Parameter-Integer=Integer
FR-Designer_Parameter_Integer=Integer
PDF-Print_Setting=PDF Print Setting
Server-Embedded_Server=Embedded Server
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
RoleName_Can_Not_Be_Null=Role name can not be null or duplicate
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
FR-Hyperlink_ChartHyperlink=Chart Hyperlink
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
HF-Move_Left=Left shift
Cell_Group=Cell Group
FR-Designer-Cell_Group=Cell Group
Week=Week
PageSetup-Orientation=Orientation
M-Open_Recent=Open Recent
@ -1427,7 +1428,7 @@ Out_Thick_Border_Line=Thick Border
FR-App-File_Lookup_range=Search range
ReportColumns-Columns_to=Split To
Transparent=Transparent
Parameter-Integer=Integer
FR-Designer_Parameter_Integer=Integer
PDF-Print_Setting=PDF Print Setting
Server-Embedded_Server=Built-in server
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
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
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
FR-Hyperlink_ChartHyperlink=\u30B0\u30E9\u30D5\u30CF\u30A4\u30D1\u30FC\u30EA\u30F3\u30AF
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
HF-Move_Left=\u5DE6\u3078\u79FB\u52D5\u3059\u308B
Cell_Group=\u30BB\u30EB\u7D44
FR-Designer-Cell_Group=\u30BB\u30EB\u7D44
Week=\u5468
PageSetup-Orientation=\u65B9\u5411
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
ReportColumns-Columns_to=\u306E\u3088\u3046\u306B\u6539\u5217\u3059\u308B
Transparent=\u900F\u660E
Parameter-Integer=\u6574\u6570\u578B
FR-Designer_Parameter_Integer=\u6574\u6570\u578B
PDF-Print_Setting=PDF\u5370\u5237\u8A2D\u5B9A
Server-Embedded_Server=\u5185\u8535\u30B5\u30FC\u30D0\u30FC
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
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
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
FR-Hyperlink_ChartHyperlink=\uCC28\uD2B8\uD558\uC774\uD37C\uB9C1\uD06C
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
HF-Move_Left=\uC67C\uCABD\uC73C\uB85C\uC774\uB3D9
Cell_Group=\uC140\uADF8\uB8F9
FR-Designer-Cell_Group=\uC140\uADF8\uB8F9
Week=\uC8FC
PageSetup-Orientation=\uBC29\uD5A5
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
ReportColumns-Columns_to=\uC140\uB098\uB204\uAE30
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
Server-Embedded_Server=\uB0B4\uC7A5\uB41C\uC11C\uBC84
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
RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8BB8\u4E3A\u7A7A\u4E14\u4E0D\u80FD\u91CD\u590D
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
FR-Hyperlink_ChartHyperlink=\u56FE\u8868\u8D85\u94FE
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
HF-Move_Left=\u5DE6\u79FB
Cell_Group=\u5355\u5143\u683C\u7EC4
FR-Designer-Cell_Group=\u5355\u5143\u683C\u7EC4
Week=\u5468
PageSetup-Orientation=\u65B9\u5411
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
ReportColumns-Columns_to=\u5206\u680F\u6210
Transparent=\u900F\u660E
Parameter-Integer=\u6574\u578B
FR-Designer_Parameter_Integer=\u6574\u578B
PDF-Print_Setting=PDF\u6253\u5370\u8BBE\u7F6E
Server-Embedded_Server=\u5167\u7F6E\u7684\u670D\u52A1\u5668
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
RoleName_Can_Not_Be_Null=\u89D2\u8272\u540D\u4E0D\u5141\u8A31\u70BA\u7A7A\u4E14\u4E0D\u80FD\u91CD\u8907
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
FR-Hyperlink_ChartHyperlink=\u5716\u8868\u8D85\u93C8
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
HF-Move_Left=\u5DE6\u79FB
Cell_Group=\u5132\u5B58\u683C\u7D44
FR-Designer-Cell_Group=\u5132\u5B58\u683C\u7D44
Week=\u5468
PageSetup-Orientation=\u65B9\u5411
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
ReportColumns-Columns_to=\u5206\u6B04\u6210
Transparent=\u900F\u660E
Parameter-Integer=\u6574\u578B
FR-Designer_Parameter_Integer=\u6574\u578B
PDF-Print_Setting=PDF\u5217\u5370\u8A2D\u5B9A
Server-Embedded_Server=\u5167\u7F6E\u7684\u4F3A\u670D\u5668
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.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.actions.help.alphafine.AlphaFineConfigManager;
import com.fr.design.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager;
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.itoolbar.UIToolbar;
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.toolbar.ToolBarMenuDock;
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.GeneralContext;
import com.fr.general.Inter;
import com.fr.general.env.EnvContext;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.manage.PluginFilter;
@ -233,11 +232,6 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
basePane.add(centerPane, BorderLayout.CENTER);
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.setBounds(0, 0, contentWidth, contentHeight);
@ -332,16 +326,17 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
}
private void refreshNorthEastPane(JPanel northEastPane, ToolBarMenuDock ad) {
northEastPane.removeAll();
northEastPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 0));
northEastPane.add(LogMessageBar.getInstance());
TitlePlaceProcessor processor = ExtraDesignClassManager.getInstance().getSingle(TitlePlaceProcessor.MARK_STRING);
if (processor == null) {
processor = new DefaultTitlePlace();
if (processor != null) {
processor.hold(northEastPane, LogMessageBar.getInstance(), ad.createBBSLoginPane());
}
processor.hold(northEastPane, LogMessageBar.getInstance(), ad.createBBSLoginPane());
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();
try {
EnvContext.fireBeforeSignOut();
currentEnv.signOut();
GeneralContext.fireEnvSignOutListener();
EnvContext.fireAfterSignOut();
} catch (Exception 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 {

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.io.IOFile;
import com.fr.base.iofileattr.TemplateIdAttrMark;
import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager;
@ -46,6 +47,7 @@ import com.fr.general.Inter;
import com.fr.stable.ArrayUtils;
import com.fr.stable.ProductConstants;
import com.fr.stable.StringUtils;
import com.fr.stable.core.UUID;
import com.fr.stable.project.ProjectConstants;
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 是否使用参数模板
*/
public void needAddTemplateId(boolean isUseParamTemplate) {
if (isUseParamTemplate && StringUtils.isEmpty(template.getTemplateID())) {
template.initTemplateID();
public void needAddTemplateIdAttr(boolean isUseParamTemplate) {
if (isUseParamTemplate && template.getAttrMark(TemplateIdAttrMark.XML_TAG) == null) {
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.ParameterUI;
import com.fr.design.mainframe.AuthorityEditPane;
import com.fr.design.mainframe.JTemplate;
import javax.swing.*;
import java.awt.*;
@ -31,6 +32,8 @@ public interface ParameterDesignerProvider {
void refreshParameter(ParaDefinitePane paraDefinitePane);
void refreshParameter(ParaDefinitePane paraDefinitePane, JTemplate jt);
boolean isWithQueryButton();
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.design.beans.FurtherBasicBeanPane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.constants.UIConstants;
import com.fr.design.editor.editor.FormulaEditor;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.TableLayout;
@ -47,13 +48,14 @@ public class FormulaDictPane extends FurtherBasicBeanPane<FormulaDictionary> {
double[] rowSize = {p, p, p};
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));
JPanel t = new JPanel(new BorderLayout());
t.add(tag, BorderLayout.CENTER);
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));
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;
}
/**
* 创建工具栏组件-反白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.EnvException;
import com.fr.base.FRContext;
import com.fr.base.FRCoreContext;
import com.fr.base.ModifiedTable;
import com.fr.base.Parameter;
import com.fr.base.StoreProcedureParameter;
@ -35,16 +34,16 @@ import com.fr.general.FRLogger;
import com.fr.general.IOUtils;
import com.fr.general.Inter;
import com.fr.general.LogRecordTime;
import com.fr.general.VT4FR;
import com.fr.general.http.HttpClient;
import com.fr.json.JSONArray;
import com.fr.json.JSONException;
import com.fr.json.JSONObject;
import com.fr.license.function.VT4FR;
import com.fr.regist.License;
import com.fr.share.ShareConstants;
import com.fr.stable.ArrayUtils;
import com.fr.stable.EncodeConstants;
import com.fr.stable.JavaCompileInfo;
import com.fr.stable.LicUtils;
import com.fr.stable.ProductConstants;
import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils;
@ -56,8 +55,7 @@ import com.fr.stable.xml.XMLTools;
import com.fr.stable.xml.XMLableReader;
import com.fr.web.ResourceConstants;
import javax.swing.JOptionPane;
import javax.swing.UIManager;
import javax.swing.*;
import javax.xml.transform.Source;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
@ -65,7 +63,7 @@ import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import java.awt.Component;
import java.awt.*;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@ -198,7 +196,7 @@ public class RemoteEnv extends AbstractEnv {
private String createUserID() throws EnvException {
// 如果登录之后userID还是null
if (this.userID == null) {
if (!VT4FR.REMOTE_DESIGN.support() && licNotSupport <= 0) {
if (!VT4FR.RemoteDesign.support() && licNotSupport <= 0) {
licNotSupport++;
JOptionPane.showMessageDialog(null, Inter.getLocText("FR-Lic_does_not_Support_Remote"));
}
@ -1438,7 +1436,6 @@ public class RemoteEnv extends AbstractEnv {
return;
}
SignIn.signIn(remoteEnv);
FRCoreContext.resetBytes();
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshToolArea();
} catch (Exception em) {
FRContext.getLogger().error(em.getMessage(), em);
@ -2036,7 +2033,7 @@ public class RemoteEnv extends AbstractEnv {
@Override
public String getLicName() {
return LicUtils.FILE_NAME;
return License.FILE_NAME;
}
@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.FRContext;
import com.fr.general.ComparatorUtils;
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 {
@ -33,8 +33,9 @@ public class SignIn {
return;
}
try {
GeneralContext.fireEnvSignOutListener();
EnvContext.fireBeforeSignOut();
lastSelectedEnv.signOut();
EnvContext.fireAfterSignOut();
} catch (Exception 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() {
//这两句的位置不能随便调换,因为会影响语言切换的问题
FRContext.setLanguage(DesignerEnvManager.getEnvManager().getLanguage());
FRContext.setLanguage(DesignerEnvManager.getEnvManager(false).getLanguage());
DesignerEnvManager.checkNameEnvMap();
}
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.FRCoreContext;
import com.fr.chart.base.ChartInternationalNameContentBean;
import com.fr.chart.chartattr.Chart;
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.utils.gui.GUICoreUtils;
import com.fr.general.Inter;
import com.fr.general.RegistEditionException;
import com.fr.general.VT4FR;
import com.fr.license.exception.RegistEditionException;
import com.fr.license.function.VT4FR;
import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
@ -159,7 +158,7 @@ public class ChartTypePane extends ChartCommonWizardPane {
if(chart.getPlot() != null){
if(chart.getPlot() instanceof MapPlot && !supportMap()){
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) {
@ -173,8 +172,7 @@ public class ChartTypePane extends ChartCommonWizardPane {
}
private boolean supportMap() {
byte[] bytes = FRCoreContext.getBytes();
return VT4FR.isLicAvailable(bytes) && VT4FR.CHART_MAP.support();
return VT4FR.ChartMap.support();
}
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) {
plot.setAutoRefreshPerSecond((int) autoRefreshTime.getValue());
} 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);
updateFormatsWithPaneWidth(attrTooltipContent);
htmlLabelPane.update(attrTooltipContent.getHtmlLabel());
return attrTooltipContent;
@ -241,4 +243,17 @@ public class VanChartTooltipContentPane extends BasicBeanPane<AttrTooltipContent
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() {
if (designer.getClass().equals(FormDesigner.class)) {
if (selection.getSelectedCreator() instanceof XWFitLayout) {
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);
}
}
pasteXWFitLayout();
} else {
//绝对布局
//编辑器外面还有两层容器,使用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();
if (roots.length > 0) {
boolean isInPara = true; // 在参数面板内删除控件
for (XCreator creator : roots) {
if (isInPara && !(creator.getParent() instanceof XWParameterLayout)) {
isInPara = false;
}
if (creator.acceptType(XWParameterLayout.class)) {
designer.removeParaComponent();
}
@ -236,8 +244,7 @@ public class SelectionModel {
// 清除被选中的组件
selection.reset();
}
setSelectedCreator(designer.getRootComponent());
FormSelectionUtils.rebuildSelection(designer);
setSelectedCreator(isInPara ? designer.getParaComponent() : designer.getRootComponent());
// 触发事件
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_DELETED);
designer.repaint();
@ -401,45 +408,57 @@ public class SelectionModel {
if (x < (bounds.x - XCreatorConstants.RESIZE_BOX_SIZ)) {
return Location.outer;
} else if ((x >= (bounds.x - XCreatorConstants.RESIZE_BOX_SIZ)) && (x <= bounds.x)) {
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 {
return Location.outer;
}
return getDirectionLeft(bounds, y);
} else if ((x > bounds.x) && (x < (bounds.x + bounds.width))) {
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;
}
return getDirectionCenter(bounds, y);
} else if ((x >= (bounds.x + bounds.width))
&& (x <= (bounds.x + bounds.width + XCreatorConstants.RESIZE_BOX_SIZ))) {
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.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;
}
return getDirectionRight(bounds, y);
} else {
return Location.outer;
}
}
private Direction getDirectionRight(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.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 {
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.properties.FormWidgetAuthorityEditPane;
import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.mainframe.AuthorityEditPane;
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.mainframe.*;
import com.fr.design.parameter.ParaDefinitePane;
import com.fr.design.parameter.ParameterDesignerProvider;
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 ADD_HEIGHT = 20;
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");
@ -175,12 +169,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
@Override
public void fireCreatorModified(DesignerEvent evt) {
if (evt.getCreatorEventID() == DesignerEvent.CREATOR_ADDED
|| 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) {
if (evt.getCreatorEventID() != DesignerEvent.CREATOR_SELECTED) {
paraDefinitePane.setParameterArray(
paraDefinitePane.getNoRepeatParas(DesignModelAdapter.getCurrentModelAdapter().getParameters()));
paraDefinitePane.refreshParameter();
@ -196,7 +185,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
*/
public Component createWrapper() {
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;
}
@ -224,6 +213,16 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
* @param 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();
java.util.List<String> namelist = getAllXCreatorNameList(rootContainer);
// parameterArray是报表的所有参数, nameList是已经在参数面板添加过控件的参数名
@ -240,8 +239,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
}
ParameterPropertyPane.getInstance().getParameterToolbarPane().populateBean(
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) {
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;
}
}
@ -617,7 +615,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
formSubmitButton.setWidgetName("Search");
formSubmitButton.setText(Inter.getLocText("FR-Designer_Query"));
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)))) {
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 ADD_HEIGHT = 20;
private static final int H_GAP = 105;
private static final int SUBMIT_BUTTON_H_LOCATION = 270;
public FormDesigner(Form form) {
this(form, null);
@ -257,7 +258,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
currentIndex++;
parameterArray = (Parameter[]) ArrayUtils.removeElement(parameterArray, parameter);
refreshParameter();
EastRegionContainerPane.getInstance().refreshDownPane();
fireTargetModified();
}
/**
@ -294,14 +295,14 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
formSubmitButton.setWidgetName("Search");
formSubmitButton.setText(Inter.getLocText("FR-Designer_Query"));
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)))) {
return;
}
currentIndex = currentIndex + NUM_IN_A_LINE - currentIndex % NUM_IN_A_LINE;
parameterArray = (Parameter[]) ArrayUtils.removeElement(parameterArray, parameter);
refreshParameter();
EastRegionContainerPane.getInstance().refreshDownPane();
fireTargetModified();
}
/**
@ -667,9 +668,8 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
// 只有选择组件时不触发模版更新,其他都要触发
if (evt.getCreatorEventID() != DesignerEvent.CREATOR_SELECTED) {
FormDesigner.this.fireTargetModified();
//bug59192
//setParameterArray(getNoRepeatParas(getTarget().getParameters()));
//refreshParameter();
setParameterArray(getNoRepeatParas(getTarget().getParameters()));
refreshParameter();
}
}
@ -1147,7 +1147,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
* 同步
*/
public void populateRootSize() {
// do nothing
}
/**
@ -1233,6 +1233,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
*/
@Override
public void stopEditing() {
// do nothing
}
/**
@ -1412,7 +1413,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
parent = parent.getParent();
}
Object[] components = path.toArray();
Object[] components = (Object[]) path.toArray();
if (components.length == 0) {
return null;
}

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

@ -147,6 +147,7 @@ public class FormWidgetDetailPane extends FormDockView{
private void initReuWidgetPanel() {
elCaseBindInfoList = ShareLoader.getLoader().getAllBindInfoList();
downPane = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList, false));
downPane.setBorder(null);
reuWidgetPanel.add(downPane);
}
@ -429,6 +430,7 @@ public class FormWidgetDetailPane extends FormDockView{
public void refreshDownPanel(boolean isEdit) {
reuWidgetPanel.remove(downPane);
downPane = new UIScrollPane(new ShareWidgetPane(elCaseBindInfoList, isEdit));
downPane.setBorder(null);
reuWidgetPanel.add(downPane);
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) {
if (comp == null) {
ParameterPropertyPane.getInstance().setAddParaPaneVisible(false);
ParameterPropertyPane.getInstance().setAddParaPaneVisible(false, this);
return;
}
ParameterPropertyPane.getInstance().setAddParaPaneVisible(comp instanceof XWParameterLayout);
ParameterPropertyPane.getInstance().setAddParaPaneVisible(isAddParaPaneVisible(comp), this);
editingComponent = comp.createToolPane(this, formDesign);
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.FORM);
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() {
return editingComponent;
}
@ -546,6 +556,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
//撤销的时候要重新选择的body布局
this.formDesign.getSelectionModel().setSelectedCreators(FormSelectionUtils.rebuildSelection(formDesign.getRootComponent(),
formDesign.getRootComponent() == selectedBodyLayout() ? u.getSelectWidgets() : new Widget[]{selectedBodyLayout().toData()}));
refreshToolArea();
} else {
String widgetName = this.formDesign.getElementCaseContainerName();
//这儿太坑了,u.getForm() 与 getTarget内容不一样
@ -718,7 +729,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.FORM);
EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(WidgetPropertyPane.getInstance(formDesign));
ParameterPropertyPane parameterPropertyPane = ParameterPropertyPane.getInstance(formDesign);
parameterPropertyPane.setAddParaPaneVisible(false);
parameterPropertyPane.setAddParaPaneVisible(false, this);
EastRegionContainerPane.getInstance().addParameterPane(parameterPropertyPane);
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.dialog.BasicScrollPane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.mainframe.FormDesigner;
import com.fr.design.mainframe.FormHierarchyTreePane;
import com.fr.design.mainframe.JForm;
import com.fr.design.mainframe.*;
import javax.swing.*;
import java.awt.*;
@ -87,18 +84,23 @@ public class ParameterPropertyPane extends JPanel{
}
// 显示或隐藏添加参数面板
public void refreshState(JTemplate jt) {
setAddParaPaneVisible(toolbarPane.hasSelectedLabelItem(), jt);
}
// 显示或隐藏添加参数面板
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) {
return;
}
// 表单中,只有添加并选中参数面板时,才显示
boolean hideInJForm;
try {
hideInJForm = DesignerContext.getDesignerFrame().getSelectedJTemplate() instanceof JForm &&
hideInJForm = jt instanceof JForm &&
!(FormHierarchyTreePane.getInstance().getComponentTree().getSelectionPath().getLastPathComponent() instanceof XWParameterLayout);
} catch (NullPointerException ex) {
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 WIDTH = 225;
private static final int L_H = 18;
private static final int LABEL_PADDING_LEFT = 4;
public ParameterToolBarPane() {
this.setLayout(new FlowParameterPaneLayout());
@ -47,9 +48,9 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
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.setBorder(BorderFactory.createEmptyBorder(0, 4, 0, 0));
label.setBorder(BorderFactory.createEmptyBorder(0, LABEL_PADDING_LEFT, 0, 0));
this.add(label);
addAll = new UIButton(Inter.getLocText("FR-Designer_Add_all"));
@ -68,7 +69,7 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
public Parameter getTargetParameter(UIButton button) {
int index = parameterSelectedLabellist.indexOf(button);
if(index < 0 || index > parameterList.length - 1) {
if (index < 0 || index > parameterList.length - 1) {
return null;
}
return parameterList[index];
@ -82,7 +83,6 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
this.add(label);
if (parameterArray.length == 0) {
ParameterPropertyPane.getInstance().refreshState();
this.setVisible(false);
this.repaint();
return;
@ -103,7 +103,6 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
this.add(addAll);
this.doLayout();
ParameterPropertyPane.getInstance().refreshState();
this.repaint();
}
@ -124,12 +123,15 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
private class FlowParameterPaneLayout implements LayoutManager {
public FlowParameterPaneLayout() {
// do nothing
}
public void addLayoutComponent(String name, Component comp) {
// do nothing
}
public void removeLayoutComponent(Component comp) {
// do nothing
}
public Dimension preferredLayoutSize(Container parent) {
@ -137,7 +139,7 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
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);
}
@ -155,7 +157,7 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
breakid = 1;
for (UIButton tab : parameterSelectedLabellist) {
Dimension dim = tab.getPreferredSize();
if(x + dim.width > width) {
if (x + dim.width > width) {
breakid++;
x = 0;
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.setUseParamsTemplate(useParamsTemplate.isSelected());
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
jTemplate.needAddTemplateId(useParamsTemplate.isSelected());
jTemplate.needAddTemplateIdAttr(useParamsTemplate.isSelected());
wParameterLayout.setBackground((Background) background.getValue());
wParameterLayout.setPosition((int)hAlignmentPane.getSelectedItem());
return wParameterLayout;

Loading…
Cancel
Save