Browse Source

Merge branch 'release/10.0' of https://code.fineres.com/scm/~qinghui.liu/design into release/10.0

feature/big-screen
Qinghui.Liu 5 years ago
parent
commit
c42bc5ef36
  1. 25
      designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java
  2. 3
      designer-base/src/main/java/com/fr/design/env/DesignerWorkspaceInfo.java
  3. 5
      designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java
  4. 13
      designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java
  5. 6
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileBookMarkStyleDefinePane.java
  6. 16
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileBookMarkStylePane.java
  7. 387
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java
  8. 30
      designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleProvider.java
  9. 47
      designer-base/src/main/java/com/fr/design/write/submit/CheckServiceDialog.java
  10. BIN
      designer-base/src/main/resources/com/fr/design/images/warnings/warning5.png
  11. 7
      designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java

25
designer-base/src/main/java/com/fr/design/EnvChangeEntrance.java

@ -43,7 +43,11 @@ import javax.swing.JOptionPane;
import javax.swing.SwingUtilities; import javax.swing.SwingUtilities;
import javax.swing.UIManager; import javax.swing.UIManager;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
@ -249,12 +253,29 @@ public class EnvChangeEntrance {
/** /**
* 判断是否需要做版本验证判断依据为 * 判断是否需要做版本验证判断依据为
* 1选择的环境为远程环境 * 1选择的环境为远程环境
* 2一个月内不弹出是否勾选这里预留还未实际增加 * 2一个月内不弹出是否勾选
* @param selectedEnv 选择的环境 * @param selectedEnv 选择的环境
* @return * @return
*/ */
private boolean needCheckBranch(DesignerWorkspaceInfo selectedEnv){ private boolean needCheckBranch(DesignerWorkspaceInfo selectedEnv){
return selectedEnv.getType() == DesignerWorkspaceType.Remote; if(selectedEnv.getType() == DesignerWorkspaceType.Remote){
try {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar = Calendar.getInstance();
//获取记录的时间
Date remindTime = format.parse(selectedEnv.getRemindTime());
calendar.setTime(remindTime);
//获取一个月后的时间
calendar.add(Calendar.MONTH,1);
//与当前时间作对比,然后判断是否提示
if(new Date().after(calendar.getTime())){
return true;
}
} catch (ParseException e) {
return true;
}
}
return false;
} }
/** /**

3
designer-base/src/main/java/com/fr/design/env/DesignerWorkspaceInfo.java vendored

@ -10,6 +10,9 @@ public interface DesignerWorkspaceInfo extends XMLable {
String getPath(); String getPath();
//获取提醒时间,用于判断是否做服务检测
String getRemindTime();
WorkspaceConnectionInfo getConnection(); WorkspaceConnectionInfo getConnection();
boolean checkValid(); boolean checkValid();

5
designer-base/src/main/java/com/fr/design/env/LocalDesignerWorkspaceInfo.java vendored

@ -43,6 +43,11 @@ public class LocalDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
return path; return path;
} }
@Override
public String getRemindTime() {
return null;
}
@Override @Override
public WorkspaceConnectionInfo getConnection() { public WorkspaceConnectionInfo getConnection() {
return null; return null;

13
designer-base/src/main/java/com/fr/design/env/RemoteDesignerWorkspaceInfo.java vendored

@ -13,6 +13,8 @@ public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
private String name; private String name;
private String remindTime;
private WorkspaceConnectionInfo connection; private WorkspaceConnectionInfo connection;
public static RemoteDesignerWorkspaceInfo create(WorkspaceConnectionInfo connection) { public static RemoteDesignerWorkspaceInfo create(WorkspaceConnectionInfo connection) {
@ -45,11 +47,21 @@ public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
return connection; return connection;
} }
public void setRemindTime(String remindTime){
this.remindTime = remindTime;
}
@Override
public String getRemindTime(){
return remindTime;
}
@Override @Override
public void readXML(XMLableReader reader) { public void readXML(XMLableReader reader) {
if (reader.isAttr()) { if (reader.isAttr()) {
this.name = reader.getAttrAsString("name", StringUtils.EMPTY); this.name = reader.getAttrAsString("name", StringUtils.EMPTY);
this.remindTime = reader.getAttrAsString("remindTime", StringUtils.EMPTY);
} }
if (reader.isChildNode()) { if (reader.isChildNode()) {
String tagName = reader.getTagName(); String tagName = reader.getTagName();
@ -69,6 +81,7 @@ public class RemoteDesignerWorkspaceInfo implements DesignerWorkspaceInfo {
public void writeXML(XMLPrintWriter writer) { public void writeXML(XMLPrintWriter writer) {
writer.attr("name", name); writer.attr("name", name);
writer.attr("remindTime", remindTime);
if (this.connection != null) { if (this.connection != null) {
writer.startTAG("Connection"); writer.startTAG("Connection");
writer.attr("url", connection.getUrl()); writer.attr("url", connection.getUrl());

6
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileBookMarkStyleDefinePane.java

@ -30,11 +30,15 @@ public class MobileBookMarkStyleDefinePane extends BasicBeanPane<MobileBookMarkS
private void initComponent() { private void initComponent() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
JPanel settingPane = FRGUIPaneFactory.createBorderLayout_S_Pane(); JPanel settingPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
if (!ComparatorUtils.equals(displayName, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_None_BookMark_Style"))) { if (!ComparatorUtils.equals(displayName, com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_None_BookMark_Style"))) {
JPanel hintLabelPane = FRGUIPaneFactory.createBorderLayout_S_Pane();
hintLabelPane.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 0));
UILabel hintLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Hint")); UILabel hintLabel = new UILabel(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Hint"));
hintLabel.setForeground(Color.GRAY); hintLabel.setForeground(Color.GRAY);
settingPane.add(hintLabel, BorderLayout.NORTH); hintLabelPane.add(hintLabel);
settingPane.add(hintLabelPane, BorderLayout.NORTH);
} }
settingPane.add(this.customDefinePane, BorderLayout.CENTER); settingPane.add(this.customDefinePane, BorderLayout.CENTER);
this.add(settingPane, BorderLayout.CENTER); this.add(settingPane, BorderLayout.CENTER);

16
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/MobileBookMarkStylePane.java

@ -7,6 +7,8 @@ import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.form.ui.mobile.MobileBookMarkStyle; import com.fr.form.ui.mobile.MobileBookMarkStyle;
import javax.swing.*; import javax.swing.*;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import java.awt.*; import java.awt.*;
import java.awt.event.MouseAdapter; import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent; import java.awt.event.MouseEvent;
@ -23,6 +25,11 @@ import java.util.Set;
* Created by hades on 2019/12/23 * Created by hades on 2019/12/23
*/ */
public class MobileBookMarkStylePane extends BasicBeanPane<MobileBookMarkStyle> { public class MobileBookMarkStylePane extends BasicBeanPane<MobileBookMarkStyle> {
public static final int LEFT_PANEL_WIDTH = 140;
public static final int LEFT_PANEL_HEIGHT = 565;
public static final int RIGHT_PANEL_WIDTH = 510;
public static final int RIGHT_PANEL_HEIGHT = 565;
public static ListCellRenderer renderer = new DefaultListCellRenderer() { public static ListCellRenderer renderer = new DefaultListCellRenderer() {
@Override @Override
@ -48,6 +55,7 @@ public class MobileBookMarkStylePane extends BasicBeanPane<MobileBookMarkStyle>
private void initComponent() { private void initComponent() {
this.setLayout(FRGUIPaneFactory.createBorderLayout()); this.setLayout(FRGUIPaneFactory.createBorderLayout());
this.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
this.listModel = new DefaultListModel<>(); this.listModel = new DefaultListModel<>();
this.card = new CardLayout(); this.card = new CardLayout();
this.rightPane = FRGUIPaneFactory.createCardLayout_S_Pane(); this.rightPane = FRGUIPaneFactory.createCardLayout_S_Pane();
@ -79,14 +87,16 @@ public class MobileBookMarkStylePane extends BasicBeanPane<MobileBookMarkStyle>
} }
}); });
JPanel leftPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); JPanel leftPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
leftPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
leftPanel.add(bookMarkList, BorderLayout.CENTER); leftPanel.add(bookMarkList, BorderLayout.CENTER);
leftPanel.setPreferredSize(new Dimension(100, 500)); leftPanel.setPreferredSize(new Dimension(LEFT_PANEL_WIDTH, LEFT_PANEL_HEIGHT));
this.add(leftPanel, BorderLayout.WEST); this.add(leftPanel, BorderLayout.WEST);
} }
private void initRightPanel() { private void initRightPanel() {
JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane(); JPanel centerPane = FRGUIPaneFactory.createBorderLayout_L_Pane();
centerPane.setPreferredSize(new Dimension(500, 500)); centerPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
centerPane.setPreferredSize(new Dimension(RIGHT_PANEL_WIDTH, RIGHT_PANEL_HEIGHT));
centerPane.add(rightPane, BorderLayout.CENTER); centerPane.add(rightPane, BorderLayout.CENTER);
this.add(centerPane, BorderLayout.CENTER); this.add(centerPane, BorderLayout.CENTER);
} }
@ -94,10 +104,12 @@ public class MobileBookMarkStylePane extends BasicBeanPane<MobileBookMarkStyle>
private List<MobileBookMarkStyleProvider> getMobileBookMarkStyleProvider() { private List<MobileBookMarkStyleProvider> getMobileBookMarkStyleProvider() {
DefaultMobileBookMarkStyleProvider defaultMobileBookMarkStyleProvider = new DefaultMobileBookMarkStyleProvider(); DefaultMobileBookMarkStyleProvider defaultMobileBookMarkStyleProvider = new DefaultMobileBookMarkStyleProvider();
SidebarMobileBookMarkStyleProvider sidebarMobileBookMarkStyleProvider = new SidebarMobileBookMarkStyleProvider();
Set<MobileBookMarkStyleProvider> mobileBookMarkStyleProviders = ExtraDesignClassManager.getInstance().getArray( Set<MobileBookMarkStyleProvider> mobileBookMarkStyleProviders = ExtraDesignClassManager.getInstance().getArray(
MobileBookMarkStyleProvider.XML_TAG); MobileBookMarkStyleProvider.XML_TAG);
List<MobileBookMarkStyleProvider> list = new ArrayList<>(); List<MobileBookMarkStyleProvider> list = new ArrayList<>();
list.add(defaultMobileBookMarkStyleProvider); list.add(defaultMobileBookMarkStyleProvider);
list.add(sidebarMobileBookMarkStyleProvider);
list.addAll(mobileBookMarkStyleProviders); list.addAll(mobileBookMarkStyleProviders);
return Collections.unmodifiableList(list); return Collections.unmodifiableList(list);
} }

387
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleCustomDefinePane.java

@ -0,0 +1,387 @@
package com.fr.design.mainframe.mobile.ui;
import com.fr.base.BaseUtils;
import com.fr.base.Utils;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.gui.ibutton.UIColorButton;
import com.fr.design.gui.ibutton.UIToggleButton;
import com.fr.design.gui.icombobox.LineComboBox;
import com.fr.design.gui.icombobox.UIComboBox;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UnsignedIntUISpinner;
import com.fr.design.gui.style.FRFontPane;
import com.fr.design.gui.style.NumberDragBar;
import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.layout.TableLayout;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.style.color.ColorSelectBox;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.form.ui.mobile.MobileBookMarkStyle;
import com.fr.form.ui.mobile.impl.SidebarMobileBookMarkStyle;
import com.fr.stable.CoreConstants;
import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
/**
* @author Starryi
* @version 10.0
* Created by Starryi on 2020/02/28
*/
public class SidebarMobileBookMarkStyleCustomDefinePane extends BasicBeanPane<MobileBookMarkStyle> {
private static final long serialVersionUID = 1L;
private static final int COLUMN_WIDTH = 160;
private UnsignedIntUISpinner buttonWidthSpinner;
private UnsignedIntUISpinner buttonHeightSpinner;
private UnsignedIntUISpinner buttonGapSpinner;
private UnsignedIntUISpinner buttonBorderRadiusSpinner;
private ColorSelectBox normalBackgroundColorBox;
private NumberDragBar normalOpacityDragBar;
private UnsignedIntUISpinner normalOpacitySpinner;
private LineComboBox normalBorderWidthComBox;
private ColorSelectBox normalBorderColorBox;
private UIComboBox normalFontNameComboBox;
private UIComboBox normalFontSizeComboBox;
private UIColorButton normalFontColorButton;
private UIToggleButton normalFontItalicButton;
private UIToggleButton normalFontBoldButton;
private ColorSelectBox selectedBackgroundColorBox;
private NumberDragBar selectedOpacityDragBar;
private UnsignedIntUISpinner selectedOpacitySpinner;
private LineComboBox selectedBorderWidthComBox;
private ColorSelectBox selectedBorderColorBox;
private UIComboBox selectedFontNameComboBox;
private UIComboBox selectedFontSizeComboBox;
private UIColorButton selectedFontColorButton;
private UIToggleButton selectedFontItalicButton;
private UIToggleButton selectedFontBoldButton;
private SidebarMobileBookMarkStyle DEFAULT_STYLE = new SidebarMobileBookMarkStyle();
public SidebarMobileBookMarkStyleCustomDefinePane() {
this.initComponent();
}
private void initComponent() {
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
this.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
this.add(this.createNavButtonStylePanel());
this.add(this.createNormalStateStylePanel());
this.add(this.createSelectedStateStylePanel());
}
private JPanel createNavButtonStylePanel() {
buttonWidthSpinner = new UnsignedIntUISpinner(20, 150, 1, DEFAULT_STYLE.getWidth());
buttonHeightSpinner = new UnsignedIntUISpinner(20, 100, 1, DEFAULT_STYLE.getHeight());
buttonGapSpinner = new UnsignedIntUISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_STYLE.getGap());
buttonBorderRadiusSpinner = new UnsignedIntUISpinner(0, Integer.MAX_VALUE, 1, DEFAULT_STYLE.getBorderRadius());
UILabel sizeLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Size") + ":",
SwingConstants.RIGHT);
JPanel sizePane = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 5, 0);
sizePane.add(buttonWidthSpinner);
sizePane.add(buttonHeightSpinner);
JPanel sizeTipsPane = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 5, 0);
sizeTipsPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Width"),
SwingConstants.CENTER));
sizeTipsPane.add(new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Height"),
SwingConstants.CENTER));
UILabel gapLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Gap") + ":",
SwingConstants.RIGHT);
UILabel borderRadiusLabel = new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Border_Radius") + ":",
SwingConstants.RIGHT);
double p = TableLayout.PREFERRED;
double[] rowSize = {p, p, p, p};
double[] columnSize = {p, COLUMN_WIDTH};
double[] verticalGaps = {0, 10, 10};
JPanel navButtonSettingsPanel = TableLayoutHelper.createDiffVGapTableLayoutPane(new JComponent[][]{
{sizeLabel, sizePane},
{null, sizeTipsPane},
{gapLabel, buttonGapSpinner},
{borderRadiusLabel, buttonBorderRadiusSpinner},
}, rowSize, columnSize, 5, verticalGaps);
navButtonSettingsPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
JPanel containerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
containerPane.setBorder(GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Button_Style"),
Color.decode("#2F8EF1")));
containerPane.add(navButtonSettingsPanel);
return containerPane;
}
private JPanel createNormalStateStylePanel() {
double p = TableLayout.PREFERRED;
normalBackgroundColorBox = new ColorSelectBox(COLUMN_WIDTH);
normalBackgroundColorBox.setSelectObject(DEFAULT_STYLE.getBackgroundColor());
normalOpacityDragBar = new NumberDragBar(0, 100);
normalOpacityDragBar.setValue(DEFAULT_STYLE.getOpacity());
normalOpacityDragBar.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
normalOpacitySpinner.setValue(normalOpacityDragBar.getValue());
}
});
normalOpacitySpinner = new UnsignedIntUISpinner(0, 100, 1, DEFAULT_STYLE.getOpacity());
normalOpacitySpinner.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
normalOpacityDragBar.setValue((int) normalOpacitySpinner.getValue());
}
});
normalBorderWidthComBox = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY);
normalBorderWidthComBox.setSelectedLineStyle(DEFAULT_STYLE.getBorderWidth());
normalBorderColorBox = new ColorSelectBox(COLUMN_WIDTH);
normalBorderColorBox.setSelectObject(DEFAULT_STYLE.getBorderColor());
normalFontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
normalFontNameComboBox.setSelectedItem(DEFAULT_STYLE.getSelectedFontFamily());
normalFontSizeComboBox = new UIComboBox(FRFontPane.FONT_SIZES);
normalFontSizeComboBox.setSelectedItem(DEFAULT_STYLE.getFontSize());
normalFontColorButton = new UIColorButton();
normalFontColorButton.setColor(DEFAULT_STYLE.getFontColor());
normalFontItalicButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"));
normalFontItalicButton.setSelected(DEFAULT_STYLE.isFontItalic());
normalFontBoldButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"));
normalFontBoldButton.setSelected(DEFAULT_STYLE.isFontBold());
JPanel opacityPane = new JPanel(new BorderLayout(0, 0));
JPanel jp = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 5, 0);
jp.add(normalOpacityDragBar);
jp.add(normalOpacitySpinner);
opacityPane.add(jp, BorderLayout.CENTER);
JPanel fontExtraPane = TableLayoutHelper.createGapTableLayoutPane(
new JComponent[][]{{normalFontSizeComboBox, normalFontColorButton, normalFontItalicButton, normalFontBoldButton}},
new double[]{p},
new double[]{p, p, p, p},
0, 5
);
double[] rowSize = {p, p, p, p, p};
double[] columnSize = {p, COLUMN_WIDTH, p};
JPanel normalStateStyleSettingsPanel = TableLayoutHelper.createGapTableLayoutPane(new JComponent[][]{
{
new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Background_Color") + ":", SwingConstants.RIGHT),
normalBackgroundColorBox
},
{
new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Opacity") + ":", SwingConstants.RIGHT),
opacityPane,
new UILabel("%")
},
{
new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Border_Width") + ":", SwingConstants.RIGHT),
normalBorderWidthComBox
},
{
new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Border_Color") + ":", SwingConstants.RIGHT),
normalBorderColorBox
},
{
new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Font") + ":", SwingConstants.RIGHT),
normalFontNameComboBox,
fontExtraPane
}
}, rowSize, columnSize, 5, 10);
normalStateStyleSettingsPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
JPanel containerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
containerPane.setBorder(
GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Normal_Style"),
Color.decode("#2F8EF1"))
);
containerPane.add(normalStateStyleSettingsPanel);
return containerPane;
}
private JPanel createSelectedStateStylePanel() {
double p = TableLayout.PREFERRED;
selectedBackgroundColorBox = new ColorSelectBox(COLUMN_WIDTH);
selectedBackgroundColorBox.setSelectObject(DEFAULT_STYLE.getSelectedBackgroundColor());
selectedOpacityDragBar = new NumberDragBar(0, 100);
selectedOpacityDragBar.setValue(DEFAULT_STYLE.getSelectedOpacity());
selectedOpacityDragBar.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
selectedOpacitySpinner.setValue(selectedOpacityDragBar.getValue());
}
});
selectedOpacitySpinner = new UnsignedIntUISpinner(0, 100, 1, DEFAULT_STYLE.getSelectedOpacity());
selectedOpacitySpinner.addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
selectedOpacityDragBar.setValue((int) selectedOpacitySpinner.getValue());
}
});
selectedBorderWidthComBox = new LineComboBox(CoreConstants.UNDERLINE_STYLE_ARRAY);
selectedBorderWidthComBox.setSelectedLineStyle(DEFAULT_STYLE.getSelectedBorderWidth());
selectedBorderColorBox = new ColorSelectBox(COLUMN_WIDTH);
selectedBorderColorBox.setSelectObject(DEFAULT_STYLE.getSelectedBorderColor());
selectedFontNameComboBox = new UIComboBox(Utils.getAvailableFontFamilyNames4Report());
selectedFontNameComboBox.setSelectedItem(DEFAULT_STYLE.getSelectedFontFamily());
selectedFontSizeComboBox = new UIComboBox(FRFontPane.FONT_SIZES);
selectedFontSizeComboBox.setSelectedItem(DEFAULT_STYLE.getSelectedFontSize());
selectedFontColorButton = new UIColorButton();
selectedFontColorButton.setColor(DEFAULT_STYLE.getSelectedFontColor());
selectedFontItalicButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/italic.png"));
selectedFontItalicButton.setSelected(DEFAULT_STYLE.isSelectedFontItalic());
selectedFontBoldButton = new UIToggleButton(BaseUtils.readIcon("/com/fr/design/images/m_format/cellstyle/bold.png"));
selectedFontBoldButton.setSelected(DEFAULT_STYLE.isSelectedFontBold());
JPanel opacityPane = new JPanel(new BorderLayout(0, 0));
JPanel jp = FRGUIPaneFactory.createNColumnGridInnerContainer_Pane(2, 5, 0);
jp.add(selectedOpacityDragBar);
jp.add(selectedOpacitySpinner);
opacityPane.add(jp, BorderLayout.CENTER);
JPanel fontExtraPane = TableLayoutHelper.createGapTableLayoutPane(
new JComponent[][]{{selectedFontSizeComboBox, selectedFontColorButton, selectedFontItalicButton, selectedFontBoldButton}},
new double[]{p},
new double[]{p, p, p, p},
0, 5
);
double[] rowSize = {p, p, p, p, p};
double[] columnSize = {p, COLUMN_WIDTH, p};
JPanel selectedStateStyleSettingsPanel = TableLayoutHelper.createGapTableLayoutPane(new JComponent[][]{
{
new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Background_Color") + ":", SwingConstants.RIGHT),
selectedBackgroundColorBox
},
{
new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Opacity") + ":", SwingConstants.RIGHT),
opacityPane,
new UILabel("%")
},
{
new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Border_Width") + ":", SwingConstants.RIGHT),
selectedBorderWidthComBox
},
{
new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Border_Color") + ":", SwingConstants.RIGHT),
selectedBorderColorBox
},
{
new UILabel(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Font") + ":", SwingConstants.RIGHT),
selectedFontNameComboBox,
fontExtraPane
}
}, rowSize, columnSize, 5, 10);
selectedStateStyleSettingsPanel.setBorder(BorderFactory.createEmptyBorder(0, 20, 0, 0));
JPanel containerPane = FRGUIPaneFactory.createNormalFlowInnerContainer_S_Pane();
containerPane.setBorder(
GUICoreUtils.createTitledBorder(Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar_Selected_Style"),
Color.decode("#2F8EF1"))
);
containerPane.add(selectedStateStyleSettingsPanel);
return containerPane;
}
@Override
public void populateBean(MobileBookMarkStyle ob) {
SidebarMobileBookMarkStyle style = null;
if (ob instanceof SidebarMobileBookMarkStyle) {
style = (SidebarMobileBookMarkStyle) ob;
}
if (style == null) {
return;
}
buttonWidthSpinner.setValue(style.getWidth());
buttonHeightSpinner.setValue(style.getHeight());
buttonGapSpinner.setValue(style.getGap());
buttonBorderRadiusSpinner.setValue(style.getBorderRadius());
normalBackgroundColorBox.setSelectObject(style.getBackgroundColor());
normalOpacityDragBar.setValue(style.getOpacity());
normalOpacitySpinner.setValue(style.getOpacity());
normalBorderWidthComBox.setSelectedLineStyle(style.getBorderWidth());
normalBorderColorBox.setSelectObject(style.getBorderColor());
normalFontNameComboBox.setSelectedItem(style.getFontFamily());
normalFontSizeComboBox.setSelectedItem(style.getFontSize());
normalFontColorButton.setColor(style.getFontColor());
normalFontItalicButton.setSelected(style.isFontItalic());
normalFontBoldButton.setSelected(style.isFontBold());
selectedBackgroundColorBox.setSelectObject(style.getSelectedBackgroundColor());
selectedOpacityDragBar.setValue(style.getSelectedOpacity());
selectedOpacitySpinner.setValue(style.getSelectedOpacity());
selectedBorderWidthComBox.setSelectedLineStyle(style.getSelectedBorderWidth());
selectedBorderColorBox.setSelectObject(style.getSelectedBorderColor());
selectedFontNameComboBox.setSelectedItem(style.getSelectedFontFamily());
selectedFontSizeComboBox.setSelectedItem(style.getSelectedFontSize());
selectedFontColorButton.setColor(style.getSelectedFontColor());
selectedFontItalicButton.setSelected(style.isSelectedFontItalic());
selectedFontBoldButton.setSelected(style.isSelectedFontBold());
}
@Override
public MobileBookMarkStyle updateBean() {
SidebarMobileBookMarkStyle style = new SidebarMobileBookMarkStyle();
style.setWidth((int) buttonWidthSpinner.getValue());
style.setHeight((int) buttonHeightSpinner.getValue());
style.setGap((int) buttonGapSpinner.getValue());
style.setBorderRadius((int) buttonBorderRadiusSpinner.getValue());
if (normalBackgroundColorBox.getSelectObject() != null) {
style.setBackgroundColor(normalBackgroundColorBox.getSelectObject());
}
style.setOpacity((int) normalOpacitySpinner.getValue());
style.setBorderWidth(normalBorderWidthComBox.getSelectedLineStyle());
style.setBorderColor(normalBorderColorBox.getSelectObject());
if (normalFontNameComboBox.getSelectedItem() != null) {
style.setFontFamily((String) normalFontNameComboBox.getSelectedItem());
}
if (normalFontSizeComboBox.getSelectedItem() != null) {
style.setFontSize((Integer) normalFontSizeComboBox.getSelectedItem());
}
style.setFontColor(normalFontColorButton.getColor());
style.setFontItalic(normalFontItalicButton.isSelected());
style.setFontBold(normalFontBoldButton.isSelected());
if (selectedBackgroundColorBox.getSelectObject() != null) {
style.setSelectedBackgroundColor(selectedBackgroundColorBox.getSelectObject());
}
style.setSelectedOpacity((int) selectedOpacitySpinner.getValue());
style.setSelectedBorderWidth(selectedBorderWidthComBox.getSelectedLineStyle());
style.setSelectedBorderColor(selectedBorderColorBox.getSelectObject());
if (selectedFontNameComboBox.getSelectedItem() != null) {
style.setSelectedFontFamily((String) selectedFontNameComboBox.getSelectedItem());
}
if (selectedFontSizeComboBox.getSelectedItem() != null) {
style.setSelectedFontSize((Integer) selectedFontSizeComboBox.getSelectedItem());
}
style.setSelectedFontColor(selectedFontColorButton.getColor());
style.setSelectedFontItalic(selectedFontItalicButton.isSelected());
style.setSelectedFontBold(selectedFontBoldButton.isSelected());
return style;
}
@Override
protected String title4PopupWindow() {
return null;
}
}

30
designer-base/src/main/java/com/fr/design/mainframe/mobile/ui/SidebarMobileBookMarkStyleProvider.java

@ -0,0 +1,30 @@
package com.fr.design.mainframe.mobile.ui;
import com.fr.design.beans.BasicBeanPane;
import com.fr.design.fun.impl.AbstractMobileBookMarkStyleProvider;
import com.fr.design.i18n.Toolkit;
import com.fr.form.ui.mobile.MobileBookMarkStyle;
import com.fr.form.ui.mobile.impl.SidebarMobileBookMarkStyle;
/**
* @author Starryi
* @version 10.0
* Created by Starryi on 2020/02/28
*/
public class SidebarMobileBookMarkStyleProvider extends AbstractMobileBookMarkStyleProvider {
@Override
public Class<? extends MobileBookMarkStyle> classForMobileBookMarkStyle() {
return SidebarMobileBookMarkStyle.class;
}
@Override
public Class<? extends BasicBeanPane<MobileBookMarkStyle>> classForMobileBookMarkStyleAppearance() {
return SidebarMobileBookMarkStyleCustomDefinePane.class;
}
@Override
public String displayName() {
return Toolkit.i18nText("Fine-Design_Mobile_BookMark_Style_Sidebar");
}
}

47
designer-base/src/main/java/com/fr/design/write/submit/CheckServiceDialog.java

@ -1,10 +1,14 @@
package com.fr.design.write.submit; package com.fr.design.write.submit;
import com.fr.design.DesignerEnvManager;
import com.fr.design.env.RemoteDesignerWorkspaceInfo;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.icheckbox.UICheckBox;
import com.fr.design.i18n.Toolkit; import com.fr.design.i18n.Toolkit;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.utils.gui.GUICoreUtils; import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.general.FRFont; import com.fr.general.FRFont;
import com.fr.general.GeneralContext;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -18,6 +22,9 @@ import java.awt.Dimension;
import java.awt.Frame; import java.awt.Frame;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
/** /**
* @author: Maksim * @author: Maksim
@ -28,30 +35,31 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
private JPanel topPanel; private JPanel topPanel;
private JPanel centerPanel; private JPanel centerPanel;
private JPanel bottomPanel; private JPanel bottomPanel;
private UICheckBox remindBox;
public CheckServiceDialog(Frame parent, String areaText, String localBranch, String remoteBranch){ public CheckServiceDialog(Frame parent, String areaText, String localBranch, String remoteBranch){
super(parent,true); super(parent,true);
//上面的标签面板 //上面的标签面板
topPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); topPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
JPanel imagePanel = new JPanel(); JPanel imagePanel = new JPanel();
Icon icon = IOUtils.readIcon("com/fr/design/images/warnings/warning4.png"); Icon icon = IOUtils.readIcon("com/fr/design/images/warnings/warning5.png");
JLabel imageLabel = new JLabel(); JLabel imageLabel = new JLabel();
imageLabel.setIcon(icon); imageLabel.setIcon(icon);
imagePanel.add(imageLabel); imagePanel.add(imageLabel);
imagePanel.setPreferredSize(new Dimension(100,80)); imagePanel.setPreferredSize(new Dimension(110,80));
JPanel verticalPanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true); JPanel verticalPanel = FRGUIPaneFactory.createVerticalFlowLayout_S_Pane(true);
FRFont font = FRFont.getInstance(); FRFont font = FRFont.getInstance();
font = font.applySize(15).applyStyle(1); font = font.applySize(15).applyStyle(1);
JLabel label = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Branch_Inconsistency")); JLabel label = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Branch_Inconsistency"));
label.setFont(font); label.setFont(font);
label.setPreferredSize(new Dimension(500,30)); label.setPreferredSize(new Dimension(600,30));
JLabel label2 = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Local_Designer") JLabel label2 = new JLabel("<html>"+Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Local_Designer")
+ localBranch + "/" + Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Remote_Server") + remoteBranch); + localBranch + "/" + Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Remote_Server") + remoteBranch+"</html>");
label2.setPreferredSize(new Dimension(500,20)); label2.setPreferredSize(new Dimension(600,30));
JLabel label3 = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Branch_Need_Update")); JLabel label3 = new JLabel(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Branch_Need_Update"));
label3.setPreferredSize(new Dimension(500,20)); label3.setPreferredSize(new Dimension(500,30));
verticalPanel.add(label); verticalPanel.add(label);
verticalPanel.add(label2); verticalPanel.add(label2);
@ -73,9 +81,13 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
centerPanel.add(checkArea,BorderLayout.CENTER); centerPanel.add(checkArea,BorderLayout.CENTER);
//下面的按钮面板 //下面的按钮面板
remindBox = new UICheckBox(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Remind_Show"));
remindBox.addActionListener(remindCheckboxListener);
UIButton okButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Button_Confirm")); UIButton okButton = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Button_Confirm"));
JPanel buttonPanel = FRGUIPaneFactory.createRightFlowInnerContainer_S_Pane(); JPanel buttonPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
buttonPanel.add(okButton); buttonPanel.setBorder(BorderFactory.createEmptyBorder(0,10,10,10));
buttonPanel.add(remindBox, BorderLayout.WEST);
buttonPanel.add(okButton,BorderLayout.EAST);
okButton.addActionListener(this ); okButton.addActionListener(this );
bottomPanel = FRGUIPaneFactory.createBorderLayout_L_Pane(); bottomPanel = FRGUIPaneFactory.createBorderLayout_L_Pane();
bottomPanel.add(buttonPanel); bottomPanel.add(buttonPanel);
@ -86,7 +98,7 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
this.add(topPanel,BorderLayout.NORTH); this.add(topPanel,BorderLayout.NORTH);
this.add(centerPanel, BorderLayout.CENTER); this.add(centerPanel, BorderLayout.CENTER);
this.add(buttonPanel,BorderLayout.SOUTH); this.add(buttonPanel,BorderLayout.SOUTH);
this.setSize(new Dimension(600, 500)); this.setSize(new Dimension(GeneralContext.getLocale().equals(Locale.US)? 700:600, 500));
GUICoreUtils.centerWindow(this); GUICoreUtils.centerWindow(this);
} }
@ -94,4 +106,19 @@ public class CheckServiceDialog extends JDialog implements ActionListener {
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
this.dispose(); this.dispose();
} }
private ActionListener remindCheckboxListener = new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
String remindTime = format.format(new Date());
//环境已切换,通过当前环境获取,一定是远程环境
String currentEnvName = DesignerEnvManager.getEnvManager().getCurEnvName();
RemoteDesignerWorkspaceInfo currentEnv = (RemoteDesignerWorkspaceInfo)DesignerEnvManager.getEnvManager().getWorkspaceInfo(currentEnvName);
currentEnv.setRemindTime(remindBox.isSelected()? remindTime : "");
}
};
} }

BIN
designer-base/src/main/resources/com/fr/design/images/warnings/warning5.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

7
designer-chart/src/main/java/com/fr/design/mainframe/chart/gui/ChartTypeButtonPane.java

@ -503,6 +503,13 @@ public class ChartTypeButtonPane extends BasicBeanPane<ChartCollection> implemen
if (this.isSelected()) { if (this.isSelected()) {
indexList.get(0).setSelected(true); indexList.get(0).setSelected(true);
changeCollectionSelected(indexList.get(0).getButtonName()); changeCollectionSelected(indexList.get(0).getButtonName());
} else {//删除的tab非选中状态, 原为选中状态的tab保持选中不变
for (ChartChangeButton button : indexList) {
if (button.isSelected()) {
changeCollectionSelected(button.getButtonName());
break;
}
}
} }
} }

Loading…
Cancel
Save