Browse Source

REPORT-59089 【主题切换】主题比较多有滚动条,右侧主题的勾选图标有点显示不全

【问题原因】
调整下宽度和主题列表实现

【改动思路】
同上
bugfix/11.0
Starryi 3 years ago
parent
commit
181acfb3c0
  1. 4
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridControlPane.java
  2. 5
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java
  3. 9
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java
  4. 4
      designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeGridPagesDialog.java

4
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridControlPane.java

@ -52,7 +52,7 @@ import static com.fr.design.i18n.Toolkit.i18nText;
* Created by Starryi on 2021/8/13 * Created by Starryi on 2021/8/13
*/ */
public class TemplateThemeGridControlPane<T extends TemplateTheme> extends BasicPane { public class TemplateThemeGridControlPane<T extends TemplateTheme> extends BasicPane {
public static final int CONTENT_WIDTH = TemplateThemeGridPane.CONTENT_WIDTH + 10; public static final int CONTENT_WIDTH = TemplateThemeGridPane.CONTENT_WIDTH + 20;
public static final int CONTENT_HEIGHT = TemplateThemeGridPane.CONTENT_HEIGHT + 37; public static final int CONTENT_HEIGHT = TemplateThemeGridPane.CONTENT_HEIGHT + 37;
private final RemoveThemeAction removeAction; private final RemoveThemeAction removeAction;
private final UIButton setTheme4NewTemplateButton; private final UIButton setTheme4NewTemplateButton;
@ -92,7 +92,7 @@ public class TemplateThemeGridControlPane<T extends TemplateTheme> extends Basic
private void initializePane() { private void initializePane() {
setLayout(FRGUIPaneFactory.createBorderLayout()); setLayout(FRGUIPaneFactory.createBorderLayout());
setBorder(BorderFactory.createEmptyBorder(5, 5, 0, 5)); setBorder(BorderFactory.createEmptyBorder(5, 10, 0, 10));
setPreferredSize(new Dimension(CONTENT_WIDTH, CONTENT_HEIGHT)); setPreferredSize(new Dimension(CONTENT_WIDTH, CONTENT_HEIGHT));
add(createActionsContainer(), BorderLayout.NORTH); add(createActionsContainer(), BorderLayout.NORTH);

5
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPagesPane.java

@ -34,7 +34,6 @@ import java.awt.CardLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Component; import java.awt.Component;
import java.awt.Container; import java.awt.Container;
import java.awt.Dimension;
import java.awt.Graphics; import java.awt.Graphics;
import java.awt.Graphics2D; import java.awt.Graphics2D;
import java.awt.RenderingHints; import java.awt.RenderingHints;
@ -286,16 +285,12 @@ public class TemplateThemeGridPagesPane extends JPanel {
} }
public static class TemplateThemeManagingPane extends TemplateThemeGridPagePane { public static class TemplateThemeManagingPane extends TemplateThemeGridPagePane {
public static final int CONTENT_WIDTH = TemplateThemeGridControlPane.CONTENT_WIDTH + 4;
public static final int CONTENT_HEIGHT = TemplateThemeGridControlPane.CONTENT_HEIGHT + 10;
private final UITabbedPane tabbedPane; private final UITabbedPane tabbedPane;
private final TemplateThemeGridControlPane<FormTheme> formThemesManagerPane; private final TemplateThemeGridControlPane<FormTheme> formThemesManagerPane;
private final TemplateThemeGridControlPane<ReportTheme> reportThemesManagerPane; private final TemplateThemeGridControlPane<ReportTheme> reportThemesManagerPane;
public TemplateThemeManagingPane() { public TemplateThemeManagingPane() {
setLayout(FRGUIPaneFactory.createBorderLayout()); setLayout(FRGUIPaneFactory.createBorderLayout());
setPreferredSize(new Dimension(CONTENT_WIDTH, CONTENT_HEIGHT));
tabbedPane = new UITabbedPane(); tabbedPane = new UITabbedPane();
add(tabbedPane, BorderLayout.CENTER); add(tabbedPane, BorderLayout.CENTER);

9
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeGridPane.java

@ -8,6 +8,8 @@ import com.fr.design.event.ChangeEvent;
import com.fr.design.event.ChangeListener; import com.fr.design.event.ChangeListener;
import com.fr.design.gui.icontainer.UIScrollPane; import com.fr.design.gui.icontainer.UIScrollPane;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.widget.FRWidgetFactory;
import com.fr.design.widget.WidgetBoundsPaneFactory;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -68,7 +70,12 @@ public class TemplateThemeGridPane<T extends TemplateTheme> extends BasicPane {
contentListPane.setLayout(new GridLayout(0, BLOCK_COUNT_ROW_LINE, BLOCK_GAP, BLOCK_GAP)); contentListPane.setLayout(new GridLayout(0, BLOCK_COUNT_ROW_LINE, BLOCK_GAP, BLOCK_GAP));
fillContentListPane(); fillContentListPane();
UIScrollPane scrollPane = new UIScrollPane(contentListPane); JPanel wrapper1 = FRGUIPaneFactory.createBorderLayout_S_Pane();
wrapper1.add(contentListPane, BorderLayout.NORTH);
JPanel wrapper2 = FRGUIPaneFactory.createBorderLayout_S_Pane();
wrapper2.add(wrapper1, BorderLayout.WEST);
UIScrollPane scrollPane = new UIScrollPane(wrapper2);
scrollPane.setPreferredSize(new Dimension(CONTENT_WIDTH, CONTENT_HEIGHT)); scrollPane.setPreferredSize(new Dimension(CONTENT_WIDTH, CONTENT_HEIGHT));
scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED); scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED);

4
designer-base/src/main/java/com/fr/design/mainframe/theme/dialog/TemplateThemeGridPagesDialog.java

@ -1,7 +1,5 @@
package com.fr.design.mainframe.theme.dialog; package com.fr.design.mainframe.theme.dialog;
import com.fr.base.theme.TemplateTheme;
import com.fr.base.theme.TemplateThemeConfig;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
@ -16,7 +14,7 @@ import javax.swing.JPanel;
* Created by Starryi on 2021/8/13 * Created by Starryi on 2021/8/13
*/ */
public class TemplateThemeGridPagesDialog extends TemplateThemeDialog implements TemplateThemeGridPagesPane.PageChangeListener { public class TemplateThemeGridPagesDialog extends TemplateThemeDialog implements TemplateThemeGridPagesPane.PageChangeListener {
public static final int CONTENT_WIDTH = TemplateThemeGridPane.CONTENT_WIDTH + 40; public static final int CONTENT_WIDTH = TemplateThemeGridPane.CONTENT_WIDTH + 48;
public static final int CONTENT_HEIGHT = TemplateThemeGridPane.CONTENT_HEIGHT + 37; public static final int CONTENT_HEIGHT = TemplateThemeGridPane.CONTENT_HEIGHT + 37;
protected TemplateThemeGridPagesPane overallPane; protected TemplateThemeGridPagesPane overallPane;

Loading…
Cancel
Save