From dc80e662e74f9bbcb97da769919b862cd1fda640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Tue, 17 Aug 2021 15:59:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-57233=20=E3=80=90FRM=E5=B8=83?= =?UTF-8?q?=E5=B1=80=E6=8E=A8=E8=8D=90=E3=80=91=E7=BB=84=E4=BB=B6=E5=A4=8D?= =?UTF-8?q?=E7=94=A8-=E5=AF=B9=E9=BD=90=E3=80=81=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E9=97=B4=E8=B7=9D=E3=80=81=E6=89=8B=E5=8A=A8=E9=97=B4=E8=B7=9D?= =?UTF-8?q?=EF=BC=8C=E8=B0=83=E6=95=B4=E5=90=8E=E6=B2=A1=E6=9C=89=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E6=A8=A1=E6=9D=BF=E7=9A=84=E4=BF=9D=E5=AD=98=E5=92=8C?= =?UTF-8?q?=E8=BF=98=E5=8E=9F=E6=8C=89=E9=92=AE=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E5=85=B3=E9=97=AD=E5=86=8D=E6=89=93=E5=BC=80=E6=AD=A4=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF=E8=BF=98=E6=98=AF=E8=B0=83=E6=95=B4=E5=89=8D=E7=9A=84?= =?UTF-8?q?=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mainframe/MultiSelectionArrangement.java | 44 ++++++++++++++----- .../design/mainframe/WidgetPropertyPane.java | 14 ------ ...stractMultiSelectionArrangementButton.java | 27 ++++++++---- .../buttons/BottomAlignButton.java | 1 + .../buttons/HorizontalCenterButton.java | 1 + .../buttons/HorizontalDistributionButton.java | 1 + .../arrangement/buttons/LeftAlignButton.java | 1 + .../MultiSelectionArrangementButton.java | 4 -- .../arrangement/buttons/RightAlignButton.java | 1 + .../arrangement/buttons/TopAlignButton.java | 1 + .../buttons/VerticalCenterButton.java | 1 + .../buttons/VerticalDistributionButton.java | 1 + .../widget/ui/FormMultiWidgetCardPane.java | 41 ++++++++++++----- 13 files changed, 88 insertions(+), 50 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/MultiSelectionArrangement.java b/designer-form/src/main/java/com/fr/design/mainframe/MultiSelectionArrangement.java index 1b0962febd..b9eb18f753 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/MultiSelectionArrangement.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/MultiSelectionArrangement.java @@ -1,6 +1,12 @@ package com.fr.design.mainframe; import com.fr.design.designer.creator.XCreator; +import com.fr.design.designer.creator.XCreatorUtils; +import com.fr.design.designer.creator.XLayoutContainer; +import com.fr.design.designer.creator.XWFitLayout; +import com.fr.design.designer.creator.XWParameterLayout; +import com.fr.design.designer.creator.cardlayout.XWCardTagLayout; +import com.fr.form.ui.container.WLayout; import java.awt.Rectangle; import java.util.Arrays; @@ -10,6 +16,7 @@ import java.util.List; public class MultiSelectionArrangement { private FormDesigner designer; + private XLayoutContainer parent; // 当前选中的那些组件所在父容器 private List selectedCreators; private Rectangle rec; @@ -22,42 +29,42 @@ public class MultiSelectionArrangement { for (XCreator creator : selectedCreators) { creator.setLocation(rec.x, creator.getY()); } - repaint(); + update(); } public void rightAlign() { for (XCreator creator : selectedCreators) { creator.setLocation(rec.x + rec.width - creator.getWidth(), creator.getY()); } - repaint(); + update(); } public void topAlign() { for (XCreator creator : selectedCreators) { creator.setLocation(creator.getX(), rec.y); } - repaint(); + update(); } public void bottomAlign() { for (XCreator creator : selectedCreators) { creator.setLocation(creator.getX(), rec.y + rec.height - creator.getHeight()); } - repaint(); + update(); } public void horizontalCenterAlign() { for (XCreator creator : selectedCreators) { creator.setLocation(rec.x + rec.width / 2 - creator.getWidth() / 2, creator.getY()); } - repaint(); + update(); } public void verticalCenterAlign() { for (XCreator creator : selectedCreators) { creator.setLocation(creator.getX(), rec.y + rec.height / 2 - creator.getHeight() / 2); } - repaint(); + update(); } // 水平分布,自动,间距由selectedCreators和border共同计算而来 @@ -79,7 +86,7 @@ public class MultiSelectionArrangement { XCreator preCreator = selectedCreators.get(i - 1); creator.setLocation(preCreator.getX() + preCreator.getWidth() + gap, creator.getY()); } - repaint(); + update(); } private void reSizeRecByHorizontal(int gap) { @@ -151,7 +158,7 @@ public class MultiSelectionArrangement { XCreator preCreator = selectedCreators.get(i - 1); creator.setLocation(creator.getX(), preCreator.getY() + preCreator.getHeight() + gap); } - repaint(); + update(); } private void reSizeRecByVertical(int gap) { @@ -209,10 +216,25 @@ public class MultiSelectionArrangement { FormSelection selection = designer.getSelectionModel().getSelection(); this.selectedCreators = Arrays.asList(selection.getSelectedCreators()); this.rec = selection.getSelctionBounds(); + this.parent = getParent(selection.getSelectedCreator()); + + if (parent != null) { + // 这里要修改修改engine里面的对象才能成功保存,光修改设计器对象没用 + WLayout wabs = parent.toData(); + for (XCreator creator : selectedCreators) { + wabs.setBounds(creator.toData(), creator.getBounds()); + } + } } - private void repaint() { - designer.repaint(); - update(); + private XLayoutContainer getParent(XCreator source) { + if(source.acceptType(XWCardTagLayout.class)){ + return (XLayoutContainer)source.getParent(); + } + XLayoutContainer container = XCreatorUtils.getParentXLayoutContainer(source); + if (source.acceptType(XWFitLayout.class) || source.acceptType(XWParameterLayout.class)) { + container = null; + } + return container; } } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java b/designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java index b4fc1122bc..e61e8a600e 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/WidgetPropertyPane.java @@ -412,20 +412,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper if (!isValid) { return; } - //fanglei:下面的注释不要删,只是暂时屏蔽 -// int value = downPanel.getVerticalScrollBar().getValue(); -// if (hasSelectParaPane(getEditingFormDesigner())) { -// cardLayout.show(centerPane, PARA); -// mobileParaWidgetTable.refreshData(); -// } else { -// cardLayout.show(centerPane, BODY); -// mobileWidgetTable.refreshData(); -// } -// //出现滚动条 -// downPanel.doLayout(); -// //控件列表选中某组件,触发表单中选中控件,选中事件又触发列表刷新,滚动条回到0 -// //此处设置滚动条值为刷新前 -// downPanel.getVerticalScrollBar().setValue(value); if (mobileExtraPropertyPanes != null) { for (MobileWidgetDefinePane extraPane : mobileExtraPropertyPanes) { extraPane.populate(designer); diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/AbstractMultiSelectionArrangementButton.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/AbstractMultiSelectionArrangementButton.java index ac687d4256..dc268f4c5b 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/AbstractMultiSelectionArrangementButton.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/AbstractMultiSelectionArrangementButton.java @@ -1,23 +1,32 @@ package com.fr.design.mainframe.widget.arrangement.buttons; +import com.fr.design.event.UIObserver; +import com.fr.design.event.UIObserverListener; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.mainframe.MultiSelectionArrangement; -public abstract class AbstractMultiSelectionArrangementButton implements MultiSelectionArrangementButton { +public abstract class AbstractMultiSelectionArrangementButton extends UIButton implements MultiSelectionArrangementButton, UIObserver { + private static final long serialVersionUID = -2114423583742242771L; protected MultiSelectionArrangement arrangement; + protected UIObserverListener uiObserverListener; public AbstractMultiSelectionArrangementButton(MultiSelectionArrangement arrangement) { + super(); this.arrangement = arrangement; + this.setNormalPainted(false); + this.setBorderPaintedOnlyWhenPressed(true); + this.setIcon(getIcon()); + this.setToolTipText(getTipText()); + this.addActionListener(getActionListener()); } @Override - public UIButton create() { - UIButton btn = new UIButton(); - btn.setNormalPainted(false); - btn.setBorderPaintedOnlyWhenPressed(true); - btn.setIcon(getIcon()); - btn.setToolTipText(getTipText()); - btn.addActionListener(getActionListener()); - return btn; + public void registerChangeListener(UIObserverListener listener) { + uiObserverListener = listener; + } + + @Override + public boolean shouldResponseChangeListener() { + return true; } } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/BottomAlignButton.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/BottomAlignButton.java index 41318ff67b..99bf3a6c3a 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/BottomAlignButton.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/BottomAlignButton.java @@ -29,6 +29,7 @@ public class BottomAlignButton extends AbstractMultiSelectionArrangementButton { @Override public void actionPerformed(ActionEvent e) { arrangement.bottomAlign(); + uiObserverListener.doChange(); } }; } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/HorizontalCenterButton.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/HorizontalCenterButton.java index 7eface48f4..6dc9c09b4a 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/HorizontalCenterButton.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/HorizontalCenterButton.java @@ -29,6 +29,7 @@ public class HorizontalCenterButton extends AbstractMultiSelectionArrangementBut @Override public void actionPerformed(ActionEvent e) { arrangement.horizontalCenterAlign(); + uiObserverListener.doChange(); } }; } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/HorizontalDistributionButton.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/HorizontalDistributionButton.java index 678ce895bf..0a0e225fc6 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/HorizontalDistributionButton.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/HorizontalDistributionButton.java @@ -29,6 +29,7 @@ public class HorizontalDistributionButton extends AbstractMultiSelectionArrangem @Override public void actionPerformed(ActionEvent e) { arrangement.horizontalAutoDistribution(); + uiObserverListener.doChange(); } }; } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/LeftAlignButton.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/LeftAlignButton.java index 3f8d685c77..20a25a87cb 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/LeftAlignButton.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/LeftAlignButton.java @@ -29,6 +29,7 @@ public class LeftAlignButton extends AbstractMultiSelectionArrangementButton { @Override public void actionPerformed(ActionEvent e) { arrangement.leftAlign(); + uiObserverListener.doChange(); } }; } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/MultiSelectionArrangementButton.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/MultiSelectionArrangementButton.java index 06bc2026be..99b7635708 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/MultiSelectionArrangementButton.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/MultiSelectionArrangementButton.java @@ -1,7 +1,5 @@ package com.fr.design.mainframe.widget.arrangement.buttons; -import com.fr.design.gui.ibutton.UIButton; - import javax.swing.Icon; import java.awt.event.ActionListener; @@ -11,6 +9,4 @@ public interface MultiSelectionArrangementButton { String getTipText(); ActionListener getActionListener(); - - UIButton create(); } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/RightAlignButton.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/RightAlignButton.java index 02f20fc45e..5fac70bd7a 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/RightAlignButton.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/RightAlignButton.java @@ -29,6 +29,7 @@ public class RightAlignButton extends AbstractMultiSelectionArrangementButton { @Override public void actionPerformed(ActionEvent e) { arrangement.rightAlign(); + uiObserverListener.doChange(); } }; } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/TopAlignButton.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/TopAlignButton.java index 7100b3b960..ebb2c4d21a 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/TopAlignButton.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/TopAlignButton.java @@ -29,6 +29,7 @@ public class TopAlignButton extends AbstractMultiSelectionArrangementButton { @Override public void actionPerformed(ActionEvent e) { arrangement.topAlign(); + uiObserverListener.doChange(); } }; } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/VerticalCenterButton.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/VerticalCenterButton.java index 81d86d5583..9898f9002c 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/VerticalCenterButton.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/VerticalCenterButton.java @@ -29,6 +29,7 @@ public class VerticalCenterButton extends AbstractMultiSelectionArrangementButto @Override public void actionPerformed(ActionEvent e) { arrangement.verticalCenterAlign(); + uiObserverListener.doChange(); } }; } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/VerticalDistributionButton.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/VerticalDistributionButton.java index 538463b6b3..50ec6ac894 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/VerticalDistributionButton.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/arrangement/buttons/VerticalDistributionButton.java @@ -29,6 +29,7 @@ public class VerticalDistributionButton extends AbstractMultiSelectionArrangemen @Override public void actionPerformed(ActionEvent e) { arrangement.verticalAutoDistribution(); + uiObserverListener.doChange(); } }; } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormMultiWidgetCardPane.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormMultiWidgetCardPane.java index 699c34b2a4..57076e066f 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormMultiWidgetCardPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormMultiWidgetCardPane.java @@ -1,8 +1,10 @@ package com.fr.design.mainframe.widget.ui; +import com.fr.design.designer.beans.events.DesignerEvent; +import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UIPositiveAndNegativeIntNumberField; +import com.fr.design.gui.itextfield.UIIntNumberField; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; @@ -19,6 +21,7 @@ import com.fr.design.mainframe.widget.arrangement.buttons.VerticalCenterButton; import com.fr.design.mainframe.widget.arrangement.buttons.VerticalDistributionButton; import com.fr.general.IOUtils; import com.fr.stable.StableUtils; +import com.fr.stable.StringUtils; import javax.swing.BorderFactory; import javax.swing.JPanel; @@ -30,6 +33,7 @@ import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; public class FormMultiWidgetCardPane extends FormWidgetCardPane { + private AttributeChangeListener listener; private MultiSelectionArrangement arrangement; public FormMultiWidgetCardPane(FormDesigner designer) { @@ -40,6 +44,12 @@ public class FormMultiWidgetCardPane extends FormWidgetCardPane { arrangement = new MultiSelectionArrangement(designer); content.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 0)); content.add(createArrangementLayoutPane(), BorderLayout.CENTER); + this.listener = new AttributeChangeListener() { + @Override + public void attributeChange() { + designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_RESIZED); + } + }; } // 整个排列分布面板的layout,可以看成一个三行一列的表格,第一行是分布,第二行是自动间距,第三行是手动间距 @@ -73,12 +83,12 @@ public class FormMultiWidgetCardPane extends FormWidgetCardPane { }; Component[][] components = new Component[][] { new Component[] { - new LeftAlignButton(arrangement).create(), - new HorizontalCenterButton(arrangement).create(), - new RightAlignButton(arrangement).create(), - new TopAlignButton(arrangement).create(), - new VerticalCenterButton(arrangement).create(), - new BottomAlignButton(arrangement).create() + new LeftAlignButton(arrangement), + new HorizontalCenterButton(arrangement), + new RightAlignButton(arrangement), + new TopAlignButton(arrangement), + new VerticalCenterButton(arrangement), + new BottomAlignButton(arrangement) } }; JPanel centerPane = TableLayoutHelper.createGapTableLayoutPane(components, rowSize, columnSize, 18, 0); @@ -92,8 +102,8 @@ public class FormMultiWidgetCardPane extends FormWidgetCardPane { TableLayout.PREFERRED, TableLayout.PREFERRED }; - UIButton horizontalAutoSpacingBtn = new HorizontalDistributionButton(arrangement).create(); - UIButton verticalAutoSpacingBtn = new VerticalDistributionButton(arrangement).create(); + UIButton horizontalAutoSpacingBtn = new HorizontalDistributionButton(arrangement); + UIButton verticalAutoSpacingBtn = new VerticalDistributionButton(arrangement); if (designer.getSelectionModel().getSelection().size() < 3) { horizontalAutoSpacingBtn.setEnabled(false); verticalAutoSpacingBtn.setEnabled(false); @@ -147,8 +157,8 @@ public class FormMultiWidgetCardPane extends FormWidgetCardPane { return createTitleLayout(Toolkit.i18nText("Fine-Design_Multi_Selection_Manual_Spacing"), centerPane); } - private UIPositiveAndNegativeIntNumberField createIntNumberField(boolean isVertical) { - final UIPositiveAndNegativeIntNumberField intNumberField = new UIPositiveAndNegativeIntNumberField(); + private UIIntNumberField createIntNumberField(boolean isVertical) { + final UIIntNumberField intNumberField = new UIIntNumberField(); intNumberField.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { @@ -167,12 +177,13 @@ public class FormMultiWidgetCardPane extends FormWidgetCardPane { } private void distributionDoChange(String text, boolean isVertical) { - if (StableUtils.isNumber(text)) { + if (StringUtils.isNotEmpty(text) && StableUtils.isNumber(text)) { if (isVertical) { arrangement.verticalManualDistribution(Math.round(Float.parseFloat(text))); } else { arrangement.horizontalManualDistribution(Math.round(Float.parseFloat(text))); } + attributeChanged(); } } @@ -184,4 +195,10 @@ public class FormMultiWidgetCardPane extends FormWidgetCardPane { jPanel.add(centerPane, BorderLayout.CENTER); return jPanel; } + + @Override + public void populate() { + initListener(this); + this.addAttributeChangeListener(listener); + } } From d09a4584793f1dcc35147ebf8a383ebe1355b013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=B9=E7=A3=8A?= <294531121@qq.com> Date: Tue, 17 Aug 2021 16:05:30 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-57233=20=E4=BF=AE=E6=AD=A3=E6=9C=AC?= =?UTF-8?q?=E5=9C=B0=E8=B0=83=E8=AF=95=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/mainframe/widget/ui/FormMultiWidgetCardPane.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormMultiWidgetCardPane.java b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormMultiWidgetCardPane.java index 57076e066f..b053ea6337 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormMultiWidgetCardPane.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/widget/ui/FormMultiWidgetCardPane.java @@ -4,7 +4,7 @@ import com.fr.design.designer.beans.events.DesignerEvent; import com.fr.design.gui.frpane.AttributeChangeListener; import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ilable.UILabel; -import com.fr.design.gui.itextfield.UIIntNumberField; +import com.fr.design.gui.itextfield.UIPositiveAndNegativeIntNumberField; import com.fr.design.gui.itextfield.UITextField; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.TableLayout; @@ -157,8 +157,8 @@ public class FormMultiWidgetCardPane extends FormWidgetCardPane { return createTitleLayout(Toolkit.i18nText("Fine-Design_Multi_Selection_Manual_Spacing"), centerPane); } - private UIIntNumberField createIntNumberField(boolean isVertical) { - final UIIntNumberField intNumberField = new UIIntNumberField(); + private UIPositiveAndNegativeIntNumberField createIntNumberField(boolean isVertical) { + final UIPositiveAndNegativeIntNumberField intNumberField = new UIPositiveAndNegativeIntNumberField(); intNumberField.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) {