Browse Source

Merge pull request #7039 in DESIGN/design from bugfix/10.0 to feature/10.0

* commit '7439a1d4d85fd09426a2f477ba2ced64ba971521':
  REPORT-63092 漏传了import语句
  REPORT-63499
  REPORT-63499 按钮控件树节点配置控件事件,设计器上显示有问题
  update
  CHART-21584 feat:fvs.chart.font 单位px 范围6-200
  REPORT-60161 【组件背景分离】设置九点图的线在边界上后,其他操作回来发现恢复成默认井字型
  REPORT-56014 & REPORT-56015 【组件背景分离】【下个版本】组件复用-组件边框点九图,如果线重叠了的话,web端显示有问题
feature/10.0
superman 3 years ago
parent
commit
3afd88fb96
  1. 4
      designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java
  2. 8
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java
  3. 13
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithAuto.java
  4. 24
      designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java
  5. 1
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java

4
designer-base/src/main/java/com/fr/design/gui/controlpane/UIListGroupControlPane.java

@ -125,7 +125,9 @@ public abstract class UIListGroupControlPane extends UIControlPane implements Li
for (int i = 0, size = widget.getListenerSize(); i < size; i++) {
Listener listener = widget.getListener(i);
if (!listener.isDefault()) {
nameObjectList.add(i, new NameObject(switchLang(listener.getEventName()) + (i + 1), listener));
String eventName = switchLang(listener.getEventName()) + (nameObjectList.size() + 1);
NameObject nameObject = new NameObject(eventName, listener);
nameObjectList.add(nameObject);
}
}
populate(getHelper().processCatalog(nameObjectList));

8
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPane.java

@ -13,6 +13,7 @@ import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.TableLayout;
import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont;
import com.fr.general.GeneralUtils;
@ -29,16 +30,21 @@ public class ChartTextAttrPane extends BasicPane {
private static final long serialVersionUID = 6731679928019436869L;
public static final int FONT_START = 6;
public static final int FONT_END = 72;
public static final int FONT_END_4_DUCHAMP = 200;
private UIComboBox fontNameComboBox;
private UIComboBox fontSizeComboBox;
private UIToggleButton bold;
private UIToggleButton italic;
private UIColorButton fontColor;
public static Integer[] FONT_SIZES = new Integer[FONT_END - FONT_START + 1];
private static Integer[] FONT_SIZES_4_DUCHAMP = new Integer[FONT_END_4_DUCHAMP - FONT_START + 1];
static {
for (int i = FONT_START; i <= FONT_END; i++) {
FONT_SIZES[i - FONT_START] = i;
}
for (int i = FONT_START; i <= FONT_END_4_DUCHAMP; i++) {
FONT_SIZES_4_DUCHAMP[i - FONT_START] = i;
}
}
public ChartTextAttrPane() {
@ -176,7 +182,7 @@ public class ChartTextAttrPane extends BasicPane {
}
protected Object[] getFontSizeComboBoxModel() {
return FONT_SIZES;
return ChartEditContext.duchampMode() ? FONT_SIZES_4_DUCHAMP : FONT_SIZES;
}
protected void initState() {

13
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/style/ChartTextAttrPaneWithAuto.java

@ -4,23 +4,30 @@ import com.fr.chart.base.ChartConstants;
import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIColorButtonWithAuto;
import com.fr.design.i18n.Toolkit;
import com.fr.plugin.chart.type.FontAutoType;
import com.fr.design.mainframe.chart.mode.ChartEditContext;
import com.fr.general.ComparatorUtils;
import com.fr.general.FRFont;
import com.fr.general.GeneralUtils;
import com.fr.plugin.chart.type.FontAutoType;
public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
private static final String AUTO = Toolkit.i18nText("Fine-Design_Basic_ChartF_Auto");
private FontAutoType type;
public static String[] FONT_SIZES_WITH_AUTO = new String[FONT_END - FONT_START + 2];
private static String[] FONT_SIZES_WITH_AUTO_4_DUCHAMP = new String[FONT_END_4_DUCHAMP - FONT_START + 2];
static {
FONT_SIZES_WITH_AUTO[0] = AUTO;
FONT_SIZES_WITH_AUTO_4_DUCHAMP[0] = AUTO;
for (int i = 1; i < FONT_SIZES_WITH_AUTO.length; i++) {
FONT_SIZES_WITH_AUTO[i] = FONT_START + i - 1 + "";
}
for (int i = 1; i < FONT_SIZES_WITH_AUTO_4_DUCHAMP.length; i++) {
FONT_SIZES_WITH_AUTO_4_DUCHAMP[i] = FONT_START + i - 1 + "";
}
}
public ChartTextAttrPaneWithAuto(FontAutoType type) {
@ -42,7 +49,9 @@ public class ChartTextAttrPaneWithAuto extends ChartTextAttrPane {
}
protected Object[] getFontSizeComboBoxModel() {
return isFontSizeAuto() ? FONT_SIZES_WITH_AUTO : FONT_SIZES;
return isFontSizeAuto()
? (ChartEditContext.duchampMode() ? FONT_SIZES_WITH_AUTO_4_DUCHAMP : FONT_SIZES_WITH_AUTO)
: super.getFontSizeComboBoxModel();
}
protected float updateFontSize() {

24
designer-form/src/main/java/com/fr/design/gui/xpane/BorderLineAndImagePane.java

@ -298,15 +298,16 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver {
Background borderImage = style.getBorderImage();
if (borderImage instanceof ImageBackground) {
// 图片类型边框
Image image = ((ImageBackground) borderImage).getImage();
int[] ninePoint = ((ImageBackground) borderImage).getNinePoint();
ImageBackground imageBackground = (ImageBackground) borderImage;
Image image = imageBackground.getImage();
if (image != null) {
this.borderLineCombo.selectBorderImage();
this.imagePreviewPane.setImageWithSuffix(((ImageBackground) borderImage).getImageWithSuffix());
this.tweakNinePointButton.setEnabled(true);
this.borderImageOpacityPane.populateBean(style.getBorderImageOpacity());
if (ninePoint != null && ninePoint.length == 4 && ninePoint[0] > 0 && ninePoint[1] > 0 && ninePoint[2] > 0 && ninePoint[3] > 0) {
int[] ninePoint = ((ImageBackground) borderImage).getNinePoint();
if (ninePoint != null && ninePoint.length == 4 && ninePoint[0] >= 0 && ninePoint[1] >= 0 && ninePoint[2] >= 0 && ninePoint[3] >= 0) {
this.ninePoint = Arrays.copyOf(ninePoint, 4);
} else {
this.ninePoint = new int[4];
@ -503,6 +504,7 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver {
private int ninePointBottom = -1;
private static final int MIN_NINE_POINT = 0;
private static final int MIN_GAP_PARALLEL_LINES = 1;
private int imgWidth;
private int imgHeight;
@ -773,8 +775,8 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver {
private void onNinePointTopChanged(int value) {
if (value < MIN_NINE_POINT) {
value = MIN_NINE_POINT;
} else if (value >= imgHeight - ninePointBottom) {
value = imgHeight - ninePointBottom - MIN_NINE_POINT;
} else if (value >= imgHeight - ninePointBottom - MIN_GAP_PARALLEL_LINES) {
value = imgHeight - ninePointBottom - MIN_GAP_PARALLEL_LINES;
}
this.ninePointTop = value;
repaint();
@ -783,8 +785,8 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver {
private void onNinePointBottomChanged(int value) {
if (value < MIN_NINE_POINT) {
value = MIN_NINE_POINT;
} else if (value >= imgHeight - ninePointTop) {
value = imgHeight - ninePointTop - MIN_NINE_POINT;
} else if (value >= imgHeight - ninePointTop - MIN_GAP_PARALLEL_LINES) {
value = imgHeight - ninePointTop - MIN_GAP_PARALLEL_LINES;
}
this.ninePointBottom = value;
repaint();
@ -793,8 +795,8 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver {
private void onNinePointLeftChanged(int value) {
if (value < MIN_NINE_POINT) {
value = MIN_NINE_POINT;
} else if (value >= imgWidth - ninePointRight) {
value = imgWidth - ninePointRight - MIN_NINE_POINT;
} else if (value >= imgWidth - ninePointRight - MIN_GAP_PARALLEL_LINES) {
value = imgWidth - ninePointRight - MIN_GAP_PARALLEL_LINES;
}
this.ninePointLeft = value;
repaint();
@ -803,8 +805,8 @@ public class BorderLineAndImagePane extends JPanel implements UIObserver {
private void onNinePointRightChanged(int value) {
if (value < MIN_NINE_POINT) {
value = MIN_NINE_POINT;
} else if (value >= imgWidth - ninePointLeft) {
value = imgWidth - ninePointLeft - MIN_NINE_POINT;
} else if (value >= imgWidth - ninePointLeft - MIN_GAP_PARALLEL_LINES) {
value = imgWidth - ninePointLeft - MIN_GAP_PARALLEL_LINES;
}
this.ninePointRight = value;
repaint();

1
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -16,6 +16,7 @@ import com.fr.design.actions.core.WorkBookSupportable;
import com.fr.design.actions.file.export.EmbeddedFormExportExportAction;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.cell.FloatElementsProvider;
import com.fr.design.constants.TableDataConstants;
import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.designer.TargetComponent;
import com.fr.design.designer.beans.actions.CopyAction;

Loading…
Cancel
Save