Browse Source

代码修改

research/10.0
kerry 6 years ago
parent
commit
1516847f49
  1. 11
      designer-base/src/main/java/com/fr/design/layout/FRGUIPaneFactory.java
  2. 8
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileTemplateStyleDefinePane.java
  3. 5
      designer-base/src/main/java/com/fr/design/mainframe/widget/MobileTabFontConfPane.java
  4. 25
      designer-base/src/main/java/com/fr/design/mainframe/widget/UITitleSplitLine.java
  5. 12
      designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java

11
designer-base/src/main/java/com/fr/design/layout/FRGUIPaneFactory.java

@ -251,17 +251,6 @@ public class FRGUIPaneFactory {
return jp; return jp;
} }
/**
* 创建一个靠左流式布局流式内嵌
*
* @return JPanel对象
*/
public static JPanel createBoxFlowInnerContainerPane(int hgap, int vgap) {
JPanel jp = new JPanel();
jp.setLayout(new FlowLayout(FlowLayout.LEFT, hgap, vgap));
return jp;
}
/** /**
* 创建一个靠左流式布局流式内嵌首元素距离左边0 * 创建一个靠左流式布局流式内嵌首元素距离左边0
* *

8
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileTemplateStyleDefinePane.java

@ -34,13 +34,13 @@ import java.awt.event.ItemEvent;
import java.awt.event.ItemListener; import java.awt.event.ItemListener;
public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane<MobileTemplateStyle> { public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane<MobileTemplateStyle> {
private static final String[] TAB_STYLES = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Default"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Custom")};
private UIComboBox custom; private UIComboBox custom;
protected NewColorSelectBox initialColorBox; protected NewColorSelectBox initialColorBox;
protected MobileTabFontConfPane fontConfPane; protected MobileTabFontConfPane fontConfPane;
private JPanel centerPane; private JPanel centerPane;
protected MobileTemplatePreviewPane previewPane; protected MobileTemplatePreviewPane previewPane;
private static final String[] TAB_STYLES = new String[]{com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Default"),
com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Engine_Custom")};
private WCardTagLayout tagLayout; private WCardTagLayout tagLayout;
@ -142,7 +142,7 @@ public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane<Mobile
}); });
UILabel fillLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Fill")); UILabel fillLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_Fill"));
fillLabel.setPreferredSize(new Dimension(55, 20)); fillLabel.setPreferredSize(new Dimension(55, 20));
JPanel boxFlowPane = FRGUIPaneFactory.createBoxFlowInnerContainerPane(10, 0); JPanel boxFlowPane = GUICoreUtils.createBoxFlowInnerContainerPane(10, 0);
boxFlowPane.add(fillLabel); boxFlowPane.add(fillLabel);
boxFlowPane.add(initialColorBox); boxFlowPane.add(initialColorBox);
initialColorBox.setPreferredSize(new Dimension(157, 20)); initialColorBox.setPreferredSize(new Dimension(157, 20));
@ -161,7 +161,7 @@ public abstract class MobileTemplateStyleDefinePane extends BasicBeanPane<Mobile
}); });
UILabel initCharLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Tab_Init_Char")); UILabel initCharLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_Tab_Init_Char"));
initCharLabel.setPreferredSize(new Dimension(55, 20)); initCharLabel.setPreferredSize(new Dimension(55, 20));
JPanel jPanel3 = FRGUIPaneFactory.createBoxFlowInnerContainerPane(5, 0); JPanel jPanel3 = GUICoreUtils.createBoxFlowInnerContainerPane(5, 0);
jPanel3.add(initCharLabel); jPanel3.add(initCharLabel);
jPanel3.add(fontConfPane); jPanel3.add(fontConfPane);
jPanel3.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 20)); jPanel3.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 20));

5
designer-base/src/main/java/com/fr/design/mainframe/widget/MobileTabFontConfPane.java

@ -20,14 +20,15 @@ import java.awt.event.ItemListener;
import java.util.Vector; import java.util.Vector;
public class MobileTabFontConfPane extends JPanel { public class MobileTabFontConfPane extends JPanel {
private static final Icon[] ITALIC_ICONS = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic_white.png")};
private static final Icon[] BOLD_ICONS = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold_white.png")};
private EventListenerList fontChangeListener = new EventListenerList(); private EventListenerList fontChangeListener = new EventListenerList();
private UIComboBox fontFamily; private UIComboBox fontFamily;
private UIComboBox fontSize; private UIComboBox fontSize;
private UIToggleButton bold; private UIToggleButton bold;
private UIColorButton color; private UIColorButton color;
private UIToggleButton italic; private UIToggleButton italic;
private final static Icon[] ITALIC_ICONS = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic_white.png")};
private final static Icon[] BOLD_ICONS = {BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"), BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold_white.png")};
public MobileTabFontConfPane() { public MobileTabFontConfPane() {

25
designer-base/src/main/java/com/fr/design/mainframe/widget/UITitleSplitLine.java

@ -1,12 +1,8 @@
package com.fr.design.mainframe.widget; package com.fr.design.mainframe.widget;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import javax.swing.JFrame;
import javax.swing.JPanel; import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
import java.awt.Dimension; import java.awt.Dimension;
import java.awt.Graphics; import java.awt.Graphics;
@ -15,12 +11,12 @@ public class UITitleSplitLine extends JPanel {
private static final Color LINE_COLOR = Color.decode("#E0E0E1"); private static final Color LINE_COLOR = Color.decode("#E0E0E1");
private static final Color TITLE_COLOR = Color.decode("#333334"); private static final Color TITLE_COLOR = Color.decode("#333334");
private static final FRFont TITLE_FONT = FRFont.getInstance("PingFangSC-Regular", 0, 12.0F); private static final FRFont TITLE_FONT = FRFont.getInstance("PingFangSC-Regular", 0, 12.0F);
private static final int OFFSETX = 10;
private static final int OFFSET = 3;
private Color color; private Color color;
private UILabel label; private UILabel label;
private int width; private int width;
private static final int OFFSETX = 10;
private static final int OFFSET = 3;
public UITitleSplitLine(String title, int width) { public UITitleSplitLine(String title, int width) {
@ -50,20 +46,5 @@ public class UITitleSplitLine extends JPanel {
} }
public static void main(String[] args) {
// JFrame jf = new JFrame("test");
// jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// JPanel content = (JPanel) jf.getContentPane();
// content.setLayout(new BorderLayout());
// JPanel myPanel = new JPanel();
// myPanel.setLayout(new BorderLayout());
// JPanel Panel = new JPanel();
// Panel.setBackground(Color.blue);
// myPanel.add(new UITitleSplitLine("基本", 223), BorderLayout.CENTER);
// content.add(myPanel, BorderLayout.CENTER);
// GUICoreUtils.centerWindow(jf);
// jf.setSize(439, 400);
// jf.setVisible(true);
}
} }

12
designer-base/src/main/java/com/fr/design/utils/gui/GUICoreUtils.java

@ -526,6 +526,18 @@ public abstract class GUICoreUtils{
return leftPane; return leftPane;
} }
/**
* 创建一个靠左流式布局流式内嵌
*
* @return JPanel对象
*/
public static JPanel createBoxFlowInnerContainerPane(int hgap, int vgap) {
JPanel jp = new JPanel();
jp.setLayout(new FlowLayout(FlowLayout.LEFT, hgap, vgap));
return jp;
}
/** /**
* 生成一个以流式布局为布局的面板 * 生成一个以流式布局为布局的面板
* @param comps 面板中的组件以及布局的参数后3位参数可选分别表示对齐方式水平间隙垂直间隙 * @param comps 面板中的组件以及布局的参数后3位参数可选分别表示对齐方式水平间隙垂直间隙

Loading…
Cancel
Save