diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java index fdfaaa0dc4..27954b20b6 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XCardSwitchButton.java @@ -251,7 +251,9 @@ public class XCardSwitchButton extends XButton { Point position = button.getLocation(); int width = button.getWidth(); int height = button.getHeight(); - + + ey = ey % DEFAULT_BUTTON_HEIGHT; + // 鼠标进入按钮右侧删除图标区域 double recX = position.getX() + (width - RIGHT_OFFSET); double recY = position.getY() + (height - TOP_OFFSET); @@ -337,6 +339,12 @@ public class XCardSwitchButton extends XButton { //删除tab布局 private void deleteTabLayout(SelectionModel selectionModel,FormDesigner designer){ + String titleName = this.getContentLabel().getText(); + int value = JOptionPane.showConfirmDialog(null, Inter.getLocText("FR-Designer_ConfirmDialog_Content") + "“" + titleName + "”", + Inter.getLocText("FR-Designer_ConfirmDialog_Title"),JOptionPane.YES_NO_OPTION); + if (value != JOptionPane.OK_OPTION) { + return; + } XLayoutContainer mainLayout = this.cardLayout.getBackupParent(); if(mainLayout != null){ selectionModel.setSelectedCreator(mainLayout); diff --git a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java index e9d7b58c31..7276df53de 100644 --- a/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java +++ b/designer_form/src/com/fr/design/designer/creator/cardlayout/XWTabFitLayout.java @@ -45,6 +45,9 @@ public class XWTabFitLayout extends XWFitLayout { // tab布局在拖拽导致的缩放里(含间隔时),如果拖拽宽高大于组件宽高,会导致调整的时候找不到原来的组件 // 这里先将拖拽之前的宽高先做备份 private static final Color NORMAL_GRAL = new Color(236,236,236); + private static final String DEFAULT_FONT_NAME = "SimSun"; + public final static Font DEFAULTFT = new Font("Song_TypeFace",0,12); + public final static FRFont DEFAULT_FRFT = FRFont.getInstance(DEFAULT_FONT_NAME, 0, 9); private Dimension referDim; private Background initialBackground; private Background overBackground; @@ -229,16 +232,21 @@ public class XWTabFitLayout extends XWFitLayout { boolean isStyle = ((WTabFitLayout) data).isCustomStyle(); Background bg; bg = ColorBackground.getInstance(NORMAL_GRAL); + CardSwitchButton cardSwitchButton = (CardSwitchButton) this.xCardSwitchButton.toData(); if (!isStyle) { this.xCardSwitchButton.setCustomStyle(false); this.xCardSwitchButton.setSelectBackground(bg); + this.xCardSwitchButton.getLabel().setFont(DEFAULTFT); + cardSwitchButton.setFont(DEFAULT_FRFT); } else { - CardSwitchButton cardSwitchButton = (CardSwitchButton) this.xCardSwitchButton.toData(); Background initialBackground = cardSwitchButton.getInitialBackground(); bg = initialBackground == null ? bg : initialBackground; this.xCardSwitchButton.setSelectBackground(bg); this.xCardSwitchButton.setCustomStyle(true); cardSwitchButton.setCustomStyle(true); + if (font != null) { + cardSwitchButton.setFont(font); + } } }