diff --git a/designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java b/designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java index dbc72adbd7..ce5534daad 100644 --- a/designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/TableDataSourceAction.java @@ -13,6 +13,7 @@ import com.fr.design.mainframe.JTemplate; import com.fr.design.menu.KeySetUtils; import javax.swing.SwingUtilities; +import java.awt.Dimension; import java.util.HashMap; import java.util.Iterator; import java.util.Map; @@ -42,7 +43,7 @@ public class TableDataSourceAction extends TemplateComponentAction { //类名 classNameTextField = new UITextField(); UIButton browserButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Select")); - browserButton.setPreferredSize(new Dimension(browserButton.getPreferredSize().width, classNameTextField.getPreferredSize().height)); browserButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { final ClassNameSelectPane bPane = new ClassNameSelectPane(); diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index 32dc440a3d..c8c827260e 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -208,6 +208,7 @@ public class DBTableDataPane extends AbstractTableDataPane implemen @Override public void keyPressed(KeyEvent e) { + searchField.setToolTipText(searchField.getText()); if (e.getKeyCode() == KeyEvent.VK_ENTER) { e.setKeyCode(KeyEvent.VK_UP); DBTableDataPane.this.connectionTableProcedurePane.requestFocus(); diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java index 69bd6819cf..ac644474a4 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/FileTableDataPane.java @@ -196,9 +196,11 @@ public class FileTableDataPane extends AbstractTableDataPane { urlText.setEditable(false); // 选择按钮 chooseFile = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Selection")); + chooseFile.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Selection")); chooseFile.addActionListener(chooseFileListener); // 测试连接按钮 testConnection = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Test_Connection")); + testConnection.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Datasource_Test_Connection")); testConnection.setEnabled(false); testConnection.addActionListener(testConnectionListener); // 提示信息 diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java index 25964be6d8..2a187c199b 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/MultiTDTableDataPane.java @@ -329,7 +329,7 @@ public class MultiTDTableDataPane extends AbstractTableDataPane(new String[]{Toolkit.i18nText("Fine-Design_Chart_Custom_Color"), Toolkit.i18nText("Fine-Design_Chart_Legend_Gradual")}); + colorTypeButton.getButton(0).setToolTipText(Toolkit.i18nText("Fine-Design_Chart_Custom_Color")); gradientBar = new FixedGradientBar(4, 130); initListener(); } diff --git a/designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java b/designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java index 7d1f65a789..30e8f07bba 100644 --- a/designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java +++ b/designer-base/src/main/java/com/fr/design/parameter/ParameterPane.java @@ -8,6 +8,7 @@ import com.fr.design.editor.ValueEditorPane; import com.fr.design.editor.ValueEditorPaneFactory; import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.itextfield.UITextField; +import com.fr.design.utils.gui.UIComponentUtils; import javax.swing.JPanel; import java.awt.BorderLayout; @@ -50,7 +51,7 @@ public class ParameterPane extends BasicBeanPane { cell(nameTextField).weight(0.8), flex(0.1)), row(20, - cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Default_Value"))).weight(0.1), + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Default_Value"))).with(it -> it.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Default_Value"))).weight(0.1), cell(valueEditor).weight(0.8), flex(0.1)) ).getComponent(); diff --git a/designer-base/src/main/java/com/fr/design/report/WatermarkPane.java b/designer-base/src/main/java/com/fr/design/report/WatermarkPane.java index 9e77340884..868e52bd00 100644 --- a/designer-base/src/main/java/com/fr/design/report/WatermarkPane.java +++ b/designer-base/src/main/java/com/fr/design/report/WatermarkPane.java @@ -16,6 +16,7 @@ import com.fr.design.gui.ispinner.UnsignedIntUISpinner; import com.fr.design.gui.style.FRFontPane; import com.fr.design.i18n.Toolkit; import com.fr.design.style.color.NewColorSelectPane; +import com.fr.design.utils.gui.UIComponentUtils; import javax.swing.SwingUtilities; import javax.swing.UIManager; @@ -159,9 +160,9 @@ public class WatermarkPane extends BasicPane { //水印间距提示居中布局 JPanel watermarkGapTipsPane = row(LayoutConstants.HGAP_LARGE, flex(0.15), - cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal"))).weight(0.2), + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal"))).with(it -> it.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Horizontal"))).weight(0.2), flex(0.3), - cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical"))).weight(0.2), + cell(new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical"))).with(it -> it.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Chart_Direction_Vertical"))).weight(0.2), flex(0.15) ).getComponent(); //水印间距排列 @@ -186,7 +187,7 @@ public class WatermarkPane extends BasicPane { } private JPanel getTopAlignLabelPane(String labelText) { - return column(LayoutConstants.VERTICAL_GAP, cell(new UILabel(labelText))). + return column(LayoutConstants.VERTICAL_GAP, cell(new UILabel(labelText)).with(UIComponentUtils::setLineWrap)). with(it -> it.setBorder(new ScaledEmptyBorder(2,0,0,0))).getComponent(); } diff --git a/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java b/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java index 5725a2a889..2f1f7b8846 100644 --- a/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java +++ b/designer-base/src/main/java/com/fr/design/web/CustomIconPane.java @@ -154,7 +154,6 @@ public class CustomIconPane extends BasicPane { private void initAddButton(JPanel buttonPane) { UIButton addButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Add")); - addButton.setPreferredSize(new Dimension(80, 25)); addButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { final EditIconDialog add = new EditIconDialog(); @@ -182,7 +181,7 @@ public class CustomIconPane extends BasicPane { private void initRemoveButton(JPanel buttonPane) { removeButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove")); - removeButton.setPreferredSize(new Dimension(80, 25)); + removeButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Remove")); removeButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (iconManager.isSystemIcon(selectedIconName)) { @@ -211,7 +210,6 @@ public class CustomIconPane extends BasicPane { private void initEditButton(JPanel buttonPane) { editButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Edit")); - editButton.setPreferredSize(new Dimension(80, 25)); editButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (iconManager.isSystemIcon(selectedIconName)) { diff --git a/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java b/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java index bf24b435a3..3d366eb9a5 100644 --- a/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java +++ b/designer-base/src/main/java/com/fr/design/write/submit/DBManipulationPane.java @@ -280,6 +280,7 @@ public class DBManipulationPane extends BasicBeanPane { private UIButton addEventButton() { UIButton addSubmitEventButton = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Event")); + addSubmitEventButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Set_Submit_Event")); addSubmitEventButton.addActionListener(new ActionListener() { @Override diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java index 1dd05ae66f..8c98403342 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceNorthPanel.java @@ -176,6 +176,7 @@ public class ITReplaceNorthPanel { */ public void initContentPanel() { findLabel = new UILabel(Toolkit.i18nText("Fine-Design_Replace_Search_Element")); + findLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Replace_Search_Element")); rangeLabel = new UILabel(Toolkit.i18nText("Fine-Design_Replace_Search_Range")); iconLabel = new UILabel(CHANGE_ICON); resultLabel = new UILabel(); diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java index cbc9626521..473ccdab21 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITReplaceWestPanel.java @@ -51,7 +51,7 @@ public class ITReplaceWestPanel { private static final String PROPS_LINK_KEY_DEFAULT = "Fine-Design-CloudCenter_Template_Level_Search_Replace_Default"; private static final String HELP_URL = LocaleLinkProvider.getInstance().getLink(PROPS_LINK_KEY, PROPS_LINK_KEY_DEFAULT); private static final int FILL_COUNT = 12; - public static final int LEFT_WIDTH = 100; + public static final int LEFT_WIDTH = 150; public static final String CONTENT_TEXT = "" + Toolkit.i18nText("Fine-Design_Basic_Templates_Content") + ""; public static final String SETTING_TEXT = "" + Toolkit.i18nText("Fine-Design_Replace_Setting") + ""; diff --git a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditor.java b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditor.java index ce571d193f..4e1bc3d67d 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditor.java +++ b/designer-realize/src/main/java/com/fr/design/actions/replace/ui/ITTableEditor.java @@ -65,7 +65,6 @@ public class ITTableEditor extends UITableModelAdapter { this.setDefaultEditor(Boolean.class, new ITBooleanEditor()); this.setDefaultRenderer(Boolean.class, new ITBooleanRenderer()); - this.createTable().getColumnModel().getColumn(ITReplaceSouthPanel.CONTENT_INDEX).setMaxWidth(FineUIScale.scale(50)); this.createTable().getColumnModel().getColumn(ITReplaceSouthPanel.CHECKBOX_INDEX).setMaxWidth(FineUIScale.scale(28)); this.createTable().getColumnModel().getColumn(ITReplaceSouthPanel.CHECKBOX_INDEX).setCellRenderer(new ITBooleanRenderer()); diff --git a/designer-realize/src/main/java/com/fr/design/actions/report/ReportExportAttrAction.java b/designer-realize/src/main/java/com/fr/design/actions/report/ReportExportAttrAction.java index b0dd74fd9a..f26915dde9 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/report/ReportExportAttrAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/report/ReportExportAttrAction.java @@ -10,6 +10,7 @@ import com.fr.design.menu.KeySetUtils; import com.fr.design.report.ReportExportAttrPane; import com.fr.main.TemplateWorkBook; +import java.awt.Dimension; import java.awt.event.ActionEvent; public class ReportExportAttrAction extends JWorkBookAction { @@ -35,14 +36,14 @@ public class ReportExportAttrAction extends JWorkBookAction { final TemplateWorkBook wbTpl = jwb.getTarget(); final ReportExportAttrPane dialog = new ReportExportAttrPane(); dialog.populate(wbTpl.getReportExportAttr()); - dialog.showWindow(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { + dialog.showWindowWithCustomSize(DesignerContext.getDesignerFrame(), new DialogActionAdapter() { @Override public void doOk() { wbTpl.setReportExportAttr(dialog.update()); jwb.fireTargetModified(); } - }).setVisible(true); + }, new Dimension(800, 600)).setVisible(true); } } diff --git a/designer-realize/src/main/java/com/fr/design/report/ImageExportPane.java b/designer-realize/src/main/java/com/fr/design/report/ImageExportPane.java index da1a0c0f70..1d3ab398c6 100644 --- a/designer-realize/src/main/java/com/fr/design/report/ImageExportPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/ImageExportPane.java @@ -64,14 +64,14 @@ public class ImageExportPane extends AbstractExportPane { cell(this.globalFormatJpg).weight(0.8), cell(this.globalFormatPng).weight(0.4), flex()), - row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Image_Export_Rendering_Quality"), FineUIStyle.LABEL_SECONDARY)).weight(0.4), + row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Image_Export_Rendering_Quality"), FineUIStyle.LABEL_SECONDARY)).with(it -> it.setToolTipText(Toolkit.i18nText("Fine-Design_Image_Export_Rendering_Quality"))).weight(0.4), cell(this.globalRenderQuality).weight(0.8), - cell(this.globalRenderSpeed).weight(0.4), + cell(this.globalRenderSpeed).with(it -> it.setToolTipText(it.getText())).weight(0.4), flex()), column(LayoutConstants.VGAP_SMALL, row(cell(new UILabel(Toolkit.i18nText("Fine-Design_Image_Export_Typesetting"), FineUIStyle.LABEL_SECONDARY)).weight(0.4), cell(this.templateThumbnail).weight(0.8), - cell(this.templatePaging).weight(0.4), + cell(this.templatePaging).with(it -> it.setToolTipText(it.getText())).weight(0.4), flex()), cell(new UILabel(Toolkit.i18nText("Fine-Design_Image_Export_Tips"), FineUIStyle.LABEL_TIP)) ) diff --git a/designer-realize/src/main/java/com/fr/design/report/ReportColumnsPane.java b/designer-realize/src/main/java/com/fr/design/report/ReportColumnsPane.java index 94106abd6c..c5271fa9bc 100644 --- a/designer-realize/src/main/java/com/fr/design/report/ReportColumnsPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/ReportColumnsPane.java @@ -186,6 +186,7 @@ public class ReportColumnsPane extends BasicPane{ toUILabel.setText(COLUMN_ROW_TEXTS[1 - rowOrColumn]); showBlankCheckBox.setText(SHOW_BLANK[rowOrColumn]); copyLabel.setText(REPORT_COLUMN_RAPEAT[rowOrColumn] + ":"); + copyLabel.setToolTipText(REPORT_COLUMN_RAPEAT[rowOrColumn] + ":"); } /** @@ -332,7 +333,7 @@ public class ReportColumnsPane extends BasicPane{ private JPanel createRowPane() { repeatColDataTextField = new UITextField(); copyLabel = new UILabel(REPORT_COLUMN_RAPEAT[rowOrColumn]); - + copyLabel.setToolTipText(REPORT_COLUMN_RAPEAT[rowOrColumn]); copyTitleTextField = new UITextField(); JPanel colPane = column( 10, diff --git a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java index 936871a8bc..e50a50f900 100644 --- a/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/freeze/RepeatAndFreezeSettingPane.java @@ -12,6 +12,7 @@ import com.fr.design.gui.ilable.UILabel; import com.fr.design.i18n.Toolkit; import com.fr.design.layout.FRGUIPaneFactory; +import com.fr.design.utils.gui.UIComponentUtils; import com.fr.page.ReportPageAttrProvider; import com.fr.stable.ColumnRow; import com.fr.stable.FT; @@ -323,11 +324,14 @@ public class RepeatAndFreezeSettingPane extends BasicPane { cell(initPageFrozenFootPane()) ).getComponent(); + UILabel tipLabel = new UILabel(Toolkit.i18nText("Fine-Design_Report_Engine_Freeze_Tip")); + FineUIStyle.setStyle(tipLabel, FineUIStyle.LABEL_TIP); + JPanel pagePanel = column( 20, cell(wrapComponentWithTitle(outrepeatPanel, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Repeat"))), cell(wrapComponentWithTitle(outfreezePanel, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Frozen"))), - cell(new UILabel(Toolkit.i18nText("Fine-Design_Report_Engine_Freeze_Tip"))).with(it -> FineUIStyle.setStyle(it, FineUIStyle.LABEL_TIP)) + cell(tipLabel).with(UIComponentUtils::setLineWrap) ).getComponent(); JPanel labelPanel = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane(); @@ -389,7 +393,7 @@ public class RepeatAndFreezeSettingPane extends BasicPane { FineTabbedPane.TabPaneBuilder tabbedPaneBuilder = new FineTabbedPane.TabPaneBuilder(); tabbedPaneBuilder.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Page_Preview"), pagePanel); //分页预览 tabbedPaneBuilder.addTab(Toolkit.i18nText("Fine-Design_Basic_M_Write_Preview"), freezePanel); - tabbedPane = tabbedPaneBuilder.withHeadRatio(0.35f).build(); + tabbedPane = tabbedPaneBuilder.withHeadRatio(0.4f).build(); //去除对应的焦点虚线边框 tabbedPane.setFocusable(false); this.add(tabbedPane);