diff --git a/designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java b/designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java index 1b532f7f99..5fb559fc4d 100644 --- a/designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java +++ b/designer_form/src/com/fr/design/designer/creator/XBorderStyleWidgetCreator.java @@ -27,8 +27,6 @@ import com.fr.stable.StringUtils; */ public class XBorderStyleWidgetCreator extends XWidgetCreator{ - private int noneSize = 0; - protected static final Dimension BORDER_PREFERRED_SIZE = new Dimension(250, 150); public XBorderStyleWidgetCreator(Widget widget, Dimension initSize) { @@ -58,7 +56,7 @@ public class XBorderStyleWidgetCreator extends XWidgetCreator{ protected void initBorderStyle() { LayoutBorderStyle style = toData().getBorderStyle(); if (style != null && style.getBorder() != Constants.LINE_NONE) { - this.setBorder(new UIRoundedBorder(style.getBorder(), style.getColor(), style.isCorner() ? style.getBorderRadius() : noneSize)); + this.setBorder(new UIRoundedBorder(style.getBorder(), style.getColor(), style.getBorderRadius())); } else { this.setBorder(DEFALUTBORDER); } @@ -108,8 +106,8 @@ public class XBorderStyleWidgetCreator extends XWidgetCreator{ //标题的边框样式目前是取对应的控件的边框样式 title.setBorder(style.getBorder()); title.setColor(style.getColor()); - title.setCorner(style.isCorner()); - +// title.setCorner(style.isCorner()); + WidgetTitle wTitle = style.getTitle(); //设置成随机不重复的, 不然都用一个名字的话, 联动只能联动一个 title.setWidgetName(wTitle.TITLE_NAME_INDEX + this.toData().getWidgetName()); diff --git a/designer_form/src/com/fr/design/gui/xpane/LayoutBorderPane.java b/designer_form/src/com/fr/design/gui/xpane/LayoutBorderPane.java index 1a1dd071ce..26f407702d 100644 --- a/designer_form/src/com/fr/design/gui/xpane/LayoutBorderPane.java +++ b/designer_form/src/com/fr/design/gui/xpane/LayoutBorderPane.java @@ -58,6 +58,7 @@ public class LayoutBorderPane extends BasicPane { private static final int RIGHTANGLE_BORDERS = 1; private static final int ROUNDED_BORDERS = 2; private static final int MAX_WIDTH = 220; + private static final int NO_RADIUS = 0; private LayoutBorderStyle borderStyle = new LayoutBorderStyle(); @@ -362,7 +363,7 @@ public class LayoutBorderPane extends BasicPane { transparencyPane.add(new UILabel(" %"), BorderLayout.EAST); double p = TableLayout.PREFERRED; - double[] rowSize = {p,p,p,p,p,p,p}; + double[] rowSize = {p,p,p,p,p,p,p,p}; double[] columnSize = { p, MAX_WIDTH}; JPanel rightTopContentPane = TableLayoutHelper.createCommonTableLayoutPane(new JComponent[][]{ {new UILabel(Inter.getLocText("FR-Designer-Widget-Style_Frame_Style")), borderTypeCombo}, @@ -510,7 +511,6 @@ public class LayoutBorderPane extends BasicPane { style.setColor(currentLineColorPane.getColor()); style.setBackground(backgroundPane.update()); style.setAlpha((float)(numberDragPane.updateBean()/maxNumber)); - style.setCorner(true); WidgetTitle title = style.getTitle() == null ? new WidgetTitle() : style.getTitle(); title.setTextObject(formulaPane.updateBean()); FRFont frFont = title.getFrFont(); @@ -774,9 +774,9 @@ public class LayoutBorderPane extends BasicPane { public void populate(LayoutBorderStyle style) { if(style.getBorder() == Constants.LINE_NONE) { group.setSelected(noBorder.getModel(), true); - } else if(style.isCorner()) { - group.setSelected(RoundedBorder.getModel(), true); - } else { + } else if(style.getBorderRadius() != NO_RADIUS) { + group.setSelected(RoundedBorder.getModel(), true); + } else { group.setSelected(normalBorder.getModel(), true); } } @@ -817,7 +817,7 @@ public class LayoutBorderPane extends BasicPane { } else { borderStyle.setColor(currentLineColorPane.getColor()); borderStyle.setBorder(currentLineCombo.getSelectedLineStyle()); - borderStyle.setCorner(border != RIGHTANGLE_BORDERS); + borderStyle.setBorderRadius((int)borderCornerSpinner.getValue()); } layoutBorderPreviewPane.repaint();