Browse Source

提交面板布局问题&主题模板国际化布局问题&单元格不随渐变条变化

fbp/release
renekton 2 months ago
parent
commit
32ac35038d
  1. 17
      designer-base/src/main/java/com/fr/design/gui/style/AbstractTranslucentBackgroundSpecialPane.java
  2. 15
      designer-base/src/main/java/com/fr/design/gui/style/AlignmentPane.java
  3. 3
      designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java
  4. 10
      designer-base/src/main/java/com/fr/design/gui/style/ComponentIntegralStylePane.java
  5. 23
      designer-base/src/main/java/com/fr/design/gui/style/ComponentTitleStylePane.java
  6. 5
      designer-base/src/main/java/com/fr/design/gui/style/TextInsetImageBackgroundSpecialPane.java
  7. 5
      designer-base/src/main/java/com/fr/design/javascript/Commit2DBJavaScriptPane.java
  8. 3
      designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java
  9. 1
      designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java
  10. 6
      designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java
  11. 1
      designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java
  12. 1
      designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java
  13. 19
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java
  14. 4
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartTitleAndBackgroundStylePane.java
  15. 12
      designer-base/src/main/java/com/fr/design/mainframe/theme/edit/component/ComponentMarginStylePane.java
  16. 31
      designer-base/src/main/java/com/fr/design/style/background/gradient/GradientBar.java
  17. 19
      designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java
  18. 10
      designer-realize/src/main/java/com/fr/design/webattr/EventPane.java

17
designer-base/src/main/java/com/fr/design/gui/style/AbstractTranslucentBackgroundSpecialPane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.style;
import com.fine.theme.utils.FineLayoutBuilder;
import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.dialog.BasicPane;
@ -46,27 +47,25 @@ public abstract class AbstractTranslucentBackgroundSpecialPane<T extends Backgro
private void initializePane() {
setLayout(new BorderLayout(0, 0));
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] columnSize = {this.uiLabelWidth, this.uiSettingWidth > 0 ? this.uiSettingWidth : f};
// 确保BackgroundSpecialPane高度变化时,Label依然保持与其顶部对齐
JPanel backgroundLabelPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
backgroundLabelPane.setBorder(new ScaledEmptyBorder(7, 0, 0, 0));
backgroundLabelPane.add(FRWidgetFactory.createLineWrapLabel(backgroundName), BorderLayout.NORTH);
UILabel backgroundLabel = new UILabel(backgroundName);
backgroundLabel.setToolTipText(backgroundName);
backgroundLabelPane.add(backgroundLabel, BorderLayout.NORTH);
JPanel backgroundComposedPane = TableLayoutHelper.createGapTableLayoutPane(
JPanel backgroundComposedPane = FineLayoutBuilder.compatibleTableLayout(10,
new JComponent[][]{
{backgroundLabelPane, backgroundPane}
},
new double[]{p}, columnSize, IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1);
new double[]{1.2, 3});
JPanel opacityComposedPane = TableLayoutHelper.createGapTableLayoutPane(
JPanel opacityComposedPane = FineLayoutBuilder.compatibleTableLayout(10,
new JComponent[][]{
{new UILabel(""), FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget-Style_Alpha"))},
{new UILabel(""), opacityPane}
},
new double[]{p, p}, columnSize, IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1);
new double[]{1.2, 3});
opacityComposedPane.setBorder(new ScaledEmptyBorder(IntervalConstants.INTERVAL_L1, 0, 0, 0));
opacityComposedPane.setVisible(false);

15
designer-base/src/main/java/com/fr/design/gui/style/AlignmentPane.java

@ -212,11 +212,12 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
private JPanel seniorUpPane() {
return Layouts.column(LayoutConstants.VERTICAL_GAP,
row(
cell(new UILabel((Toolkit.i18nText("Fine-Design_Basic_Image_Layout")), SwingConstants.LEFT)).weight(1.2),
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Image_Layout"), SwingConstants.LEFT))
.with(it -> it.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Image_Layout"))).weight(1.2),
cell(imageLayoutComboBox).weight(3.0)
),
row(
cell(new UILabel((Toolkit.i18nText("Fine-Design_Basic_Style_Alignment_Text_Style")), SwingConstants.LEFT)).weight(1.2),
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_Style_Alignment_Text_Style"), SwingConstants.LEFT)).weight(1.2),
cell(textComboBox).weight(3.0)
)
).getComponent();
@ -225,12 +226,14 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
private JPanel seniorMiddlePane() {
rotationBarPane = ReactiveCardPane.create()
.addSupplier("hide", () -> Layouts.row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Text_Rotation"), SwingConstants.LEFT)).weight(1.2),
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Text_Rotation"), SwingConstants.LEFT))
.with(it -> it.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Text_Rotation"))).weight(1.2),
cell(textRotationComboBox).weight(3)
).getComponent())
.addSupplier("show", () -> Layouts.column(LayoutConstants.VERTICAL_GAP,
row(
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Text_Rotation"), SwingConstants.LEFT)).weight(1.2),
cell(new UILabel(Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Text_Rotation"), SwingConstants.LEFT))
.with(it -> it.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_StyleAlignment_Text_Rotation"))).weight(1.2),
cell(textRotationComboBox).weight(3)
),
row(
@ -249,9 +252,11 @@ public class AlignmentPane extends AbstractBasicStylePane implements GlobalNameO
private JPanel seniorDownPane() {
UILabel indentationLabel = new UILabel((Toolkit.i18nText("Fine-Design_Basic_Style_Alignment_Style_Indentation")), SwingConstants.LEFT);
indentationLabel.setToolTipText(indentationLabel.getText());
UILabel partSpacingLabel = new UILabel((Toolkit.i18nText("Fine-Design_Basic_Style_Alignment_Style_Part_Spacing")), SwingConstants.LEFT);
partSpacingLabel.setToolTipText(partSpacingLabel.getText());
UILabel spacingLabel = new UILabel((Toolkit.i18nText("Fine-Design_Basic_Style_Line_Spacing")), SwingConstants.LEFT);
spacingLabel.setToolTipText(spacingLabel.getText());
return Layouts.column(
row(
cell(indentationLabel).weight(1.2),

3
designer-base/src/main/java/com/fr/design/gui/style/BorderPane.java

@ -104,7 +104,8 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Color"), SwingConstants.LEFT)).weight(1.2),
cell(currentLineColorPane).weight(3)),
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Out_Border"), SwingConstants.LEFT)).weight(1.2),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Out_Border"), SwingConstants.LEFT))
.with(it -> it.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Out_Border"))).weight(1.2),
cell(outerToggleButton = new UIToggleButton(new Icon[]{new LazyIcon("out"),
IOUtils.readIcon("/com/fr/design/images/m_format/cellstyle/out_white.png")}, false)).
with(it -> it.setPreferredSize(new Dimension(-1, FineUIScale.scale(24)))).weight(3)),

10
designer-base/src/main/java/com/fr/design/gui/style/ComponentIntegralStylePane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.style;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ispinner.UISpinner;
@ -66,17 +67,12 @@ public class ComponentIntegralStylePane extends AbstractBorderPackerPane {
setLayout(FRGUIPaneFactory.createBorderLayout());
this.initializeComponents();
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] rowSize = supportCornerRadius ? new double[] {p, p, p} : new double[]{p, p};
double[] columnSize = {this.uiLabelWidth, this.uiSettingWidth > 0 ? this.uiSettingWidth : f};
JPanel content = TableLayoutHelper.createGapTableLayoutPane(new JComponent[][]{
JPanel content = FineLayoutBuilder.compatibleTableLayout(10, new JComponent[][]{
{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Style_Render_Style")), FRGUIPaneFactory.createBorderLayoutNorthPaneWithComponent(borderStyleCombo)},
{this.borderPane, null},
{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Radius")), cornerSpinner},
},
rowSize, columnSize, IntervalConstants.INTERVAL_L1, IntervalConstants.INTERVAL_L1);
new double[]{1.2, 3});
this.add(content, BorderLayout.NORTH);
}

23
designer-base/src/main/java/com/fr/design/gui/style/ComponentTitleStylePane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.style;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.Utils;
import com.fr.base.svg.IconUtils;
import com.fr.design.designer.IntervalConstants;
@ -187,21 +188,13 @@ public class ComponentTitleStylePane extends AbstractBorderPackerPane {
}
private JPanel createTitleContentPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] rowSize = {p};
double[] columnSize = {this.uiLabelWidth, this.uiSettingWidth > 0 ? this.uiSettingWidth : f};
return TableLayoutHelper.createCommonTableLayoutPane(
return FineLayoutBuilder.compatibleTableLayout(10,
new JComponent[][]{{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Style_Title_Content")), textContentPane}},
rowSize, columnSize, IntervalConstants.INTERVAL_L1);
new double[]{1.2, 3});
}
private JPanel createTitleOtherSettingPane() {
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] rowSize = {p, p, p, p, p};
double[] columnSize = {this.uiLabelWidth, this.uiSettingWidth > 0 ? this.uiSettingWidth : f};
JComponent[][] components = new JComponent[][]{
{FRWidgetFactory.createLineWrapLabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Style_Title_Format")), FRGUIPaneFactory.createBorderLayoutNorthPaneWithComponent(fontFamilyComboBox)},
@ -211,18 +204,14 @@ public class ComponentTitleStylePane extends AbstractBorderPackerPane {
{backgroundPane, null}
};
return TableLayoutHelper.createCommonTableLayoutPane(components, rowSize, columnSize, IntervalConstants.INTERVAL_L1);
return FineLayoutBuilder.compatibleTableLayout(10, components, new double[]{1.2, 3});
}
protected JPanel createTitleFontButtonPane(){
double p = TableLayout.PREFERRED;
double f = TableLayout.FILL;
double[] rowSize = {p};
double[] columnSize = {f, p, p, p, p};
JPanel buttonPane = TableLayoutHelper.createCommonTableLayoutPane( new JComponent[][] {
JPanel buttonPane = FineLayoutBuilder.compatibleTableLayout(10, new JComponent[][] {
{fontSizeComboBox, fontColorSelectPane, fontItalicButton, fontBoldButton, fontUnderlineButton},
}, rowSize, columnSize, IntervalConstants.INTERVAL_W0);
}, new double[]{1.2, 3});
JPanel containerPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
containerPane.add(buttonPane, BorderLayout.NORTH);

5
designer-base/src/main/java/com/fr/design/gui/style/TextInsetImageBackgroundSpecialPane.java

@ -1,5 +1,6 @@
package com.fr.design.gui.style;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.Style;
import com.fr.base.background.ImageBackground;
import com.fr.base.background.ImageFileBackground;
@ -154,7 +155,7 @@ public class TextInsetImageBackgroundSpecialPane extends JPanel implements UIObs
}
});
return TableLayoutHelper.createCommonTableLayoutPane(
return FineLayoutBuilder.compatibleTableLayout(10,
new JComponent[][]{
{null, deletableImagePreviewPane},
{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Style_Title_Inset_Relative_Location"))},
@ -162,7 +163,7 @@ public class TextInsetImageBackgroundSpecialPane extends JPanel implements UIObs
{null, new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Form_Widget_Style_Title_Inset_Padding"))},
{null, this.imagePaddingPane}
},
rowSize, columnSize, IntervalConstants.INTERVAL_L1);
new double[]{1.2, 3});
}
private void initImageFileChooserIfNotExist() {

5
designer-base/src/main/java/com/fr/design/javascript/Commit2DBJavaScriptPane.java

@ -17,6 +17,7 @@ import java.awt.Dimension;
import java.util.ArrayList;
import java.util.List;
import static com.fine.swing.ui.layout.Layouts.column;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.cell;
@ -53,14 +54,12 @@ public class Commit2DBJavaScriptPane extends FurtherBasicBeanPane<Commit2DBJavaS
}
cardPane.add((DBManipulationPane) this.dbmPaneList.get(i), cardNames[i]);
}
this.add(cardPane, BorderLayout.CENTER);
JPanel btPane = new JPanel(new BorderLayout());
btPane.setPreferredSize(createCallbackBtnPanePreferredSize());
this.add(row(cell(btPane), cell(new UILabel())).getComponent(), BorderLayout.SOUTH);
addCallbackButton = javaScriptActionPane.createCallButton();
btPane.add(addCallbackButton);
this.add(column(5, cell(cardPane), row(cell(btPane), cell(new UILabel()))).getComponent());
}
protected Dimension createCallbackBtnPanePreferredSize(){

3
designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/GradientBackgroundQuickPane.java

@ -43,6 +43,7 @@ public class GradientBackgroundQuickPane extends BackgroundQuickPane {
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Utils_Top_To_Bottom")};
Integer[] valueArray = {GradientBackground.LEFT2RIGHT, GradientBackground.TOP2BOTTOM};
directionPane = new UIButtonGroup<>(textArray, valueArray);
directionPane.setAllToolTips(textArray);
directionPane.setSelectedIndex(0);
gradientBar = new GradientBar(4, this.gradientBarWidth);
this.setLayout(new BorderLayout());
@ -91,6 +92,8 @@ public class GradientBackgroundQuickPane extends BackgroundQuickPane {
*/
@Override
public void registerChangeListener(final UIObserverListener listener) {
gradientBar.addChangeListener(new ChangeListenerImpl(listener));
directionPane.addChangeListener(new ChangeListenerImpl(listener));
}

1
designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/ImageBackgroundQuickPane.java

@ -50,6 +50,7 @@ public class ImageBackgroundQuickPane extends BackgroundQuickPane {
String[] nameArray = {com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background_Image_Default"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background_Image_Titled"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background_Image_Extend"), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background_Image_Adjust")};
Byte[] valueArray = {Constants.IMAGE_CENTER, Constants.IMAGE_TILED, Constants.IMAGE_EXTEND, Constants.IMAGE_ADJUST};
imageLayoutPane = new UIButtonGroup<Byte>(nameArray, valueArray);
imageLayoutPane.setAllToolTips(nameArray);
imageLayoutPane.setSelectedIndex(0);
previewPane = new ImagePreviewPane();

6
designer-base/src/main/java/com/fr/design/mainframe/backgroundpane/PatternBackgroundQuickPane.java

@ -61,10 +61,12 @@ public class PatternBackgroundQuickPane extends BackgroundQuickPane {
foregroundColorPane.setSelectObject(DEFAULT_BACKGROUND);
this.add(Layouts.column(LayoutConstants.VERTICAL_GAP,
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Foreground"), UILabel.LEFT)).weight(1),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Foreground"), UILabel.LEFT))
.with(it -> it.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Foreground"))).weight(1),
cell(foregroundColorPane).weight(4)),
row(
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background"), UILabel.LEFT)).weight(1),
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background"), UILabel.LEFT))
.with(it -> it.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Background"))).weight(1),
cell(backgroundColorPane).weight(4))
).with(it -> it.setBorder(new ScaledEmptyBorder(LayoutConstants.VERTICAL_GAP, 0, 0, 0))).getComponent(), BorderLayout.CENTER);
foregroundColorPane.addSelectChangeListener(colorChangeListener);

1
designer-base/src/main/java/com/fr/design/mainframe/theme/FormThemeProfilePane.java

@ -71,6 +71,7 @@ public class FormThemeProfilePane extends TemplateThemeProfilePane<FormTheme> {
componentStyleSettingPane = new ComponentStyleEditPane();
addCustomEditorPane(i18nText("Fine-Design_Predefined_Component_Style"), componentStyleSettingPane);
initializePane();
refreshExtraAdvancedPane();
}

1
designer-base/src/main/java/com/fr/design/mainframe/theme/ReportThemeProfilePane.java

@ -51,6 +51,7 @@ public class ReportThemeProfilePane extends TemplateThemeProfilePane<ReportTheme
addCustomEditorPane(Toolkit.i18nText("Fine-Design_Predefined_Template_Background"), reportBodyStyleSettingPane);
addCustomEditorPane(Toolkit.i18nText("Fine-Design_Predefined_Cell_Style"), createCellStyleSettingPane());
addCustomEditorPane(Toolkit.i18nText("Fine-Design_Predefined_Chart_Style"), createChartStyleSettingPane());
initializePane();
refreshExtraAdvancedPane();
}

19
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeEditorPane.java

@ -7,6 +7,7 @@ import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.TemplateThemeConfig;
import com.fr.base.theme.settings.ThemedCellStyleList;
import com.fr.base.theme.settings.ThemedColorScheme;
import com.fr.design.gui.frpane.FineTabbedPane;
import com.fr.widgettheme.ThemePreviewTerminal;
import com.fr.widgettheme.util.WidgetThemeDesignerUtils;
import com.fr.design.ExtraDesignClassManager;
@ -67,7 +68,8 @@ public abstract class TemplateThemeEditorPane<T extends TemplateTheme> extends J
protected final List<BasicBeanPane<T>> extraPaneList = new ArrayList<>();
protected boolean isPopulating = false;
protected UITabbedPane uiTabbedPane;
protected FineTabbedPane.TabPaneBuilder tabPaneBuilder;
protected FineTabbedPane uiTabbedPane;
private final TemplateThemeConfig<T> config;
@ -81,10 +83,10 @@ public abstract class TemplateThemeEditorPane<T extends TemplateTheme> extends J
super();
this.config = config;
theme = config.createNewTheme();
initializePane();
tabPaneBuilder = FineTabbedPane.builder();
}
private void initializePane() {
protected void initializePane() {
setLayout(new BorderLayout(0, 0));
setPreferredSize(FineUIScale.scale(new Dimension(RIGHT_PANE_WIDTH, RIGHT_PANE_HEIGHT)));
JPanel nameEditPane = createNameEditPane();
@ -180,9 +182,7 @@ public abstract class TemplateThemeEditorPane<T extends TemplateTheme> extends J
protected JPanel createCustomEditorsPane() {
JPanel container = new JPanel(new BorderLayout());
container.setBorder(BorderUtils.createTitleBorder(Toolkit.i18nText("Fine-Design_Basic_Template_Theme_Edit_Pane_Custom_Settings_Title")));
uiTabbedPane = new UITabbedPane();
uiTabbedPane.setBorder(new ScaledEmptyBorder(10, 5, 10, 1));
buildTabPane();
container.add(uiTabbedPane, BorderLayout.CENTER);
initPluginListener();
return container;
@ -203,7 +203,7 @@ public abstract class TemplateThemeEditorPane<T extends TemplateTheme> extends J
fireAttributeChange();
}
});
uiTabbedPane.addTab(title, settingPane);
tabPaneBuilder.addTab(title, settingPane);
}
protected void refreshExtraAdvancedPane() {
@ -359,4 +359,9 @@ public abstract class TemplateThemeEditorPane<T extends TemplateTheme> extends J
}
return ThemePreviewTerminal.PC;
}
private void buildTabPane() {
uiTabbedPane = tabPaneBuilder.withHeadRatio(0.6f).build();
uiTabbedPane.setBorder(new ScaledEmptyBorder(10, 5, 10, 1));
}
}

4
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/chart/ChartTitleAndBackgroundStylePane.java

@ -86,12 +86,14 @@ public class ChartTitleAndBackgroundStylePane extends AbstractChartStylePane {
String chartAreaBgLabelName = Toolkit.i18nText("Fine-Design_Chart_Area_Background_Color");
UILabel chartAreaBgLabel = new UILabel(chartAreaBgLabelName);
chartAreaBgLabel.setToolTipText(chartAreaBgLabelName);
UILabel gridLineLabel = new UILabel(Toolkit.i18nText("Fine-Design_Chart_Grid_Line_Color"));
gridLineLabel.setToolTipText(gridLineLabel.getText());
return new Component[][]{
new Component[]{chartFontPane, null},
new Component[]{null, null},
new Component[]{chartAreaBgLabel, typeComboBox},
new Component[]{null, centerPane},
new Component[]{new UILabel(Toolkit.i18nText("Fine-Design_Chart_Grid_Line_Color")), mainGridColor}
new Component[]{gridLineLabel, mainGridColor}
};
}

12
designer-base/src/main/java/com/fr/design/mainframe/theme/edit/component/ComponentMarginStylePane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.theme.edit.component;
import com.fine.theme.utils.FineLayoutBuilder;
import com.fr.base.theme.settings.ThemedComponentStyle;
import com.fr.design.designer.IntervalConstants;
import com.fr.design.gui.ilable.UILabel;
@ -50,16 +51,9 @@ public class ComponentMarginStylePane extends JPanel {
uiLabel.setBorder(BorderFactory.createEmptyBorder(IntervalConstants.INTERVAL_L1, 0, 0, 0));
uiLabel.setVerticalAlignment(SwingConstants.TOP);
double f = TableLayout.FILL;
double p = TableLayout.PREFERRED;
double[] rowSize = { p };
double[] columnSize = { this.uiLabelWidth, this.uiSettingWidth > 0 ? this.uiSettingWidth : f };
JPanel panel = TableLayoutHelper.createGapTableLayoutPane(
JPanel panel = FineLayoutBuilder.compatibleTableLayout(10,
new Component[][]{new Component[]{uiLabel, createPaddingPane()}},
rowSize, columnSize,
IntervalConstants.INTERVAL_L1, 0
new double[]{1.2, 3}
);
this.add(panel);
}

31
designer-base/src/main/java/com/fr/design/style/background/gradient/GradientBar.java

@ -9,6 +9,7 @@ import com.fr.design.style.color.ColorCell;
import com.fr.design.style.color.ColorSelectable;
import com.fr.design.style.color.NewColorSelectPane;
import com.fr.stable.AssistUtils;
import com.fr.stable.os.OperatingSystem;
import javax.swing.JPanel;
import javax.swing.event.ChangeEvent;
@ -84,6 +85,7 @@ public class GradientBar extends AbstractComponentPopBox implements UIObserver,
p1.setStartPosition(0);
p2.setStartPosition(1);
addMouseClickListener();
addMouseDragListener();
iniListener();
}
@ -129,6 +131,35 @@ public class GradientBar extends AbstractComponentPopBox implements UIObserver,
});
}
protected void addMouseDragListener() {
this.addMouseMotionListener(new MouseAdapter() {
public void mouseDragged(MouseEvent e) {
int oldIndex = index;
for (int i = 0; i < list.size(); i++) {
if (list.get(i).contains(e.getX(), e.getY())) {
index = i;
break;
}
}
if (OperatingSystem.isLinux() && AssistUtils.equals(oldIndex, index)) {
if (Math.abs(p1.getX() - e.getX()) > Math.abs(p2.getX() - e.getX())) {
index = 1;
} else {
index = 0;
}
}
boolean x = e.getX() <= max && e.getX() >= min;
if (x && e.getY() < MAX_VERTICAL) {
list.get(index).setX(e.getX());
}
GradientBar.this.repaint();
startLabel.setText(Double.toString(p1.getX()));
endLabel.setText(Double.toString(p2.getX()));
}
});
}
protected void clickButton(int select) {
setIndex(select);
showPopupMenu();

19
designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java

@ -103,6 +103,7 @@ import static com.fine.swing.ui.layout.Layouts.row;
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.row;
import static com.fine.theme.utils.FineUIScale.scale;
//august:这个东西应该分成两类,一类是有单元格的情况,一类是没有单元格的情况
public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
@ -165,16 +166,16 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Write_Choose_Submit_Type"))),
cell(dmlConfigComboBox)).getComponent());
chooseTable = new ChoosePaneSupportFormula();
chooseTable.setTableNameComboBoxPopSize(FineUIScale.scale(160), FineUIScale.scale(320));
chooseTable.setTableNameComboBoxPopSize(scale(160), scale(320));
// peter:编辑的TablePane
JPanel editTablePane = new JPanel(new BorderLayout(FineUIScale.scale(10), 0));
JPanel editTablePane = new JPanel(new BorderLayout(scale(10), 0));
Dimension editTableDimension = createEditTablePreferredSize();
editTablePane.setBounds(0, 0, editTableDimension.width, editTableDimension.height);
keyColumnValuesTable = new KeyColumnNameValueTable();
editTablePane.add(new UIVerticalScrollPane(keyColumnValuesTable), BorderLayout.CENTER);
keyColumnValuesTable.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
keyColumnValuesTable.setPreferredScrollableViewportSize(FineUIScale.scale(new Dimension(280, 150)));
keyColumnValuesTable.setPreferredScrollableViewportSize(scale(new Dimension(280, 150)));
keyColumnValuesTable.setShowHorizontalLines(true);
northPane.add(column(10,
@ -190,7 +191,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
cell(bottomPane))
.getComponent(), BorderLayout.CENTER);
this.add(new UIScrollPane(contentPane));
this.add(contentPane);
initJTableColumn();
@ -216,7 +217,7 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
List<Layouts.Cell> buttonGroup = Arrays.stream(actions).map(action -> cell(new UIButton(action))).collect(Collectors.toList());
checkBoxUpdatePane = new JPanel(new BorderLayout(0, 0));
checkBoxUpdatePane.setPreferredSize(new Dimension(120, 20));
checkBoxUpdatePane.setPreferredSize(scale(new Dimension(120, 20)));
UpdateCheckBox = new UICheckBox(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_RWA_NotChange_Unmodified"));
UIButton helpButton = new UIButton(HEIP_ICON);
@ -372,11 +373,11 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
}
protected Dimension createEditTablePreferredSize() {
return FineUIScale.scale(new Dimension(280, 180));
return scale(new Dimension(280, 180));
}
protected Dimension createConditionPanePreferredSize() {
return FineUIScale.scale(new Dimension(454, 60));
return scale(new Dimension(454, 60));
}
protected boolean setJpVisible() {
@ -384,12 +385,12 @@ public class DBManipulationPane extends BasicBeanPane<DBManipulation> {
}
protected Dimension createJpPreferredSize() {
return FineUIScale.scale(new Dimension(280, 60));
return scale(new Dimension(280, 60));
}
protected Dimension createControlBtnPanePreferredSize() {
return FineUIScale.scale(new Dimension(110, 20));
return scale(new Dimension(110, 20));
}
protected String setControlBtnPanePosition() {

10
designer-realize/src/main/java/com/fr/design/webattr/EventPane.java

@ -218,14 +218,13 @@ public class EventPane extends BasicPane {
jsPane.populateBean(lis);
// BasicDialog dialog = jsPane.showWindow(DesignerContext.getDesignerFrame());
// 不能直接建立在DesignerFrame 不然里面事件里有提交入库进行智能添加单元格就麻烦了
BasicDialog dialog = jsPane.showWindow(SwingUtilities.getWindowAncestor(EventPane.this));
dialog.addDialogActionListener(new DialogActionAdapter() {
BasicDialog dialog = jsPane.showWindowWithCustomSize(SwingUtilities.getWindowAncestor(EventPane.this), new DialogActionAdapter() {
@Override
public void doOk() {
listModel.setElementAt(jsPane.updateBean(), i);
eventList.validate();
}
});
}, new Dimension(660, 660));
dialog.setVisible(true);
}
@ -272,14 +271,13 @@ public class EventPane extends BasicPane {
Listener lis = new Listener(menuName[j], new JavaScriptImpl());
listenerPane.populateBean(lis);
BasicDialog dialog = listenerPane.showWindow(SwingUtilities.getWindowAncestor(EventPane.this));
dialog.addDialogActionListener(new DialogActionAdapter() {
BasicDialog dialog = listenerPane.showWindowWithCustomSize(SwingUtilities.getWindowAncestor(EventPane.this), new DialogActionAdapter() {
@Override
public void doOk() {
listModel.addElement(listenerPane.updateBean());
eventList.validate();
}
});
}, new Dimension(660, 660));
dialog.setVisible(true);
}

Loading…
Cancel
Save