Browse Source

Merge pull request #1818 in DESIGN/design from release/10.0 to feature/10.0

* commit 'a1d3ac858418bf370cc80600b0fff34430a019d3':
  REPORT-35387 参数面板已有控件的时候,点击右侧全部添加,控件重叠 代码格式调整
  REPORT-35387 参数面板已有控件的时候,点击右侧全部添加,控件重叠 删除打印语句
  REPORT-35387 参数面板已有控件的时候,点击右侧全部添加,控件重叠
  REPORT-35205 fix
  REPORT-35379 && REPORT-35205
  修改属性访问修饰符
  CHART-14598 雷达图增加线宽设置
research/11.0
superman 4 years ago
parent
commit
c8e8ec5367
  1. 4
      designer-base/src/main/java/com/fr/file/FILEChooserPane.java
  2. 22
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java
  3. 9
      designer-chart/src/main/java/com/fr/van/chart/designer/style/background/radar/VanChartRadarAlertValuePane.java
  4. 39
      designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java
  5. 4
      designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java

4
designer-base/src/main/java/com/fr/file/FILEChooserPane.java

@ -12,6 +12,7 @@ import com.fr.design.dialog.UIDialog;
import com.fr.design.env.DesignerWorkspaceInfo;
import com.fr.design.env.DesignerWorkspaceType;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.file.NodeAuthProcessor;
import com.fr.design.fun.ReportSupportedFileUIProvider;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonUI;
@ -916,7 +917,8 @@ public class FILEChooserPane extends BasicPane {
try {
access = FRContext.getOrganizationOperator().canAccess(selectedFile.getPath());
if (selectedFile.isEnvFile() && selectedFile instanceof FileNodeFILE) {
access = access && ((FileNodeFILE) selectedFile).hasFullAuth();
FileNodeFILE fileNodeFILE = ((FileNodeFILE) selectedFile);
access = access && fileNodeFILE.hasFullAuth() && NodeAuthProcessor.getInstance().checkFileNodeAuth(new FileNode(fileNodeFILE.getPath(), fileNodeFILE.isDirectory()));
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);

22
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/VanChartAlertValuePane.java

@ -50,10 +50,10 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
private static final double LINE_WIDTH_DEFAULT_VALUE = 1;
private UIButtonGroup alertAxis;
protected TinyFormulaPane alertValue;
protected LineTypeComboBox alertLineStyle;//线型
private TinyFormulaPane alertValue;
private LineTypeComboBox alertLineStyle;//线型
private UISpinner lineWidthSpinner;//线宽
protected ColorSelectBox alertLineColor;
private ColorSelectBox alertLineColor;
private UIButtonGroup alertTextPosition;
private TinyFormulaPane alertText;
@ -67,6 +67,22 @@ public class VanChartAlertValuePane extends BasicBeanPane<VanChartAlertValue> {
initComponents();
}
public TinyFormulaPane getAlertValue() {
return alertValue;
}
public LineTypeComboBox getAlertLineStyle() {
return alertLineStyle;
}
public UISpinner getLineWidthSpinner() {
return lineWidthSpinner;
}
public ColorSelectBox getAlertLineColor() {
return alertLineColor;
}
private void initComponents() {
alertValue = new TinyFormulaPane();

9
designer-chart/src/main/java/com/fr/van/chart/designer/style/background/radar/VanChartRadarAlertValuePane.java

@ -1,7 +1,7 @@
package com.fr.van.chart.designer.style.background.radar;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.van.chart.designer.style.background.VanChartAlertValuePane;
import java.awt.Component;
@ -14,9 +14,10 @@ public class VanChartRadarAlertValuePane extends VanChartAlertValuePane {
protected Component[][] getTopPaneComponents() {
return new Component[][]{
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Use_Value")),alertValue},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Line_Style")),alertLineStyle},
new Component[]{new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Color")),alertLineColor},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Use_Value")), getAlertValue()},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")), getAlertLineStyle()},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Line_Width")), getLineWidthSpinner()},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Color")), getAlertLineColor()},
};
}

39
designer-form/src/main/java/com/fr/design/form/parameter/FormParaDesigner.java

@ -83,6 +83,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
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 int addableRegionY;
private static Image paraImage = BaseUtils.readImage("/com/fr/design/images/form/parameter.png");
@ -412,10 +413,30 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
if (layoutContainer == null) {
layoutContainer = new XWParameterLayout();
}
refreshAddableRegion(layoutContainer);
layoutContainer.setSize(LARGE_PREFERRED_SIZE);
setRootComponent(layoutContainer);
}
/**
* @param layoutContainer
* @Description: 为了不覆盖以前的组件所以要计算可以添加组件的区域
* @return:
* @Author: Henry.Wang
* @date: 2020/7/15 15:12
*/
public void refreshAddableRegion(XLayoutContainer layoutContainer) {
addableRegionY = 0;
for (int i = 0; i < layoutContainer.getComponentCount(); i++) {
Rectangle rectangle = layoutContainer.getComponent(i).getBounds();
if (addableRegionY < rectangle.y + rectangle.height) {
addableRegionY = rectangle.y + rectangle.height;
}
}
int vGap = V_COMPONENT_GAP - (int) XCreator.SMALL_PREFERRED_SIZE.getHeight();
addableRegionY = Math.max(0, addableRegionY - FIRST_V_LOCATION + (int) (XCreator.SMALL_PREFERRED_SIZE.getHeight() / 2) + vGap);
}
/**
* 是否是报表的参数面板
*
@ -583,14 +604,15 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
label.setWidgetName("Label" + name);
label.setWidgetValue(new WidgetValue(name + ":"));
XCreator xCreator = XCreatorUtils.createXCreator(label);
if (!(this.autoAddComponent(xCreator, H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE)
+ FIRST_H_LOCATION, FIRST_V_LOCATION + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE)))) {
int x = H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE) + FIRST_H_LOCATION;
int y = addableRegionY + FIRST_V_LOCATION + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE);
if (!(this.autoAddComponent(xCreator, x, y))) {
return false;
}
EditorHolder editor = new EditorHolder(parameter);
xCreator = XCreatorUtils.createXCreator(editor);
if (!(this.autoAddComponent(xCreator, H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE)
+ SECOND_H_LOCATION, FIRST_V_LOCATION + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE)))) {
x = H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE) + SECOND_H_LOCATION;
if (!(this.autoAddComponent(xCreator, x, y))) {
return false;
}
return true;
@ -646,16 +668,17 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
label.setWidgetValue(new WidgetValue(parameterArray[i].getName() + ":"));
XCreator xCreator = XCreatorUtils.createXCreator(label);
if (!(this.autoAddComponent(xCreator, H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE)
+ FIRST_H_LOCATION, FIRST_V_LOCATION + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE)))) {
int x = H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE) + FIRST_H_LOCATION;
int y = addableRegionY + FIRST_V_LOCATION + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE);
if (!(this.autoAddComponent(xCreator, x, y))) {
break;
}
// 每行显示5组
EditorHolder editor = new EditorHolder(parameterArray[i]);
editor.setWidgetName(parameterArray[i].getName());
xCreator = XCreatorUtils.createXCreator(editor);
if (!(this.autoAddComponent(xCreator, H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE)
+ SECOND_H_LOCATION, FIRST_V_LOCATION + V_COMPONENT_GAP * (currentIndex / NUM_IN_A_LINE)))) {
x = H_COMPONENT_GAP * (currentIndex % NUM_IN_A_LINE) + SECOND_H_LOCATION;
if (!(this.autoAddComponent(xCreator, x, y))) {
break;
}
currentIndex++;

4
designer-realize/src/main/java/com/fr/quickeditor/CellQuickEditor.java

@ -1,5 +1,6 @@
package com.fr.quickeditor;
import com.fr.base.GraphHelper;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.core.ActionFactory;
import com.fr.design.file.HistoryTemplateListPane;
@ -49,7 +50,6 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
protected static final Dimension LABEL_DIMENSION = new Dimension(60, 20);
protected static final int VGAP = 10, HGAP = 8, VGAP_INNER = 3;
private static final int INSERT_CONTENT_LABEL_WIDTH = 60;
/**
* 滚动条相关配置
@ -208,7 +208,7 @@ public abstract class CellQuickEditor extends QuickEditor<ElementCasePane> {
private JPanel initTopContent() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {INSERT_CONTENT_LABEL_WIDTH, f};
double[] columnSize = {GraphHelper.getWidth(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Insert_Cell_Element")), f};
double[] rowSize = {p, p};
UILabel cellLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Cell"));
UILabel insertContentLabel = FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Insert_Cell_Element"));

Loading…
Cancel
Save