Browse Source

Pull request #5135: REPORT-55850 【组件背景分离】组件复用-Tab组件背景和边框预览不生效

Merge in DESIGN/design from ~STARRYI/design:final/10.0 to final/10.0

* commit 'b2bf9dd2c431717a46614f6762161baa1574d2c6':
  REPORT-55850 【组件背景分离】组件复用-Tab组件背景和边框预览不生效
final/10.0
Kara 3 years ago
parent
commit
a9bd4a0daf
  1. 5
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java
  2. 15
      designer-form/src/main/java/com/fr/design/gui/xpane/CardTagLayoutStylePane.java
  3. 6
      designer-form/src/main/java/com/fr/design/gui/xpane/LayoutStylePane.java

5
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java

@ -415,7 +415,10 @@ public class XWCardMainBorderLayout extends XWBorderLayout {
*/ */
@Override @Override
public void firePropertyChange(){ public void firePropertyChange(){
return; XWCardLayout cardLayout = this.getCardPart();
if (cardLayout != null && cardLayout.toData() != null) {
cardLayout.initStyle();
}
} }

15
designer-form/src/main/java/com/fr/design/gui/xpane/CardTagLayoutStylePane.java

@ -3,9 +3,7 @@
*/ */
package com.fr.design.gui.xpane; package com.fr.design.gui.xpane;
import com.fr.form.ui.LayoutBorderStyle; import javax.swing.JPanel;
import javax.swing.*;
/** /**
* CardTagLayoutBorderPane Pane. * CardTagLayoutBorderPane Pane.
@ -14,14 +12,13 @@ public class CardTagLayoutStylePane extends LayoutStylePane {
@Override @Override
protected JPanel createTitleStylePane(){ protected JPanel createTitleStylePane(){
return null; JPanel panel = super.createTitleStylePane();
panel.setVisible(false);
return panel;
} }
@Override @Override
public void updateTitle(LayoutBorderStyle style) { protected JPanel createBackgroundStylePane(boolean supportCornerRadius) {
return super.createBackgroundStylePane(false);
} }
@Override
protected void populateTitle() { }
} }

6
designer-form/src/main/java/com/fr/design/gui/xpane/LayoutStylePane.java

@ -110,7 +110,7 @@ public class LayoutStylePane extends BasicBeanPane<LayoutBorderStyle> {
JPanel titlePane = createTitleStylePane(); JPanel titlePane = createTitleStylePane();
JPanel bodyContentPane = currentIsRootLayout ? createBodyContentPane4RootLayout() : createBodyContentPane(); JPanel bodyContentPane = currentIsRootLayout ? createBodyContentPane4RootLayout() : createBodyContentPane();
JPanel backgroundPane = createBackgroundStylePane(); JPanel backgroundPane = createBackgroundStylePane(true);
if (titlePane != null) { if (titlePane != null) {
container.add(titlePane, BorderLayout.NORTH); container.add(titlePane, BorderLayout.NORTH);
@ -135,14 +135,14 @@ public class LayoutStylePane extends BasicBeanPane<LayoutBorderStyle> {
this.add(container, BorderLayout.CENTER); this.add(container, BorderLayout.CENTER);
} }
protected JPanel createBackgroundStylePane() { protected JPanel createBackgroundStylePane(boolean supportCornerRadius) {
borderStyleCombo = new UIComboBox(BORDER_STYLE); borderStyleCombo = new UIComboBox(BORDER_STYLE);
borderLineAndImagePane = new BorderLineAndImagePane(this.supportBorderImage); borderLineAndImagePane = new BorderLineAndImagePane(this.supportBorderImage);
cornerSpinner = new UISpinner(0,1000,1,0); cornerSpinner = new UISpinner(0,1000,1,0);
double p = TableLayout.PREFERRED; double p = TableLayout.PREFERRED;
double f = TableLayout.FILL; double f = TableLayout.FILL;
double[] rowSize = {p, p, p, p}; double[] rowSize = supportCornerRadius ? new double[] {p, p, p, p} : new double[]{p, p, p};
double[] columnSize = {SETTING_LABEL_WIDTH, f}; double[] columnSize = {SETTING_LABEL_WIDTH, f};
UILabel uiLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget-Style_Background_Style")); UILabel uiLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget-Style_Background_Style"));

Loading…
Cancel
Save