Browse Source

Merge branch 'release/10.0' of https://code.fineres.com/scm/~zack/design

feature/big-screen
zack 5 years ago
parent
commit
ef18725a21
  1. 2
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  2. 21
      designer-base/src/main/java/com/fr/design/fun/CellExpandAttrPanelProvider.java
  3. 39
      designer-base/src/main/java/com/fr/design/fun/impl/AbstractCellExpandAttrPanelProvider.java
  4. 50
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileCollapsedStyleExpandPane.java
  5. 153
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileCollapsedStylePane.java
  6. 5
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileComboBoxDialogEditor.java
  7. 15
      designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java
  8. 4
      designer-chart/src/main/java/com/fr/van/chart/area/VanChartAreaConditionPane.java
  9. 6
      designer-chart/src/main/java/com/fr/van/chart/area/VanChartAreaSeriesPane.java
  10. 30
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePane.java
  11. 11
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePaneWithoutDashed.java
  12. 2
      designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineWidthPane.java
  13. 16
      designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLineTypeConditionPaneWithoutDashed.java
  14. 4
      designer-chart/src/main/java/com/fr/van/chart/scatter/component/VanChartScatterLineTypePane.java
  15. 81
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java
  16. 125
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellExpandExtraAttrPane.java
  17. 3
      designer-realize/src/main/java/com/fr/design/present/StyleArrayPane.java

2
designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

@ -359,7 +359,7 @@ public class EnvChangeEntrance {
*/
private String formatBranch(String branch){
if(branch.contains("#")){
return branch.substring(branch.lastIndexOf("#") + 1, branch.length() - 13);
return branch.substring(branch.lastIndexOf("-") + 1, branch.length() - 13);
}
return branch;
}

21
designer-base/src/main/java/com/fr/design/fun/CellExpandAttrPanelProvider.java

@ -0,0 +1,21 @@
package com.fr.design.fun;
import com.fr.design.beans.BasicBeanPane;
import com.fr.report.cell.TemplateCellElement;
import com.fr.stable.fun.mark.Mutable;
/**
* @author yaohwu
* created by yaohwu at 2020/4/26 15:50
*/
public interface CellExpandAttrPanelProvider extends Mutable {
String MARK_STRING = "CellExpandAttrPanelProvider";
int CURRENT_LEVEL = 1;
/**
* @return 创建单元格属性-扩展设置中的额外面板
*/
BasicBeanPane<TemplateCellElement> createPanel();
}

39
designer-base/src/main/java/com/fr/design/fun/impl/AbstractCellExpandAttrPanelProvider.java

@ -0,0 +1,39 @@
package com.fr.design.fun.impl;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.fun.CellExpandAttrPanelProvider;
import com.fr.report.cell.TemplateCellElement;
import com.fr.stable.fun.mark.API;
/**
* @author yaohwu
* created by yaohwu at 2020/4/26 16:08
*/
@API(level = CellExpandAttrPanelProvider.CURRENT_LEVEL)
public class AbstractCellExpandAttrPanelProvider implements CellExpandAttrPanelProvider {
/**
* 当前接口的API等级,用于判断是否需要升级插件
*
* @return API等级
*/
@Override
public int currentAPILevel() {
return CellExpandAttrPanelProvider.CURRENT_LEVEL;
}
/**
* 获取当前provider的标记可以使用类路径保证唯一以避免provider的重复加载
*
* @return 当前provider的标记
*/
@Override
public String mark4Provider() {
return null;
}
@Override
public BasicBeanPane<TemplateCellElement> createPanel() {
return null;
}
}

50
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileCollapsedStyleExpandPane.java

@ -6,13 +6,12 @@ import com.fr.design.gui.itextfield.UIIntNumberField;
import com.fr.design.gui.itextfield.UINumberField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.widget.UITitleSplitLine;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.form.ui.mobile.MobileCollapsedStyle;
import com.fr.form.ui.mobile.MobileFormCollapsedStyle;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Dimension;
import javax.swing.*;
import java.awt.*;
/**
* @author hades
@ -21,34 +20,45 @@ import java.awt.Dimension;
*/
public class MobileCollapsedStyleExpandPane extends MobileCollapsedStylePane {
private static final Dimension DEFAULT_SPINNER_SIZE = new Dimension(60, 24);
private UISpinner rowSpinner;
public MobileCollapsedStyleExpandPane() {
}
@Override
protected JPanel createLinePane() {
UITitleSplitLine splitLine = new UITitleSplitLine(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Line_Number"), 520);
splitLine.setPreferredSize(new Dimension(520, 20));
protected void createConfigPanes(JPanel settingPane) {
JPanel lineNumberConfigPane = this.createLineNumberConfigPane();
settingPane.add(lineNumberConfigPane);
super.createConfigPanes(settingPane);
}
protected JPanel createLineNumberConfigPane() {
JPanel configPane = super.createTitleConfigPane(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Line_Number"));
UILabel collapseLocationLabel = createLabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Show_Button"));
this.rowSpinner = new UISpinner(1, Integer.MAX_VALUE, 1, 1) {
@Override
protected UINumberField initNumberField(){
return new UIIntNumberField();
}
};
rowSpinner.setPreferredSize(DEFAULT_SPINNER_SIZE);
JPanel panel = new JPanel();
panel.setLayout(FRGUIPaneFactory.createBoxFlowLayout());
panel.add(new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Start_From")));
panel.add(rowSpinner);
panel.add(new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Row_To_Fold")));
JPanel linePane = FRGUIPaneFactory.createBorderLayout_S_Pane();
linePane.add(splitLine, BorderLayout.NORTH);
linePane.add(panel, BorderLayout.CENTER);
return linePane;
this.rowSpinner.setPreferredSize(new Dimension(62, COMPONENT_HEIGHT));
JPanel defaultCollapsedStatePanel = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane();
defaultCollapsedStatePanel.add(createLabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Start_From") + " "));
defaultCollapsedStatePanel.add(rowSpinner);
defaultCollapsedStatePanel.add(createLabel(" " + Toolkit.i18nText("Fine-Design_Mobile_Collapse_Row_To_Fold")));
double[] rowSize = {COMPONENT_HEIGHT};
double[] columnSize = {LABEL_WIDTH, COMPONENT_WIDTH};
double[] verticalGaps = {0};
JPanel navButtonSettingsPanel = TableLayoutHelper.createDiffVGapTableLayoutPane(new JComponent[][]{
{collapseLocationLabel, defaultCollapsedStatePanel},
}, rowSize, columnSize, 5, verticalGaps);
navButtonSettingsPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 15, 0));
configPane.add(navButtonSettingsPanel);
return configPane;
}
@Override

153
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileCollapsedStylePane.java

@ -1,8 +1,6 @@
package com.fr.design.mainframe.mobile.ui;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.gui.ibutton.ModeButtonGroup;
import com.fr.design.gui.ibutton.UIRadioButton;
import com.fr.design.gui.icheckbox.UICheckBox;
@ -10,9 +8,7 @@ import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.layout.VerticalFlowLayout;
import com.fr.design.mainframe.widget.UITitleSplitLine;
import com.fr.design.style.color.NewColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
@ -21,13 +17,7 @@ import com.fr.form.ui.mobile.MobileChartCollapsedStyle;
import com.fr.form.ui.mobile.MobileCollapsedStyle;
import javax.swing.*;
import javax.swing.border.TitledBorder;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.*;
/**
* @author hades
@ -36,6 +26,13 @@ import java.awt.FlowLayout;
*/
public class MobileCollapsedStylePane extends BasicBeanPane<MobileCollapsedStyle> {
public final static Color THEME_COLOR = Color.decode("#2F8EF1");
public final static Font TEXT_FONT = new Font("Default", Font.PLAIN, 12);
public final static Color TEXT_FONT_COLOR = Color.decode("#333334");
public final static int LABEL_WIDTH = 96;
public final static int COMPONENT_HEIGHT = 20;
public final static int COMPONENT_WIDTH = 160;
private UICheckBox showButtonCheck;
private NewColorSelectBox buttonColorBox;
private UITextField foldedTextFiled;
@ -44,74 +41,94 @@ public class MobileCollapsedStylePane extends BasicBeanPane<MobileCollapsedStyle
public MobileCollapsedStylePane() {
TitledBorder titledBorder = GUICoreUtils.createTitledBorder(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Set"), null);
VerticalFlowLayout layout = new VerticalFlowLayout(FlowLayout.LEADING, 0, 10);
layout.setAlignLeft(true);
this.setBorder(titledBorder);
this.setLayout(layout);
this.add(createLinePane());
this.add(createSettingPane());
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
this.setBorder(BorderFactory.createEmptyBorder( 10, 5, 0, 5));
JPanel settingPane = this.createSettingPane();
this.createConfigPanes(settingPane);
this.add(settingPane);
}
private JPanel createSettingPane() {
JPanel settingPane = FRGUIPaneFactory.createVerticalFlowLayout_Pane(true, FlowLayout.LEADING, 0, 0);
UITitleSplitLine splitLine = new UITitleSplitLine(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Button"), 520);
splitLine.setPreferredSize(new Dimension(520, 20));
UILabel showButtonLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Show_Button"));
showButtonCheck = new UICheckBox(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Show_Button_On_Right"));
showButtonCheck.setPreferredSize(new Dimension(140, 24));
UILabel buttonColorLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Button_Color"));
buttonColorBox = new NewColorSelectBox(137);
UILabel foldedLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Folded_Hint"));
JPanel settingPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
settingPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Report_Set"), THEME_COLOR));
return settingPane;
}
protected UILabel createLabel(String text) {
UILabel label = new UILabel(text, SwingConstants.RIGHT);
label.setForeground(TEXT_FONT_COLOR);
label.setFont(TEXT_FONT);
return label;
}
protected void createConfigPanes(JPanel settingPane) {
JPanel collapsedButtonConfigPane = this.createCollapsedButtonConfigPane();
settingPane.add(collapsedButtonConfigPane);
}
protected JPanel createTitleConfigPane(String title) {
JPanel configPane = new JPanel();
configPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
configPane.setLayout(new BoxLayout(configPane, BoxLayout.Y_AXIS));
Dimension titleLineDim = new Dimension(610, 20);
UITitleSplitLine splitLine = new UITitleSplitLine(title, titleLineDim.width);
splitLine.setPreferredSize(titleLineDim);
configPane.add(splitLine);
return configPane;
}
private JPanel createCollapsedButtonConfigPane() {
JPanel configPane = this.createTitleConfigPane(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Button"));
UILabel showButtonLabel = this.createLabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Show_Button"));
showButtonCheck = new UICheckBox(Toolkit.i18nText(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Show_Button_On_Right")));
showButtonCheck.setForeground(TEXT_FONT_COLOR);
showButtonCheck.setFont(TEXT_FONT);
UILabel buttonColorLabel = this.createLabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Button_Color"));
buttonColorBox = new NewColorSelectBox(COMPONENT_WIDTH);
UILabel foldedLabel = this.createLabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Folded_Hint"));
foldedTextFiled = new UITextField();
UILabel unfoldedLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_UnFolded_Hint"));
UILabel unfoldedLabel = this.createLabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_UnFolded_Hint"));
unfoldedTextFiled = new UITextField();
UILabel defaultStateLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Default_State"));
buttonGroup = new ModeButtonGroup<>();
UILabel defaultCollapsedStateLabel = this.createLabel(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Default_State"));
JPanel defaultCollapsedStatePanel = FRGUIPaneFactory.createLeftFlowZeroGapBorderPane();
UIRadioButton foldedButton = new UIRadioButton(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Fold"));
foldedButton.setSelected(true);
foldedButton.setPreferredSize(new Dimension(COMPONENT_WIDTH / 2, COMPONENT_HEIGHT));
foldedButton.setForeground(TEXT_FONT_COLOR);
foldedButton.setFont(TEXT_FONT);
UIRadioButton unfoldedButton = new UIRadioButton(Toolkit.i18nText("Fine-Design_Mobile_Collapse_Unfold"));
unfoldedButton.setPreferredSize(new Dimension(COMPONENT_WIDTH / 2, COMPONENT_HEIGHT));
unfoldedButton.setForeground(TEXT_FONT_COLOR);
unfoldedButton.setFont(TEXT_FONT);
defaultCollapsedStatePanel.add(foldedButton);
defaultCollapsedStatePanel.add(unfoldedButton);
buttonGroup = new ModeButtonGroup<>();
buttonGroup.put(CollapseState.FOLDED, foldedButton);
buttonGroup.put(CollapseState.UNFOLDED, unfoldedButton);
JPanel flowLeftPane = FRGUIPaneFactory.createNormalFlowInnerContainer_M_Pane();
flowLeftPane.add(foldedButton);
flowLeftPane.add(unfoldedButton);
Component[][] northComponents = new Component[][] {
new Component[] {showButtonLabel, showButtonCheck}
};
Component[][] southComponents = new Component[][] {
new Component[] {defaultStateLabel, flowLeftPane}
};
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p, p, p};
double[] colSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}};
Component[][] centerComponents = new Component[][] {
new Component[] {buttonColorLabel, buttonColorBox},
new Component[] {foldedLabel, foldedTextFiled},
new Component[] {unfoldedLabel, unfoldedTextFiled},
};
JPanel northPane = TableLayoutHelper.createGapTableLayoutPane(northComponents, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W2, IntervalConstants.INTERVAL_L1);
JPanel southPane = TableLayoutHelper.createGapTableLayoutPane(southComponents, TableLayoutHelper.FILL_LASTCOLUMN, IntervalConstants.INTERVAL_W1, IntervalConstants.INTERVAL_L1);
final JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(centerComponents, rowSize, colSize, rowCount, LayoutConstants.HGAP_LARGE, LayoutConstants.VGAP_SMALL);
JPanel panel = FRGUIPaneFactory.createBorderLayout_S_Pane();
panel.add(northPane, BorderLayout.NORTH);
panel.add(centerPane, BorderLayout.CENTER);
panel.add(southPane, BorderLayout.SOUTH);
settingPane.add(splitLine);
settingPane.add(panel);
showButtonCheck.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
centerPane.setVisible(showButtonCheck.isSelected());
}
});
return settingPane;
}
protected JPanel createLinePane() {
return FRGUIPaneFactory.createBorderLayout_S_Pane();
double[] rowSize = {COMPONENT_HEIGHT, COMPONENT_HEIGHT, COMPONENT_HEIGHT, COMPONENT_HEIGHT, COMPONENT_HEIGHT};
double[] columnSize = {LABEL_WIDTH, COMPONENT_WIDTH};
double[] verticalGaps = {10, 10, 10, 10, 10};
JPanel contentPane = TableLayoutHelper.createDiffVGapTableLayoutPane(new JComponent[][]{
{showButtonLabel, showButtonCheck},
{buttonColorLabel, buttonColorBox},
{foldedLabel, foldedTextFiled},
{unfoldedLabel, unfoldedTextFiled},
{defaultCollapsedStateLabel, defaultCollapsedStatePanel}
}, rowSize, columnSize, 5, verticalGaps);
contentPane.setBorder(BorderFactory.createEmptyBorder(10, 0, 15, 0));
configPane.add(contentPane);
return configPane;
}
@Override

5
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileComboBoxDialogEditor.java

@ -9,8 +9,8 @@ import com.fr.design.i18n.Toolkit;
import com.fr.form.ui.mobile.MobileCollapsedStyle;
import com.fr.general.ComparatorUtils;
import javax.swing.SwingUtilities;
import java.awt.Dimension;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -33,6 +33,7 @@ public class MobileComboBoxDialogEditor extends BasicPane {
private ActionListener listener;
public MobileComboBoxDialogEditor(MobileCollapsedStylePane stylePane) {
this.setLayout(new BoxLayout(this, BoxLayout.X_AXIS));
this.stylePane = stylePane;
this.comboBox = new UIComboBox(new Object[] {NONE, CUSTOM});
this.comboBox.setPreferredSize(COMBOX_DIMENSION);

15
designer-chart/src/main/java/com/fr/design/module/ChartPreFillStylePane.java

@ -12,6 +12,7 @@ import com.fr.design.style.background.gradient.FixedGradientBar;
import javax.swing.JPanel;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.awt.BorderLayout;
import java.awt.CardLayout;
@ -25,6 +26,7 @@ import java.awt.event.ActionListener;
/**
* 预定义的图表配色界面.
*
* @author kunsnat E-mail:kunsnat@gmail.com
* @version 创建时间2013-8-21 下午03:16:27
*/
@ -78,7 +80,7 @@ public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
};
this.setLayout(new BorderLayout());
this.add(TableLayoutHelper.createTableLayoutPane(components,rowSize,columnSize), BorderLayout.WEST);
this.add(TableLayoutHelper.createTableLayoutPane(components, rowSize, columnSize), BorderLayout.WEST);
}
private void initListener() {
@ -129,7 +131,12 @@ public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
gradientButton.setSelected(false);
cardLayout.show(changeColorSetPane, "acc");
if (colorList.size() > 0) {
if (colorList.isEmpty()) {
List<Color> resultList = new ArrayList<>();
Collections.addAll(resultList, ChartColorAdjustPane.DEFAULT_COLORS);
condition.setColorList(resultList);
colorAdjustPane.updateColor(ChartColorAdjustPane.DEFAULT_COLORS);
} else {
colorAdjustPane.updateColor(colorList.toArray(new Color[colorList.size()]));
}
}
@ -141,7 +148,7 @@ public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
List<Color> colorList = new ArrayList<Color>();
if(gradientButton.isSelected()) {
if (gradientButton.isSelected()) {
chartColorMatching.setGradient(true);
Color start = colorGradient.getSelectColorPointBtnP1().getColorInner();
@ -152,7 +159,7 @@ public class ChartPreFillStylePane extends BasicBeanPane<ChartColorMatching> {
chartColorMatching.setGradient(false);
Color[] colors = colorAdjustPane.getColors();
for(Color color : colors) {
for (Color color : colors) {
colorList.add(color);
}
}

4
designer-chart/src/main/java/com/fr/van/chart/area/VanChartAreaConditionPane.java

@ -20,7 +20,7 @@ import com.fr.van.chart.designer.other.condition.item.VanChartAreaFillColorCondi
import com.fr.van.chart.designer.other.condition.item.VanChartDataSheetContentPane;
import com.fr.van.chart.designer.other.condition.item.VanChartEffectConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartLabelConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartLineTypeConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartLineTypeConditionPaneWithoutDashed;
import com.fr.van.chart.designer.other.condition.item.VanChartMarkerConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartSeriesColorConditionPane;
import com.fr.van.chart.designer.other.condition.item.VanChartTooltipConditionPane;
@ -50,7 +50,7 @@ public class VanChartAreaConditionPane extends DataSeriesConditionPane {
classPaneMap.put(AttrBackground.class, new VanChartSeriesColorConditionPane(this));
classPaneMap.put(VanChartAttrTrendLine.class, new VanChartTrendLineConditionPane(this));
classPaneMap.put(AttrAreaSeriesFillColorBackground.class, new VanChartAreaFillColorConditionPane(this, plot));
classPaneMap.put(VanChartAttrLine.class, new VanChartLineTypeConditionPane(this));
classPaneMap.put(VanChartAttrLine.class, new VanChartLineTypeConditionPaneWithoutDashed(this));
classPaneMap.put(AttrTooltip.class, new VanChartTooltipConditionPane(this, plot));
//是否使用数据表
if (plot.getDataSheet().isVisible()) {

6
designer-chart/src/main/java/com/fr/van/chart/area/VanChartAreaSeriesPane.java

@ -7,6 +7,8 @@ import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.chart.gui.ChartStylePane;
import com.fr.van.chart.column.VanChartCustomStackAndAxisConditionPane;
import com.fr.van.chart.designer.component.VanChartBeautyPane;
import com.fr.van.chart.designer.component.VanChartLineTypePane;
import com.fr.van.chart.designer.component.VanChartLineTypePaneWithoutDashed;
import com.fr.van.chart.line.VanChartLineSeriesPane;
import javax.swing.JPanel;
@ -49,4 +51,8 @@ public class VanChartAreaSeriesPane extends VanChartLineSeriesPane {
protected VanChartBeautyPane createStylePane() {
return new VanChartBeautyPane();
}
protected VanChartLineTypePane getLineTypePane() {
return new VanChartLineTypePaneWithoutDashed();
}
}

30
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePane.java

@ -34,7 +34,7 @@ public class VanChartLineTypePane extends BasicPane {
private LineTypeComboBox lineTypeComboBox;//线型
private UISpinner lineWidthSpinner;//线宽
protected UIButtonGroup<LineStyle> lineStyle;//形态
private UIButtonGroup<LineStyle> lineStyle;//形态
private UIButtonGroup nullValueBreak;//空值断开
private JPanel lineWidthPane;
@ -44,7 +44,7 @@ public class VanChartLineTypePane extends BasicPane {
JPanel typeAndWidthPane = createTypeAndWidthPane();
createLineStyle();
lineStyle = createLineStyle();
nullValueBreak = new UIButtonGroup(new String[]{
Toolkit.i18nText("Fine-Design_Chart_Open"),
@ -72,7 +72,7 @@ public class VanChartLineTypePane extends BasicPane {
private JPanel createTypeAndWidthPane() {
lineTypeComboBox = new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.SOLID, LineType.DASHED});
lineTypeComboBox = createLineType();
lineWidthSpinner = new UISpinner(LINE_WIDTH_MIN_VALUE, Integer.MAX_VALUE, LINE_WIDTH_DIERTA_VALUE, LINE_WIDTH_DEFAULT_VALUE);
@ -85,6 +85,7 @@ public class VanChartLineTypePane extends BasicPane {
});
Component[][] lineTypeComps = new Component[][]{
new Component[]{null, null},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Line_Style")), lineTypeComboBox}
};
Component[][] lineWidthComps = new Component[][]{
@ -94,10 +95,10 @@ public class VanChartLineTypePane extends BasicPane {
};
double p = TableLayout.PREFERRED, f = TableLayout.FILL, e = TableLayout4VanChartHelper.EDIT_AREA_WIDTH;
double[] row = {p}, col = {f, e};
double[] col = {f, e};
JPanel lineTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(lineTypeComps, row, col);
lineWidthPane = TableLayout4VanChartHelper.createGapTableLayoutPane(lineWidthComps, row, col);
JPanel lineTypePane = TableLayout4VanChartHelper.createGapTableLayoutPane(lineTypeComps, new double[]{p, p}, col);
lineWidthPane = TableLayout4VanChartHelper.createGapTableLayoutPane(lineWidthComps, new double[]{p}, col);
JPanel contentPane = new JPanel(new BorderLayout(0, 6));
@ -107,10 +108,17 @@ public class VanChartLineTypePane extends BasicPane {
return contentPane;
}
protected void createLineStyle() {
String[] textArray = new String[]{Toolkit.i18nText("Fine-Design_Chart_Normal_Line"),
Toolkit.i18nText("Fine-Design_Chart_StepLine"), Toolkit.i18nText("Fine-Design_Chart_CurveLine")};
lineStyle = new UIButtonGroup<LineStyle>(textArray, LineStyle.values());
protected LineTypeComboBox createLineType() {
return new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.SOLID, LineType.DASHED});
}
protected UIButtonGroup<LineStyle> createLineStyle() {
String[] textArray = new String[]{
Toolkit.i18nText("Fine-Design_Chart_Normal_Line"),
Toolkit.i18nText("Fine-Design_Chart_StepLine"),
Toolkit.i18nText("Fine-Design_Chart_CurveLine")};
return new UIButtonGroup<>(textArray, LineStyle.values());
}
protected Component[][] createContentComponent(Component[] lineStyleComponent, Component[] nullValueBreakComponent) {
@ -128,7 +136,7 @@ public class VanChartLineTypePane extends BasicPane {
private void checkLineStyle() {
if (lineStylePane != null && lineTypeComboBox != null) {
lineStylePane.setVisible(!ComparatorUtils.equals(lineTypeComboBox.getSelectedItem(),LineType.NONE));
lineStylePane.setVisible(!ComparatorUtils.equals(lineTypeComboBox.getSelectedItem(), LineType.NONE));
}
}

11
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineTypePaneWithoutDashed.java

@ -0,0 +1,11 @@
package com.fr.van.chart.designer.component;
import com.fr.plugin.chart.type.LineType;
public class VanChartLineTypePaneWithoutDashed extends VanChartLineTypePane{
@Override
protected LineTypeComboBox createLineType() {
return new LineTypeComboBox(new LineType[]{LineType.NONE, LineType.SOLID});
}
}

2
designer-chart/src/main/java/com/fr/van/chart/designer/component/VanChartLineWidthPane.java

@ -5,7 +5,7 @@ import java.awt.Component;
/**
* 线型+线宽+空值断开
*/
public class VanChartLineWidthPane extends VanChartLineTypePane {
public class VanChartLineWidthPane extends VanChartLineTypePaneWithoutDashed {
private static final long serialVersionUID = 4537158946119294689L;
@Override

16
designer-chart/src/main/java/com/fr/van/chart/designer/other/condition/item/VanChartLineTypeConditionPaneWithoutDashed.java

@ -0,0 +1,16 @@
package com.fr.van.chart.designer.other.condition.item;
import com.fr.design.condition.ConditionAttributesPane;
import com.fr.van.chart.designer.component.VanChartLineTypePane;
import com.fr.van.chart.designer.component.VanChartLineTypePaneWithoutDashed;
public class VanChartLineTypeConditionPaneWithoutDashed extends VanChartLineTypeConditionPane {
public VanChartLineTypeConditionPaneWithoutDashed(ConditionAttributesPane conditionAttributesPane) {
super(conditionAttributesPane);
}
protected VanChartLineTypePane createLinePane() {
return new VanChartLineTypePaneWithoutDashed();
}
}

4
designer-chart/src/main/java/com/fr/van/chart/scatter/component/VanChartScatterLineTypePane.java

@ -15,12 +15,12 @@ import java.awt.Component;
public class VanChartScatterLineTypePane extends VanChartLineTypePane {
@Override
protected void createLineStyle() {
protected UIButtonGroup<LineStyle> createLineStyle() {
String[] textArray = new String[]{
Toolkit.i18nText("Fine-Design_Chart_Normal_Line"),
Toolkit.i18nText("Fine-Design_Chart_CurveLine")};
lineStyle = new UIButtonGroup<>(textArray, new LineStyle[]{LineStyle.NORMAL, LineStyle.CURVE});
return new UIButtonGroup<>(textArray, new LineStyle[]{LineStyle.NORMAL, LineStyle.CURVE});
}
@Override

81
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellExpandAttrPane.java

@ -1,6 +1,5 @@
package com.fr.design.mainframe.cell.settingpane;
import com.fr.base.BaseUtils;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.constants.UIConstants;
import com.fr.design.expand.ExpandLeftFatherPane;
@ -10,18 +9,23 @@ import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.general.ComparatorUtils;
import com.fr.general.IOUtils;
import com.fr.report.cell.DefaultTemplateCellElement;
import com.fr.report.cell.TemplateCellElement;
import com.fr.report.cell.cellattr.CellExpandAttr;
import com.fr.report.elementcase.TemplateElementCase;
import com.fr.stable.Constants;
import javax.swing.*;
import java.awt.*;
import javax.swing.Icon;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import java.awt.BorderLayout;
import java.awt.Component;
import java.awt.Rectangle;
/**
* 单元格扩展属性面板是属性表面板的一个种类
@ -38,58 +42,66 @@ public class CellExpandAttrPane extends AbstractCellAttrPane {
private JPanel layoutPane;
private JPanel basicPane;
private JPanel seniorPane;
private CellExpandExtraAttrPane extraPane;
/**
* @return
* @return content panel
*/
public JPanel createContentPane() {
String[] nameArray = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ExpandD_Not_Expand"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Top_To_Bottom"), com.fr.design.i18n.Toolkit.i18nText("FIne-Design_Report_Utils_Left_To_Right")};
String[] nameArray = {Toolkit.i18nText("Fine-Design_Report_ExpandD_Not_Expand"), Toolkit.i18nText("Fine-Design_Report_Utils_Top_To_Bottom"), Toolkit.i18nText("FIne-Design_Report_Utils_Left_To_Right")};
Icon[][] iconArray = {
{BaseUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), BaseUtils.readIcon("/com/fr/design/images/expand/none16x16_selected@1x.png")},
{BaseUtils.readIcon("/com/fr/design/images/expand/vertical.png"), BaseUtils.readIcon("/com/fr/design/images/expand/vertical_selected@1x.png")},
{BaseUtils.readIcon("/com/fr/design/images/expand/landspace.png"), BaseUtils.readIcon("/com/fr/design/images/expand/landspace_selected@1x.png")}
{IOUtils.readIcon("/com/fr/design/images/expand/none16x16.png"), IOUtils.readIcon("/com/fr/design/images/expand/none16x16_selected@1x.png")},
{IOUtils.readIcon("/com/fr/design/images/expand/vertical.png"), IOUtils.readIcon("/com/fr/design/images/expand/vertical_selected@1x.png")},
{IOUtils.readIcon("/com/fr/design/images/expand/landspace.png"), IOUtils.readIcon("/com/fr/design/images/expand/landspace_selected@1x.png")}
};
Byte[] valueArray = {Constants.NONE, Constants.TOP_TO_BOTTOM, Constants.LEFT_TO_RIGHT};
expandDirectionButton = new UIButtonGroup<Byte>(iconArray, valueArray);
expandDirectionButton.setAllToolTips(nameArray);
leftFatherPane = new ExpandLeftFatherPane();
rightFatherPane = new ExpandUpFatherPane();
horizontalExpandableCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ExpandD_Horizontal_Extendable"));
verticalExpandableCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ExpandD_Vertical_Extendable"));
horizontalExpandableCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_ExpandD_Horizontal_Extendable"));
verticalExpandableCheckBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Report_ExpandD_Vertical_Extendable"));
sortAfterExpand = new SortExpandAttrPane();
initAllNames();
return layoutPane();
}
private void initAllNames() {
expandDirectionButton.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ExpandD_Expand_Direction"));
leftFatherPane.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_LeftParent"));
rightFatherPane.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ExpandD_Up_Father_Cell"));
horizontalExpandableCheckBox.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ExpandD_Expandable"));
verticalExpandableCheckBox.setGlobalName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ExpandD_Expandable"));
expandDirectionButton.setGlobalName(Toolkit.i18nText("Fine-Design_Report_ExpandD_Expand_Direction"));
leftFatherPane.setGlobalName(Toolkit.i18nText("Fine-Design_Report_LeftParent"));
rightFatherPane.setGlobalName(Toolkit.i18nText("Fine-Design_Report_ExpandD_Up_Father_Cell"));
horizontalExpandableCheckBox.setGlobalName(Toolkit.i18nText("Fine-Design_Report_ExpandD_Expandable"));
verticalExpandableCheckBox.setGlobalName(Toolkit.i18nText("Fine-Design_Report_ExpandD_Expandable"));
}
private JPanel layoutPane() {
layoutPane = new JPanel(new BorderLayout());
basicPane = new JPanel();
seniorPane = new JPanel();
basicPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Basic"), 223, 24, basicPane());
seniorPane = new UIExpandablePane(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Advanced"), 223, 24, seniorPane());
basicPane = new UIExpandablePane(Toolkit.i18nText("Fine-Design_Report_Basic"), 223, 24, basicPane());
seniorPane = new UIExpandablePane(Toolkit.i18nText("Fine-Design_Report_Advanced"), 223, 24, seniorPane());
layoutPane.add(basicPane, BorderLayout.NORTH);
layoutPane.add(seniorPane, BorderLayout.CENTER);
return layoutPane;
extraPane = CellExpandExtraAttrPane.getInstance();
JPanel content = new JPanel(new BorderLayout());
content.add(layoutPane, BorderLayout.NORTH);
content.add(extraPane, BorderLayout.CENTER);
return content;
}
private JPanel basicPane() {
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
UILabel direction = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ExpandD_Expand_Direction"), SwingConstants.LEFT);
UILabel direction = new UILabel(Toolkit.i18nText("Fine-Design_Report_ExpandD_Expand_Direction"), SwingConstants.LEFT);
JPanel directionPane = new JPanel(new BorderLayout());
directionPane.add(direction, BorderLayout.NORTH);
UILabel left = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_LeftParent"), SwingConstants.LEFT);
UILabel left = new UILabel(Toolkit.i18nText("Fine-Design_Report_LeftParent"), SwingConstants.LEFT);
JPanel leftPane = new JPanel(new BorderLayout());
leftPane.add(left, BorderLayout.NORTH);
UILabel up = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ExpandD_Up_Father_Cell"), SwingConstants.LEFT);
UILabel up = new UILabel(Toolkit.i18nText("Fine-Design_Report_ExpandD_Up_Father_Cell"), SwingConstants.LEFT);
JPanel upPane = new JPanel(new BorderLayout());
upPane.add(up, BorderLayout.NORTH);
Component[][] components = new Component[][]{
@ -107,7 +119,7 @@ public class CellExpandAttrPane extends AbstractCellAttrPane {
private JPanel seniorPane() {
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
UILabel expendSort = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Expend_Sort"), SwingConstants.LEFT);
UILabel expendSort = new UILabel(Toolkit.i18nText("Fine-Design_Report_Expend_Sort"), SwingConstants.LEFT);
JPanel expendSortPane = new JPanel(new BorderLayout());
expendSortPane.add(expendSort, BorderLayout.NORTH);
horizontalExpandableCheckBox.setBorder(UIConstants.CELL_ATTR_ZEROBORDER);
@ -118,9 +130,9 @@ public class CellExpandAttrPane extends AbstractCellAttrPane {
new Component[]{verticalExpandableCheckBox, null},
new Component[]{expendSortPane, sortAfterExpand},
};
double[] rowSize = {p, p, p, p, p, p, p, p};
double[] rowSize = {p, p, p, p, p};
double[] columnSize = {p, f};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 3}, {1, 3}};
int[][] rowCount = {{1, 1}, {1, 1}, {1, 1}, {1, 1}};
return TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, rowCount, SENIOR_HORIZONTAL_GAP, LayoutConstants.VGAP_LARGE);
}
@ -158,13 +170,15 @@ public class CellExpandAttrPane extends AbstractCellAttrPane {
}
sortAfterExpand.populate(cellExpandAttr);
extraPane.populate(cellElement);
}
@Override
public String getIconPath() {
// return "com/fr/design/images/expand/cellAttr.gif";
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Expand");
return Toolkit.i18nText("Fine-Design_Report_Expand");
}
@ -175,19 +189,19 @@ public class CellExpandAttrPane extends AbstractCellAttrPane {
cellExpandAttr = new CellExpandAttr();
cellElement.setCellExpandAttr(cellExpandAttr);
}
if (ComparatorUtils.equals(getGlobalName(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ExpandD_Expand_Direction"))) {
if (ComparatorUtils.equals(getGlobalName(), Toolkit.i18nText("Fine-Design_Report_ExpandD_Expand_Direction"))) {
cellExpandAttr.setDirection(expandDirectionButton.getSelectedItem());
}
if (ComparatorUtils.equals(getGlobalName(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_LeftParent"))) {
if (ComparatorUtils.equals(getGlobalName(), Toolkit.i18nText("Fine-Design_Report_LeftParent"))) {
this.leftFatherPane.update(cellExpandAttr);
}
if (ComparatorUtils.equals(getGlobalName(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ExpandD_Up_Father_Cell"))) {
if (ComparatorUtils.equals(getGlobalName(), Toolkit.i18nText("Fine-Design_Report_ExpandD_Up_Father_Cell"))) {
this.rightFatherPane.update(cellExpandAttr);
}
// extendable
if (ComparatorUtils.equals(getGlobalName(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ExpandD_Expandable"))) {
if (ComparatorUtils.equals(getGlobalName(), Toolkit.i18nText("Fine-Design_Report_ExpandD_Expandable"))) {
if (horizontalExpandableCheckBox.isSelected()) {
if (verticalExpandableCheckBox.isSelected()) {
cellExpandAttr.setExtendable(CellExpandAttr.Both_EXTENDABLE);
@ -203,10 +217,11 @@ public class CellExpandAttrPane extends AbstractCellAttrPane {
}
}
if (ComparatorUtils.equals(getGlobalName(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_ExpandD_Sort_After_Expand"))) {
if (ComparatorUtils.equals(getGlobalName(), Toolkit.i18nText("Fine-Design_Basic_ExpandD_Sort_After_Expand"))) {
sortAfterExpand.update(cellExpandAttr);
}
extraPane.update(cellElement);
}
/**
@ -234,10 +249,10 @@ public class CellExpandAttrPane extends AbstractCellAttrPane {
}
/**
* @return
* @return title
*/
public String title4PopupWindow() {
return com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_ExpandD_Expand_Attribute");
return Toolkit.i18nText("Fine-Design_Report_ExpandD_Expand_Attribute");
}

125
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellExpandExtraAttrPane.java

@ -0,0 +1,125 @@
package com.fr.design.mainframe.cell.settingpane;
import com.fr.design.ExtraDesignClassManager;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.fun.CellExpandAttrPanelProvider;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.event.EventDispatcher;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.manage.PluginFilter;
import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import com.fr.report.cell.TemplateCellElement;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Component;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import static com.fr.plugin.observer.PluginEventType.AfterRun;
import static com.fr.plugin.observer.PluginEventType.AfterStop;
/**
* @author yaohwu
* created by yaohwu at 2020/4/28 10:01
*/
public class CellExpandExtraAttrPane extends JPanel {
private static final double V_GAP = 5;
private static final double H_GAP = 0;
private static final int DEFAULT_COMPONENT_SIZE = 2;
private List<BasicBeanPane<TemplateCellElement>> extras = null;
private TemplateCellElement cellElement = null;
private static final class Holder {
private static final CellExpandExtraAttrPane INSTANCE = new CellExpandExtraAttrPane();
}
static {
PluginFilter filter = new PluginFilter() {
@Override
public boolean accept(PluginContext pluginContext) {
return pluginContext.contain(PluginModule.ExtraDesign, CellExpandAttrPanelProvider.MARK_STRING);
}
};
PluginEventListener listener = new PluginEventListener() {
@Override
public void on(PluginEvent event) {
CellExpandExtraAttrPane.getInstance().refresh();
}
};
EventDispatcher.listen(AfterRun, listener, filter);
EventDispatcher.listen(AfterStop, listener, filter);
}
public static CellExpandExtraAttrPane getInstance() {
return Holder.INSTANCE;
}
/**
* Creates a new <code>JPanel</code> with a double buffer
* and a flow layout.
*/
private CellExpandExtraAttrPane() {
this.setBorder(null);
this.setLayout(new BorderLayout());
}
public void populate(TemplateCellElement cellElement) {
this.cellElement = cellElement;
if (extras != null) {
for (BasicBeanPane<TemplateCellElement> extra : extras) {
extra.populateBean(cellElement);
}
}
}
public void update(TemplateCellElement cellElement) {
this.cellElement = cellElement;
if (extras != null) {
for (BasicBeanPane<TemplateCellElement> extra : extras) {
extra.updateBean(cellElement);
}
}
}
private void refresh() {
this.removeAll();
if (extras == null) {
extras = new ArrayList<>();
}
extras.clear();
Set<CellExpandAttrPanelProvider> attrProviders = ExtraDesignClassManager.getInstance().getArray(CellExpandAttrPanelProvider.MARK_STRING);
if (attrProviders != null) {
for (CellExpandAttrPanelProvider attrProvider : attrProviders) {
BasicBeanPane<TemplateCellElement> extra = attrProvider.createPanel();
if (extra != null) {
extras.add(extra);
}
}
}
Component[][] components = new Component[extras.size()][DEFAULT_COMPONENT_SIZE];
for (int i = 0; i < extras.size(); i++) {
components[i] = new Component[]{extras.get(i), null};
}
double[] rowSize = new double[extras.size()];
Arrays.fill(rowSize, TableLayout.PREFERRED);
double[] columnSize = {TableLayout.PREFERRED, TableLayout.FILL};
JPanel content = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, H_GAP, V_GAP);
this.add(content, BorderLayout.CENTER);
if (this.cellElement != null) {
this.populate(cellElement);
}
this.validate();
this.repaint();
}
}

3
designer-realize/src/main/java/com/fr/design/present/StyleArrayPane.java

@ -4,6 +4,7 @@ import com.fr.base.Style;
import com.fr.config.ServerPreferenceConfig;
import com.fr.config.StyleMap;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.gui.NameInspector;
import com.fr.design.gui.controlpane.AbstractNameableCreator;
import com.fr.design.gui.controlpane.JListControlPane;
import com.fr.design.gui.controlpane.NameableCreator;
@ -35,7 +36,7 @@ public class StyleArrayPane extends JListControlPane {
super();
this.addModNameActionListener(new ModNameActionListener() {
public void nameModed(int index, String oldName, String newName) {
if (ComparatorUtils.equals(oldName, newName)) {
if (ComparatorUtils.equals(oldName, newName) || ComparatorUtils.equals(newName, NameInspector.ILLEGAL_NAME_HOLDER)) {
return;
}
namePermitted = true;

Loading…
Cancel
Save