|
|
@ -1,5 +1,6 @@ |
|
|
|
package com.fr.design.widget.component; |
|
|
|
package com.fr.design.widget.component; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.formdev.flatlaf.util.ScaledEmptyBorder; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.dialog.BasicPane; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.ibutton.UIButtonGroup; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
@ -12,7 +13,6 @@ import javax.swing.JPanel; |
|
|
|
|
|
|
|
|
|
|
|
import static com.fine.swing.ui.layout.Layouts.cell; |
|
|
|
import static com.fine.swing.ui.layout.Layouts.cell; |
|
|
|
import static com.fine.swing.ui.layout.Layouts.column; |
|
|
|
import static com.fine.swing.ui.layout.Layouts.column; |
|
|
|
import static com.fine.swing.ui.layout.Layouts.flex; |
|
|
|
|
|
|
|
import static com.fine.swing.ui.layout.Layouts.row; |
|
|
|
import static com.fine.swing.ui.layout.Layouts.row; |
|
|
|
import static com.fr.design.constants.LayoutConstants.LEFT_WEIGHT; |
|
|
|
import static com.fr.design.constants.LayoutConstants.LEFT_WEIGHT; |
|
|
|
import static com.fr.design.constants.LayoutConstants.RIGHT_WEIGHT; |
|
|
|
import static com.fr.design.constants.LayoutConstants.RIGHT_WEIGHT; |
|
|
@ -40,26 +40,24 @@ public abstract class BackgroundCompPane<T extends Widget> extends BasicPane { |
|
|
|
backgroundHead = new UIButtonGroup(titles); |
|
|
|
backgroundHead = new UIButtonGroup(titles); |
|
|
|
panel = column(VERTICAL_GAP, |
|
|
|
panel = column(VERTICAL_GAP, |
|
|
|
row( |
|
|
|
row( |
|
|
|
flex(LEFT_WEIGHT), |
|
|
|
|
|
|
|
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Initial"))).weight(RIGHT_WEIGHT / 2), |
|
|
|
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Initial"))).weight(RIGHT_WEIGHT / 2), |
|
|
|
cell(initialBackgroundEditor).weight(RIGHT_WEIGHT / 2) |
|
|
|
cell(initialBackgroundEditor).weight(RIGHT_WEIGHT / 2) |
|
|
|
), |
|
|
|
), |
|
|
|
row( |
|
|
|
row( |
|
|
|
flex(LEFT_WEIGHT), |
|
|
|
|
|
|
|
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Over"))).weight(RIGHT_WEIGHT / 2), |
|
|
|
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Background_Over"))).weight(RIGHT_WEIGHT / 2), |
|
|
|
cell(overBackgroundEditor).weight(RIGHT_WEIGHT / 2) |
|
|
|
cell(overBackgroundEditor).weight(RIGHT_WEIGHT / 2) |
|
|
|
), |
|
|
|
), |
|
|
|
row( |
|
|
|
row( |
|
|
|
flex(LEFT_WEIGHT), |
|
|
|
|
|
|
|
cell(getClickLabel()).weight(RIGHT_WEIGHT / 2), |
|
|
|
cell(getClickLabel()).weight(RIGHT_WEIGHT / 2), |
|
|
|
cell(clickBackgroundEditor).weight(RIGHT_WEIGHT / 2) |
|
|
|
cell(clickBackgroundEditor).weight(RIGHT_WEIGHT / 2) |
|
|
|
) |
|
|
|
) |
|
|
|
).getComponent(); |
|
|
|
).with(it -> it.setBorder(new ScaledEmptyBorder(0, 10, 0, 0))).getComponent(); |
|
|
|
this.add(column(VERTICAL_GAP, |
|
|
|
this.add(column(VERTICAL_GAP, |
|
|
|
row( |
|
|
|
row( |
|
|
|
cell(headLabel).weight(LEFT_WEIGHT), |
|
|
|
cell(headLabel).weight(LEFT_WEIGHT), |
|
|
|
cell(backgroundHead).weight(RIGHT_WEIGHT) |
|
|
|
cell(backgroundHead).weight(RIGHT_WEIGHT) |
|
|
|
) |
|
|
|
), |
|
|
|
|
|
|
|
cell(panel) |
|
|
|
).getComponent()); |
|
|
|
).getComponent()); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|