Browse Source

Fixed merge conflict

newui
Levy.Xie-解安森 1 year ago
parent
commit
007059f7de
  1. 6
      designer-base/src/main/java/com/fine/theme/icon/svg/SvgIcon.java
  2. 44
      designer-base/src/main/java/com/fine/theme/light/ui/FineInputUI.java
  3. 4
      designer-base/src/main/java/com/fine/theme/light/ui/FineLightIconSet.java
  4. 5
      designer-base/src/main/java/com/fine/theme/light/ui/FineTooltipUI.java
  5. 19
      designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/FineSearchPane.java
  6. 7
      designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java
  7. 10
      designer-base/src/main/java/com/fr/design/foldablepane/HeaderPane.java
  8. 4
      designer-base/src/main/java/com/fr/design/foldablepane/UIExpandablePane.java
  9. 4
      designer-base/src/main/java/com/fr/design/gui/imenu/UIHeadMenu.java
  10. 14
      designer-base/src/main/java/com/fr/design/gui/ispinner/UISpinner.java
  11. 7
      designer-base/src/main/java/com/fr/design/gui/itextarea/UITextArea.java
  12. 4
      designer-base/src/main/java/com/fr/design/gui/itextfield/UITextField.java
  13. 11
      designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java
  14. 48
      designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java
  15. 8
      designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataBindingEditor.java
  16. 7
      designer-base/src/main/resources/com/fine/theme/icon/dot_disable.svg
  17. 3
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  18. 11
      designer-base/src/test/java/com/fr/design/gui/storybook/Storybook.java
  19. 47
      designer-base/src/test/java/com/fr/design/gui/storybook/components/ExpandablePaneStoryBoard.java
  20. 70
      designer-base/src/test/java/com/fr/design/gui/storybook/components/InputStoryBoard.java
  21. 24
      designer-base/src/test/java/com/fr/design/gui/storybook/components/SliderStoryBoard.java
  22. 37
      designer-base/src/test/java/com/fr/design/gui/storybook/components/ToolTipStoryBoard.java
  23. 11
      designer-form/src/main/java/com/fr/design/widget/ui/designer/component/FormWidgetValuePane.java
  24. 6
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java
  25. 16
      designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java
  26. 7
      designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java
  27. 3
      designer-realize/src/main/java/com/fr/start/MainDesigner.java

6
designer-base/src/main/java/com/fine/theme/icon/svg/SvgIcon.java

@ -106,14 +106,12 @@ public class SvgIcon implements DisabledIcon, Icon {
@Override
public int getIconWidth() {
// 根据dpi解除缩放
return unscale(size.width);
return size.width;
}
@Override
public int getIconHeight() {
// 根据dpi解除缩放
return unscale(size.height);
return size.height;
}
/**

44
designer-base/src/main/java/com/fine/theme/light/ui/FineInputUI.java

@ -1,5 +1,6 @@
package com.fine.theme.light.ui;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.ui.FlatButtonUI;
import com.formdev.flatlaf.ui.FlatPanelUI;
@ -8,6 +9,7 @@ import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import java.beans.PropertyChangeEvent;
/**
* Input输入框 UI类
@ -18,6 +20,9 @@ import javax.swing.plaf.ComponentUI;
*/
public class FineInputUI extends FlatPanelUI {
private static final String ENABLED = "enabled";
private static final String EDITABLE = "editable";
public FineInputUI(boolean shared) {
super(shared);
}
@ -39,7 +44,26 @@ public class FineInputUI extends FlatPanelUI {
@Override
protected void installDefaults(JPanel p) {
super.installDefaults(p);
arc = UIManager.getInt("Input.arc");
arc = FineUIScale.scale(UIManager.getInt("Input.arc"));
}
@Override
public void propertyChange(PropertyChangeEvent e) {
String propertyName = e.getPropertyName();
if (EDITABLE.equals(propertyName) || ENABLED.equals(propertyName)) {
updateBackground(e);
} else {
super.propertyChange(e);
}
}
private void updateBackground(PropertyChangeEvent e) {
JPanel source = (JPanel) e.getSource();
if (e.getNewValue() == Boolean.FALSE) {
source.setBackground(UIManager.getColor("Input.disabledBackground"));
} else {
source.setBackground(UIManager.getColor("Input.background"));
}
}
/**
@ -76,5 +100,23 @@ public class FineInputUI extends FlatPanelUI {
pressedBackground = UIManager.getColor("InputButton.pressedBackground");
background = UIManager.getColor("InputButton.background");
}
@Override
public void propertyChange(AbstractButton b, PropertyChangeEvent e) {
String propertyName = e.getPropertyName();
if (EDITABLE.equals(propertyName) || ENABLED.equals(propertyName)) {
updateBackground(b, e);
} else {
super.propertyChange(b, e);
}
}
private void updateBackground(AbstractButton b, PropertyChangeEvent e) {
if (e.getNewValue() == Boolean.FALSE) {
b.setBackground(UIManager.getColor("InputButton.disabledBackground"));
} else {
b.setBackground(UIManager.getColor("InputButton.background"));
}
}
}
}

4
designer-base/src/main/java/com/fine/theme/light/ui/FineLightIconSet.java

@ -138,7 +138,7 @@ public class FineLightIconSet extends AbstractIconSet {
new SvgIconSource("sub_report", "com/fine/theme/icon/insert/sub_report.svg", true),
new SvgIconSource("chart_line", "com/fine/theme/icon/chart/chart_line.svg", true),
new SvgIconSource("popup", "com/fine/theme/icon/popup/popup.svg", true),
new SvgIconSource("clear", "com/fine/theme/icon/clear.svg", true),
new SvgIconSource("clear", "com/fine/theme/icon/clear.svg"),
// 工具栏
new SvgIconSource("tool_copy", "com/fine/theme/icon/toolbar/copy.svg", true),
@ -172,7 +172,7 @@ public class FineLightIconSet extends AbstractIconSet {
new SvgIconSource("zoomIn", "com/fine/theme/icon/zoom/zoomIn.svg", true),
new SvgIconSource("zoomOut", "com/fine/theme/icon/zoom/zoomOut.svg", true),
new SvgIconSource("dot", "com/fine/theme/icon/dot.svg"),
new SvgIconSource("dot", "com/fine/theme/icon/dot.svg", true),
new SvgIconSource("expand_popup", "com/fine/theme/icon/popup/expand_popup.svg"),
new SvgIconSource("collapse_popup", "com/fine/theme/icon/popup/collapse_popup.svg")
);

5
designer-base/src/main/java/com/fine/theme/light/ui/FineTooltipUI.java

@ -1,5 +1,6 @@
package com.fine.theme.light.ui;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.ui.FlatToolTipUI;
import com.formdev.flatlaf.ui.FlatUIUtils;
import com.fr.base.BaseUtils;
@ -68,8 +69,8 @@ public class FineTooltipUI extends FlatToolTipUI {
protected void installDefaults(JComponent c) {
super.installDefaults(c);
c.setOpaque(false);
arc = UIManager.getInt("ToolTip.arc");
maxWidth = UIManager.getInt("ToolTip.maxWidth");
arc = FineUIScale.scale(UIManager.getInt("ToolTip.arc"));
maxWidth = FineUIScale.scale(UIManager.getInt("ToolTip.maxWidth"));
}

19
designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/FineSearchPane.java

@ -2,6 +2,7 @@ package com.fr.design.data.datapane.management.search.pane;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.FineInputUI;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.event.HoverAware;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
@ -27,9 +28,6 @@ import java.awt.event.MouseEvent;
*/
public class FineSearchPane extends JPanel implements HoverAware {
private static final Insets LABEL_INSETS = UIManager.getInsets("SearchPanel.labelBorderInsets");
private static final Insets BUTTON_INSETS = UIManager.getInsets("SearchPanel.buttonBorderInsets");
private UITextField searchTextField;
private UIButton clearButton;
@ -45,7 +43,9 @@ public class FineSearchPane extends JPanel implements HoverAware {
private void initComponents() {
// 左侧搜索图标
UILabel searchLabel = new UILabel(new LazyIcon("search"));
searchLabel.setBorder(BorderFactory.createEmptyBorder(LABEL_INSETS.top, LABEL_INSETS.left, LABEL_INSETS.bottom, LABEL_INSETS.right));
Insets labelInsets = UIManager.getInsets("SearchPanel.labelBorderInsets");
Insets scaledInsets = FineUIScale.scale(labelInsets);
searchLabel.setBorder(BorderFactory.createEmptyBorder(scaledInsets.top, scaledInsets.left, scaledInsets.bottom, scaledInsets.right));
// 中间输入框
searchTextField = new UITextField();
@ -68,7 +68,9 @@ public class FineSearchPane extends JPanel implements HoverAware {
// 右侧返回图标
clearButton = new UIButton(new LazyIcon("clear"));
clearButton.setUI(new FineInputUI.FineInputButtonUI(false));
clearButton.setBorder(BorderFactory.createEmptyBorder(BUTTON_INSETS.top, BUTTON_INSETS.left, BUTTON_INSETS.bottom, BUTTON_INSETS.right));
Insets buttonInsets = UIManager.getInsets("SearchPanel.buttonBorderInsets");
Insets buttonScaledInsets = FineUIScale.scale(buttonInsets);
clearButton.setBorder(BorderFactory.createEmptyBorder(buttonScaledInsets.top, buttonScaledInsets.left, buttonScaledInsets.bottom, buttonScaledInsets.right));
this.add(searchLabel, BorderLayout.WEST);
this.add(searchTextField, BorderLayout.CENTER);
@ -122,4 +124,11 @@ public class FineSearchPane extends JPanel implements HoverAware {
public void setText(String text) {
searchTextField.setText(text);
}
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
searchTextField.setEnabled(enabled);
clearButton.setEnabled(enabled);
}
}

7
designer-base/src/main/java/com/fr/design/data/datapane/management/search/pane/TreeSearchToolbarPane.java

@ -1,5 +1,6 @@
package com.fr.design.data.datapane.management.search.pane;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.DesignModelAdapter;
import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.data.datapane.management.search.TableDataTreeSearchManager;
@ -32,8 +33,6 @@ public class TreeSearchToolbarPane extends JPanel implements TreeSearchStatusCha
public static final String SEARCH_PANE = "searchPane";
private static final Insets INSETS = UIManager.getInsets("TreeSearchToolbarPane.borderInsets");
/**
* 工具栏
*/
@ -81,7 +80,9 @@ public class TreeSearchToolbarPane extends JPanel implements TreeSearchStatusCha
private void initContentPane() {
cardLayout = new CardLayout();
contentPane = new JPanel(cardLayout);
contentPane.setBorder(BorderFactory.createEmptyBorder(INSETS.top, INSETS.left, INSETS.bottom, INSETS.right));
Insets insets = UIManager.getInsets("TreeSearchToolbarPane.borderInsets");
Insets scaledInsets = FineUIScale.scale(insets);
contentPane.setBorder(BorderFactory.createEmptyBorder(scaledInsets.top, scaledInsets.left, scaledInsets.bottom, scaledInsets.right));
contentPane.add(searchPane, SEARCH_PANE);
contentPane.add(toolbarPane, TOOLBAR_PANE);
cardLayout.show(contentPane, TOOLBAR_PANE);

10
designer-base/src/main/java/com/fr/design/foldablepane/HeaderPane.java

@ -1,6 +1,7 @@
package com.fr.design.foldablepane;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.GraphHelper;
import javax.swing.BorderFactory;
@ -32,7 +33,6 @@ public class HeaderPane extends JPanel {
private int fontSize;
private final Icon triangleDown;
private final Icon triangleRight;
private final int hGap;
public void setPressed(boolean pressed) {
this.isPressed = pressed;
@ -80,7 +80,7 @@ public class HeaderPane extends JPanel {
int descent = metrics.getDescent();
double titleY = (double) (getHeight() - (ascent + descent)) / 2 + ascent;
GraphHelper.drawString(g2d, this.title, triangleDown.getIconWidth() + this.hGap, titleY);
GraphHelper.drawString(g2d, this.title, triangleDown.getIconWidth() + FineUIScale.scale(UIManager.getInt("ExpandablePane.HeaderPane.hGap")), titleY);
g2d.dispose();
}
@ -88,12 +88,12 @@ public class HeaderPane extends JPanel {
this.isShow = true;
triangleDown = new LazyIcon("triangle_down");
triangleRight = new LazyIcon("triangle_right");
this.hGap = UIManager.getInt("ExpandablePane.HeaderPane.hGap");
this.setPreferredSize(new Dimension(UIManager.getInt("HeaderPane.width"), UIManager.getInt("HeaderPane.height")));
this.setPreferredSize(FineUIScale.scale(new Dimension(UIManager.getInt("HeaderPane.width"), UIManager.getInt("HeaderPane.height"))));
Insets insets = UIManager.getInsets("ExpandablePane.HeaderPane.borderInsets");
Insets scaledInsets = FineUIScale.scale(insets);
this.setForeground(UIManager.getColor("ExpandablePane.HeaderPane.foreground"));
this.setFont(getFont().deriveFont(Font.BOLD));
this.setBorder(BorderFactory.createEmptyBorder(insets.top, insets.left, insets.bottom, insets.right));
this.setBorder(BorderFactory.createEmptyBorder(scaledInsets.top, scaledInsets.left, scaledInsets.bottom, scaledInsets.right));
}
public HeaderPane(Color bgColor, String title, int headHeight) {

4
designer-base/src/main/java/com/fr/design/foldablepane/UIExpandablePane.java

@ -1,5 +1,7 @@
package com.fr.design.foldablepane;
import com.fine.theme.utils.FineUIScale;
import javax.swing.BorderFactory;
import javax.swing.JPanel;
import javax.swing.UIManager;
@ -45,7 +47,7 @@ public class UIExpandablePane extends JPanel {
}
private void initComponents() {
this.setLayout(new BorderLayout(0, UIManager.getInt("ExpandablePane.vGap")));
this.setLayout(new BorderLayout(0, FineUIScale.scale(UIManager.getInt("ExpandablePane.vGap"))));
headerPanel = new HeaderPane(color, title, headHeight);
headerPanel.addMouseListener(new PanelAction());

4
designer-base/src/main/java/com/fr/design/gui/imenu/UIHeadMenu.java

@ -1,5 +1,7 @@
package com.fr.design.gui.imenu;
import com.fine.theme.utils.FineUIScale;
import javax.swing.Action;
import javax.swing.JButton;
import javax.swing.JMenuItem;
@ -18,7 +20,7 @@ public class UIHeadMenu extends UIMenu {
public UIHeadMenu(String name) {
super(name);
setBorder(new EmptyBorder(UIManager.getInsets("HeadMenu.borderMargins")));
setBorder(new EmptyBorder(FineUIScale.scale(UIManager.getInsets("HeadMenu.borderMargins"))));
}
@Override

14
designer-base/src/main/java/com/fr/design/gui/ispinner/UISpinner.java

@ -2,6 +2,7 @@ package com.fr.design.gui.ispinner;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.FineInputUI;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver;
import com.fr.design.event.HoverAware;
@ -44,9 +45,6 @@ import java.awt.event.MouseWheelListener;
public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver, HoverAware {
protected double value;
private static final int BUTTON_WIDTH = UIManager.getInt("InputButton.width");
private static final int BUTTON_HEIGHT = UIManager.getInt("InputButton.height");
private static final int HEIGHT = UIManager.getInt("Input.height");
private static final int DEFAULT_NUMBERFIELD_COLUMNS = 2;
private UINumberField textField;
private UIButton preButton;
@ -232,7 +230,7 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver,
@Override
public Dimension getPreferredSize() {
Dimension dim = super.getPreferredSize();
dim.height = HEIGHT;
dim.height = FineUIScale.scale(UIManager.getInt("Input.height"));
return dim;
}
@ -284,7 +282,10 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver,
arrowPane.add(preButton);
arrowPane.add(nextButton);
arrowPane.setOpaque(false);
arrowPane.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
int buttonWidth = UIManager.getInt("InputButton.width");
int buttonHeight = UIManager.getInt("InputButton.height");
arrowPane.setPreferredSize(FineUIScale.scale(new Dimension(buttonWidth, buttonHeight)));
add(arrowPane, BorderLayout.EAST);
componentInitListeners();
}
@ -370,7 +371,8 @@ public class UISpinner extends JPanel implements UIObserver, GlobalNameObserver,
}
};
Insets insets = UIManager.getInsets("InputTextField.borderInsets");
numberField.setBorder(BorderFactory.createEmptyBorder(insets.top, insets.left, insets.bottom, insets.right));
Insets scaledInsets = FineUIScale.scale(insets);
numberField.setBorder(BorderFactory.createEmptyBorder(scaledInsets.top, scaledInsets.left, scaledInsets.bottom, scaledInsets.right));
numberField.setOpaque(false);
return numberField;
}

7
designer-base/src/main/java/com/fr/design/gui/itextarea/UITextArea.java

@ -1,5 +1,6 @@
package com.fr.design.gui.itextarea;
import com.fine.theme.utils.FineUIScale;
import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.event.HoverAware;
import com.fr.design.event.UIObserver;
@ -25,7 +26,6 @@ public class UITextArea extends JTextArea implements UIObserver, HoverAware {
private UIObserverListener uiObserverListener;
private boolean hover;
private Dimension preferredSize;
private final int HEIGHT = UIManager.getInt("TextArea.height");
public UITextArea(int i, int j) {
super(i, j);
@ -124,8 +124,9 @@ public class UITextArea extends JTextArea implements UIObserver, HoverAware {
@Override
public Dimension getPreferredSize() {
Dimension size = super.getPreferredSize();
if (size.height < HEIGHT) {
return new Dimension(size.width, HEIGHT);
int height = FineUIScale.scale(UIManager.getInt("TextArea.height"));
if (size.height < height) {
return new Dimension(size.width, height);
}
return size;
}

4
designer-base/src/main/java/com/fr/design/gui/itextfield/UITextField.java

@ -1,5 +1,6 @@
package com.fr.design.gui.itextfield;
import com.fine.theme.utils.FineUIScale;
import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.event.GlobalNameListener;
import com.fr.design.event.GlobalNameObserver;
@ -40,7 +41,6 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs
private GlobalNameListener globalNameListener = null;
private Dimension preferredSize = null;
private String placeholder = StringUtils.EMPTY;
private final int HEIGHT = UIManager.getInt("Input.height");
//有些情况下setText的时候不希望触发attributeChange,添加一个属性标识
private boolean isSetting = false;
@ -243,6 +243,6 @@ public class UITextField extends JTextField implements UIObserver, GlobalNameObs
@Override
public Dimension getPreferredSize() {
return new Dimension(super.getPreferredSize().width, HEIGHT);
return new Dimension(super.getPreferredSize().width, FineUIScale.scale(UIManager.getInt("Input.height")));
}
}

11
designer-base/src/main/java/com/fr/design/mainframe/EastRegionContainerPane.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.RectangleButtonUI;
import com.fine.theme.utils.FineUIScale;
import com.formdev.flatlaf.FlatDarkLaf;
import com.formdev.flatlaf.ui.FlatLineBorder;
import com.fr.base.FRContext;
@ -81,7 +82,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private static final int TAB_BUTTON_WIDTH = 40;
private static final int TAB_BUTTON_HEIGHT = 40;
private static final int CONTENT_WIDTH = CONTAINER_WIDTH - TAB_WIDTH;
private static final int POPUP_TOOLPANE_HEIGHT = UIManager.getInt("PopupToolPane.height");
private static final int ARROW_RANGE_START = CONTENT_WIDTH - 30;
// 弹出对话框高度
private static final int POPUP_MIN_HEIGHT = 145;
@ -1188,8 +1188,6 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
private static final String UP_BUTTON = "UpButton";
private static final String DOWN_BUTTON = "DownButton";
private final Insets INSETS = UIManager.getInsets("PopupToolPane.borderInsets");
private MouseListener mouseListener = new MouseAdapter() {
@Override
@ -1265,7 +1263,9 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
popupButton = createPopupButton(buttonType);
contentPane.add(popupButton, BorderLayout.EAST);
contentPane.setBorder(new EmptyBorder(INSETS.top, INSETS.left, INSETS.bottom, INSETS.right));
Insets insets = UIManager.getInsets("PopupToolPane.borderInsets");
Insets scaledInsets = FineUIScale.scale(insets);
contentPane.setBorder(new EmptyBorder(scaledInsets.top, scaledInsets.left, scaledInsets.bottom, scaledInsets.right));
setLayout(new BorderLayout());
add(contentPane, BorderLayout.CENTER);
@ -1308,7 +1308,8 @@ public class EastRegionContainerPane extends UIEastResizableContainer {
@Override
public Dimension getPreferredSize() {
return new Dimension(super.getPreferredSize().width, POPUP_TOOLPANE_HEIGHT);
int popupToolPaneHeight = UIManager.getInt("PopupToolPane.height");
return new Dimension(super.getPreferredSize().width, FineUIScale.scale(popupToolPaneHeight));
}
}

48
designer-base/src/main/java/com/fr/design/mainframe/widget/accessibles/BaseAccessibleEditor.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe.widget.accessibles;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.light.ui.FineInputUI;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.Exception.ValidationException;
import com.fr.design.designer.properties.Decoder;
import com.fr.design.designer.properties.Encoder;
@ -45,9 +46,6 @@ public class BaseAccessibleEditor extends BasicPane implements AccessibleEditor,
private UIButton btPopup;
protected ITextComponent txtValue;
private boolean hover;
private static final int HEIGHT = UIManager.getInt("Input.height");
private static final int BUTTON_WIDTH = UIManager.getInt("InputButton.width");
private static final int BUTTON_HEIGHT = UIManager.getInt("InputButton.height");
public BaseAccessibleEditor(Encoder enc, Decoder dec, boolean showBtn) {
listeners = new ArrayList<ChangeListener>();
@ -59,26 +57,29 @@ public class BaseAccessibleEditor extends BasicPane implements AccessibleEditor,
txtValue.setEditable(dec != null);
((JComponent) txtValue).setOpaque(false);
Insets insets = UIManager.getInsets("InputTextField.borderInsets");
((JComponent) txtValue).setBorder(BorderFactory.createEmptyBorder(insets.top, insets.left, insets.bottom, insets.right));
Insets scaledInsets = FineUIScale.scale(insets);
((JComponent) txtValue).setBorder(BorderFactory.createEmptyBorder(scaledInsets.top, scaledInsets.left, scaledInsets.bottom, scaledInsets.right));
this.setUI(FineInputUI.createUI(this));
setPreferredSize(new Dimension(getPreferredSize().width, HEIGHT));
setPreferredSize(new Dimension(getPreferredSize().width, FineUIScale.scale(UIManager.getInt("Input.height"))));
}
private void initListener() {
((TextField) txtValue).addMouseListener(new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent e) {
hover = true;
repaint();
}
if (txtValue instanceof TextField) {
((TextField) txtValue).addMouseListener(new MouseAdapter() {
@Override
public void mouseEntered(MouseEvent e) {
hover = true;
repaint();
}
@Override
public void mouseExited(MouseEvent e) {
hover = false;
repaint();
}
});
@Override
public void mouseExited(MouseEvent e) {
hover = false;
repaint();
}
});
}
}
@Override
@ -151,7 +152,7 @@ public class BaseAccessibleEditor extends BasicPane implements AccessibleEditor,
btPopup.setContentAreaFilled(false);
btPopup.setIcon(new LazyIcon("down_arrow"));
}
btPopup.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
btPopup.setPreferredSize(FineUIScale.scale(new Dimension(UIManager.getInt("InputButton.width"), UIManager.getInt("InputButton.height"))));
}
// 有的编辑器是使用下拉框来直接选择的,这时候就把按钮显示成下拉框
@ -233,4 +234,15 @@ public class BaseAccessibleEditor extends BasicPane implements AccessibleEditor,
public boolean isHovered() {
return hover;
}
@Override
public void setEnabled(boolean enabled) {
super.setEnabled(enabled);
if (btPopup != null) {
btPopup.setEnabled(enabled);
}
if (txtValue instanceof TextField) {
((TextField) txtValue).setEnabled(enabled);
}
}
}

8
designer-base/src/main/java/com/fr/design/mainframe/widget/editors/DataBindingEditor.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.widget.editors;
import com.fine.theme.utils.FineUIScale;
import com.fr.data.TableDataSource;
import com.fr.design.data.DesignTableDataManager;
import com.fr.design.data.datapane.TableDataComboBox;
@ -27,9 +28,6 @@ import java.util.List;
* @since 2012-3-29下午5:26:28
*/
public class DataBindingEditor extends Editor<DataBinding> {
private final static int HORI_GAP = UIManager.getInt("DataBindingEditor.hgap");
private final static int VER_GAP = UIManager.getInt("DataBindingEditor.vgap");
protected TableDataComboBox tableDataComboBox;
protected LazyComboBox columnNameComboBox;
@ -64,7 +62,9 @@ public class DataBindingEditor extends Editor<DataBinding> {
private void initCompontents() {
this.setLayout(new BorderLayout(HORI_GAP, VER_GAP));
int vgap = UIManager.getInt("DataBindingEditor.vgap");
int hgap = UIManager.getInt("DataBindingEditor.hgap");
this.setLayout(new BorderLayout(FineUIScale.scale(hgap), FineUIScale.scale(vgap)));
tableDataComboBox = new TableDataComboBox(getTableDataSource());
tableDataComboBox.setPreferredSize(new Dimension(55, 20));
tableDataComboBox.addItemListener(tableDataComboBoxListener);

7
designer-base/src/main/resources/com/fine/theme/icon/dot_disable.svg

@ -0,0 +1,7 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="&#230;&#155;&#180;&#229;&#164;&#154;">
<path id="Union" fill-rule="evenodd" clip-rule="evenodd"
d="M5.34999 8.35C5.34999 8.81944 4.96944 9.2 4.49999 9.2C4.03055 9.2 3.64999 8.81944 3.64999 8.35C3.64999 7.88056 4.03055 7.5 4.49999 7.5C4.96944 7.5 5.34999 7.88056 5.34999 8.35ZM8.84999 8.35C8.84999 8.81944 8.46944 9.2 7.99999 9.2C7.53055 9.2 7.14999 8.81944 7.14999 8.35C7.14999 7.88056 7.53055 7.5 7.99999 7.5C8.46944 7.5 8.84999 7.88056 8.84999 8.35ZM11.5 9.2C11.9694 9.2 12.35 8.81944 12.35 8.35C12.35 7.88056 11.9694 7.5 11.5 7.5C11.0306 7.5 10.65 7.88056 10.65 8.35C10.65 8.81944 11.0306 9.2 11.5 9.2Z"
fill="#0A1C38" fill-opacity="0.29"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 803 B

3
designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties

@ -775,11 +775,13 @@ Spinner.buttonStyle = button
InputButton.background=$fill.normal
InputButton.hoverBackground=$fill.hover
InputButton.pressedBackground=$fill.click
InputButton.disabledBackground=$fill.disabled
InputButton.width=$Component.defaultHeight
InputButton.height=$Component.defaultHeight
InputTextField.borderInsets=0, 6, 0, 6
Input.border=com.fine.theme.light.ui.FineRoundBorder
Input.background=$fill.normal
Input.disabledBackground=$fill.disabled
Input.height=$Component.defaultHeight
Input.arc=$Component.arc
#---- FormulaPane ----
@ -951,6 +953,7 @@ TextField.selectionBackground=$color.brand4
TextField.selectionForeground=$text.white
TextField.inactiveForeground=fade(@foreground, 29%)
TextField.disabledBackground=$fill.disabled
TextField.inactiveBackground=$fill.disabled
TextField.placeholderForeground = @disabledForeground
TextField.iconTextGap = 4
TextField.height=$Component.defaultHeight

11
designer-base/src/test/java/com/fr/design/gui/storybook/Storybook.java

@ -10,7 +10,11 @@ import com.formdev.flatlaf.util.ScaledEmptyBorder;
import com.fr.design.gui.UILookAndFeel;
import com.fr.design.gui.storybook.components.ButtonStoryBoard;
import com.fr.design.gui.storybook.components.EastRegionContainer;
import com.fr.design.gui.storybook.components.ExpandablePaneStoryBoard;
import com.fr.design.gui.storybook.components.InputStoryBoard;
import com.fr.design.gui.storybook.components.SliderStoryBoard;
import com.fr.design.gui.storybook.components.ToggleButtonStoryBoard;
import com.fr.design.gui.storybook.components.ToolTipStoryBoard;
import com.fr.design.gui.storybook.components.UIHeadGroupStoryBoard;
import javax.swing.DefaultListCellRenderer;
@ -32,8 +36,7 @@ import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import java.util.ArrayList;
import static com.fine.swing.ui.layout.Layouts.cell;
import static com.fine.swing.ui.layout.Layouts.row;
import static com.fine.swing.ui.layout.Layouts.*;
import static com.fine.theme.utils.FineUIScale.scale;
/**
@ -95,6 +98,10 @@ public class Storybook {
components.add(new StoryBookComponent("ButtonTabGroup", new ButtonTabStoryBoard()));
components.add(new StoryBookComponent("CheckBox", new CheckBoxStoryBoard()));
components.add(new StoryBookComponent("ComboBox", new ComboBoxStoryBoard()));
components.add(new StoryBookComponent("Input", new InputStoryBoard()));
components.add(new StoryBookComponent("Slider", new SliderStoryBoard()));
components.add(new StoryBookComponent("ToolTip", new ToolTipStoryBoard()));
components.add(new StoryBookComponent("ExpandblePane", new ExpandablePaneStoryBoard()));
return components.toArray(new StoryBookComponent[0]);
}

47
designer-base/src/test/java/com/fr/design/gui/storybook/components/ExpandablePaneStoryBoard.java

@ -0,0 +1,47 @@
package com.fr.design.gui.storybook.components;
import com.fr.design.foldablepane.UIExpandablePane;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.storybook.StoryBoard;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import static com.fine.swing.ui.layout.Layouts.*;
/**
* 扩展面板
*
* @author Leo.Qin
* @since 11.0
* Created on 2023/12/14
*/
public class ExpandablePaneStoryBoard extends StoryBoard {
public ExpandablePaneStoryBoard() {
super("扩展面板");
add(cell(new UIExpandablePane("扩展", 24, createContentPane())));
add(cell(new UIExpandablePane("扩展2", 24, createContentPane2())));
}
private JPanel createContentPane2() {
JPanel jPanel = new JPanel();
UILabel label = new UILabel("扩展面板2");
UIButton button = new UIButton("按钮2");
jPanel.add(label, BorderLayout.WEST);
jPanel.add(button, BorderLayout.CENTER);
return jPanel;
}
JPanel createContentPane() {
JPanel jPanel = new JPanel();
UILabel label = new UILabel("扩展面板1");
UIButton button = new UIButton("按钮1");
jPanel.add(label, BorderLayout.WEST);
jPanel.add(button, BorderLayout.CENTER);
return jPanel;
}
}

70
designer-base/src/test/java/com/fr/design/gui/storybook/components/InputStoryBoard.java

@ -0,0 +1,70 @@
package com.fr.design.gui.storybook.components;
import com.fr.design.data.datapane.management.search.pane.FineSearchPane;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.ispinner.UISpinner;
import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.gui.itextfield.UITextField;
import com.fr.design.gui.storybook.StoryBoard;
import com.fr.design.mainframe.widget.accessibles.AccessibleBackgroundEditor;
import static com.fine.swing.ui.layout.Layouts.*;
/**
* 输入框相关组件
*
* @author Leo.Qin
* @since 11.0
* Created on 2023/12/14
*/
public class InputStoryBoard extends StoryBoard {
public InputStoryBoard() {
super("输入框");
add(
cell(new UILabel("文本框")).with(it -> it.setFont(labelFont.deriveFont(14f))),
cell(new UITextField("文本")),
cell(new UILabel("文本框-禁用")).with(it -> it.setFont(labelFont.deriveFont(14f))),
cell(new UITextField("文本")).with(it -> it.setEnabled(false)),
cell(new UILabel("文本域")).with(it -> it.setFont(labelFont.deriveFont(14f))),
cell(new UITextArea("下面一些近期重要通知公告、常用CRM&KMS页面链接,希望可以帮到你哦~ " +
"或者你可以找我的两个好兄弟“Fine人事”、“ISC服务平台Fine人事”的工位在“企业微信工作台-ISC”下面," +
"菜单栏里的内容可以解答一些常见问题 ISC服务平台”的工位在“CRM主页”," +
"你也可以点此链接快速访问→ISC服务平台(finereporthelp.com)长远希望把它打造为一个全公司重要通知、" +
"常用入口的服务平台,如有意见建议,欢迎多多反馈Jewel-朱朱~如果觉得我可以帮到你," +
"请滑到页面左下角给我点个赞吧(#^.^#)")),
cell(new UILabel("文本域-禁用")).with(it -> it.setFont(labelFont.deriveFont(14f))),
cell(new UITextArea("下面一些近期重要通知公告、常用CRM&KMS页面链接," +
"希望可以帮到你哦~ 或者你可以找我的两个好兄弟“Fine人事”、" +
"“ISC服务平台Fine人事”的工位在“企业微信工作台-ISC”下面," +
"菜单栏里的内容可以解答一些常见问题 ISC服务平台”的工位在“CRM主页”" +
",你也可以点此链接快速访问→ISC服务平台(finereporthelp.com)长远希望把它打造为一个全公司重要通知、" +
"常用入口的服务平台,如有意见建议,欢迎多多反馈Jewel-朱朱~如果觉得我可以帮到你," +
"请滑到页面左下角给我点个赞吧(#^.^#)")).with(it -> it.setEnabled(false)),
cell(new UILabel("数字步进(0~100,步长:1)")).with(it -> it.setFont(labelFont.deriveFont(14f))),
cell(new UISpinner(0, 100, 1, 50)),
cell(new UILabel("数字步进-禁用")).with(it -> it.setFont(labelFont.deriveFont(14f))),
cell(new UISpinner(0, 100, 1, 50)).with(it -> it.setEnabled(false)),
cell(new UILabel("搜索框")).with(it -> it.setFont(labelFont.deriveFont(14f))),
cell(new FineSearchPane()),
cell(new UILabel("搜索框-禁用")).with(it -> it.setFont(labelFont.deriveFont(14f))),
cell(new FineSearchPane()).with(it -> {
it.setEnabled(false);
it.setText("搜索文本");
}),
cell(new UILabel("输入框-更多,带按钮")).with(it -> it.setFont(labelFont.deriveFont(14f))),
cell(new AccessibleBackgroundEditor()),
cell(new UILabel("输入框-更多,带按钮-禁用")).with(it -> it.setFont(labelFont.deriveFont(14f))),
cell(new AccessibleBackgroundEditor()).with(it -> it.setEnabled(false))
);
}
}

24
designer-base/src/test/java/com/fr/design/gui/storybook/components/SliderStoryBoard.java

@ -0,0 +1,24 @@
package com.fr.design.gui.storybook.components;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.storybook.StoryBoard;
import com.fr.design.mainframe.JFormSliderPane;
import static com.fine.swing.ui.layout.Layouts.*;
/**
* 滑块
*
* @author Leo.Qin
* @since 11.0
* Created on 2023/12/14
*/
public class SliderStoryBoard extends StoryBoard {
public SliderStoryBoard() {
super("滑块");
add(
cell(new UILabel("面板缩放滑块")).with(it -> it.setFont(labelFont.deriveFont(14f))),
row(cell(new JFormSliderPane()))
);
}
}

37
designer-base/src/test/java/com/fr/design/gui/storybook/components/ToolTipStoryBoard.java

@ -0,0 +1,37 @@
package com.fr.design.gui.storybook.components;
import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel;
import com.fr.design.gui.storybook.StoryBoard;
import static com.fine.swing.ui.layout.Layouts.*;
/**
* 提示框
*
* @author Leo.Qin
* @since 11.0
* Created on 2023/12/14
*/
public class ToolTipStoryBoard extends StoryBoard {
public ToolTipStoryBoard() {
super("提示框");
add(
cell(new UILabel("组件启用状态下的提示")).with(it -> it.setFont(labelFont.deriveFont(14f))),
cell(new UIButton("组件")).with(it -> it.setToolTipText("组件启用状态下的提示")),
cell(new UILabel("组件禁用状态下的提示")).with(it -> it.setFont(labelFont.deriveFont(14f))),
cell(new UIButton("组件")).with(it -> {
it.setEnabled(false);
it.setToolTipText("组件禁用状态下的提示");
}),
cell(new UILabel("较长提示")).with(it -> it.setFont(labelFont.deriveFont(14f))),
cell(new UIButton("组件")).with(it -> it.setToolTipText("下面一些近期重要通知公告、常用CRM&KMS页面链接," +
"希望可以帮到你哦~ 或者你可以找我的两个好兄弟“Fine人事”、" +
"“ISC服务平台Fine人事”的工位在“企业微信工作台-ISC”下面," +
"菜单栏里的内容可以解答一些常见问题 ISC服务平台”的工位在“CRM主页”," +
"你也可以点此链接快速访问→ISC服务平台(finereporthelp.com)长远希望把它打造为一个全公司重要通知、" +
"常用入口的服务平台,如有意见建议,欢迎多多反馈Jewel-朱朱~" +
"如果觉得我可以帮到你,请滑到页面左下角给我点个赞吧(#^.^#)"))
);
}
}

11
designer-form/src/main/java/com/fr/design/widget/ui/designer/component/FormWidgetValuePane.java

@ -1,5 +1,6 @@
package com.fr.design.widget.ui.designer.component;
import com.fine.theme.utils.FineUIScale;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.editor.editor.BooleanEditor;
import com.fr.design.editor.editor.DateEditor;
@ -31,10 +32,6 @@ public class FormWidgetValuePane extends JPanel {
private JPanel customPane;
private CardLayout cardLayout;
private final static int VER_GAP = UIManager.getInt("DataBindingEditor.vgap");
private final static int HEIGHT = UIManager.getInt("DataBindingEditor.height");
public FormWidgetValuePane(Object o, boolean onlyServer) {
DataControl widget = (DataControl) o;
editor = createWidgetValueEditor(widget, onlyServer);
@ -58,10 +55,12 @@ public class FormWidgetValuePane extends JPanel {
index = 0;
widgetValueHead.setSelectedIndex(index);
}
int vgap = UIManager.getInt("DataBindingEditor.vgap");
int height = UIManager.getInt("DataBindingEditor.height");
if (ComparatorUtils.equals(editor[index].getName(), com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Widget_Field"))) {
customPane.setPreferredSize(new Dimension(100, HEIGHT * 2 + VER_GAP));
customPane.setPreferredSize(new Dimension(100, FineUIScale.scale(height * 2 + vgap)));
} else {
customPane.setPreferredSize(new Dimension(100, HEIGHT));
customPane.setPreferredSize(new Dimension(100, FineUIScale.scale(height)));
}
cardLayout.show(customPane, editor[index].getName());
}

6
designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java

@ -3,6 +3,7 @@
*/
package com.fr.design.mainframe.bbs;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.FRContext;
import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.DesignerEnvManager;
@ -62,12 +63,13 @@ public class UserInfoPane extends BasicPane {
* 构造函数
*/
private UserInfoPane() {
this.setPreferredSize(new Dimension(UIManager.getInt("North.userinfoLabel.width"), UIManager.getInt("North.userinfoLabel.height")));
this.setPreferredSize(FineUIScale.scale(new Dimension(UIManager.getInt("North.userinfoLabel.width"), UIManager.getInt("North.userinfoLabel.height"))));
this.setLayout(new BorderLayout());
this.userInfoLabel = new UserInfoLabel(this);
Insets insets = UIManager.getInsets("North.userinfoLabel.borderMargins");
this.userInfoLabel.setBorder(BorderFactory.createEmptyBorder(insets.top, insets.left, insets.bottom, insets.right));
Insets scaledInsets = FineUIScale.scale(insets);
this.userInfoLabel.setBorder(BorderFactory.createEmptyBorder(scaledInsets.top, scaledInsets.left, scaledInsets.bottom, scaledInsets.right));
this.markUnSignIn();
autoPushLoginDialog();

16
designer-realize/src/main/java/com/fr/design/mainframe/cell/settingpane/CellOtherSetPane.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.cell.settingpane;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.Style;
import com.fr.design.constants.LayoutConstants;
import com.fr.design.constants.UIConstants;
@ -67,7 +68,6 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
private static final int HEAD_WDITH = 290;
private static final int HEAD_HEIGTH = 24;
private static final int COMBO_WIDTH = 154;
private static final int HEIGHT = UIManager.getInt("CellOtherSetPane.height");
private static final int BUTTON_GROUP_WIDTH = 140;
private static final double f = TableLayout.FILL;
private static final double p = TableLayout.PREFERRED;
@ -265,7 +265,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
@Override
public void stateChanged(ChangeEvent e) {
if (insertRowPolicyButtonGroup.getSelectedIndex() == 1) {
insertRowPane.setPreferredSize(new Dimension(100, HEIGHT));
insertRowPane.setPreferredSize(new Dimension(100, FineUIScale.scale(UIManager.getInt("CellOtherSetPane.height"))));
insertRowLayout.show(insertRowPane, "content");
} else {
insertRowLayout.show(insertRowPane, "none");
@ -333,7 +333,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
@Override
public void stateChanged(ChangeEvent e) {
if (tooltipButtonGroup.getSelectedIndex() == 0) {
tooltipPane.setPreferredSize(new Dimension(154, HEIGHT));
tooltipPane.setPreferredSize(new Dimension(154, FineUIScale.scale(UIManager.getInt("CellOtherSetPane.height"))));
tooltipLayout.show(tooltipPane, "content");
} else {
tooltipLayout.show(tooltipPane, "none");
@ -369,7 +369,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
@Override
public void itemStateChanged(ItemEvent e) {
if (showPartComboBox.getSelectedIndex() == 0) {
showPartPane.setPreferredSize(new Dimension(70, HEIGHT));
showPartPane.setPreferredSize(new Dimension(70, FineUIScale.scale(UIManager.getInt("CellOtherSetPane.height"))));
showPartLayout.show(showPartPane, "content");
} else {
showPartLayout.show(showPartPane, "none");
@ -394,7 +394,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
textOverflowComPane.setVisible(e.getStateChange() == ItemEvent.SELECTED);
if (e.getStateChange() == ItemEvent.SELECTED) {
if (showPartComboBox.getSelectedIndex() == 0) {
showPartPane.setPreferredSize(new Dimension(70, HEIGHT));
showPartPane.setPreferredSize(new Dimension(70, FineUIScale.scale(UIManager.getInt("CellOtherSetPane.height"))));
showPartLayout.show(showPartPane, "content");
} else {
showPartLayout.show(showPartPane, "none");
@ -507,7 +507,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
public void itemStateChanged(ItemEvent e) {
if (e.getStateChange() == ItemEvent.SELECTED) {
if (showContent.getSelectedIndex() == 3) {
fileNamePane.setPreferredSize(new Dimension(100, HEIGHT));
fileNamePane.setPreferredSize(new Dimension(100, FineUIScale.scale(UIManager.getInt("CellOtherSetPane.height"))));
fileNameLayout.show(fileNamePane, "content");
} else {
fileNameLayout.show(fileNamePane, "none");
@ -632,7 +632,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
tooltipButtonGroup.setSelectedIndex(1);
}
if (tooltipButtonGroup.getSelectedIndex() == 0) {
tooltipPane.setPreferredSize(new Dimension(100, HEIGHT));
tooltipPane.setPreferredSize(new Dimension(100, FineUIScale.scale(UIManager.getInt("CellOtherSetPane.height"))));
tooltipLayout.show(tooltipPane, "content");
} else {
tooltipLayout.show(tooltipPane, "none");
@ -685,7 +685,7 @@ public class CellOtherSetPane extends AbstractCellAttrPane {
this.valueEditor.populate(StringUtils.EMPTY);
}
if (insertRowPolicyButtonGroup.getSelectedIndex() == 1) {
insertRowPane.setPreferredSize(new Dimension(100, HEIGHT));
insertRowPane.setPreferredSize(new Dimension(100, FineUIScale.scale(UIManager.getInt("CellOtherSetPane.height"))));
insertRowLayout.show(insertRowPane, "content");
} else {
insertRowLayout.show(insertRowPane, "none");

7
designer-realize/src/main/java/com/fr/quickeditor/cellquick/CellFormulaQuickEditor.java

@ -1,6 +1,7 @@
package com.fr.quickeditor.cellquick;
import com.fine.theme.icon.LazyIcon;
import com.fine.theme.utils.FineUIScale;
import com.fr.base.BaseFormula;
import com.fr.base.Style;
import com.fr.base.TextFormat;
@ -60,9 +61,6 @@ public class CellFormulaQuickEditor extends CellQuickEditor {
//正在编辑的单元格
private TemplateCellElement editingCellElement;
private static final int BUTTON_WIDTH = UIManager.getInt("FormulaPane.buttonWidth");
private static final int BUTTON_HEIGHT = UIManager.getInt("FormulaPane.buttonHeight");
private DocumentListener documentListener = new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent e) {
@ -106,7 +104,8 @@ public class CellFormulaQuickEditor extends CellQuickEditor {
UIButton formulaButton = new UIButton(new LazyIcon("formula"));
formulaButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Formula") + "...");
formulaButton.setPreferredSize(new Dimension(BUTTON_WIDTH, BUTTON_HEIGHT));
Dimension dimension = new Dimension(UIManager.getInt("FormulaPane.buttonWidth"), UIManager.getInt("FormulaPane.buttonHeight"));
formulaButton.setPreferredSize(FineUIScale.scale(dimension));
formulaButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {
final UIFormula formulaPane = FormulaFactory.createFormulaPaneWhenReserveFormula();

3
designer-realize/src/main/java/com/fr/start/MainDesigner.java

@ -49,7 +49,6 @@ import com.fr.design.module.DesignModuleFactory;
import com.fr.design.monitor.DesignerLifecycleMonitorContext;
import com.fr.design.notification.ui.NotificationCenterPane;
import com.fr.design.share.SharableManager;
import com.fr.design.ui.util.EdtInvocationManager;
import com.fr.design.ui.util.UIUtil;
import com.fr.design.utils.DesignUtils;
import com.fr.design.utils.DesignerPort;
@ -160,7 +159,7 @@ public class MainDesigner extends BaseDesigner {
SwitchForSwingChecker.initThreadMonitoring();
new UiInspector();
EdtInvocationManager.installEDTCheckers();
// EdtInvocationManager.installEDTCheckers();
}
/**

Loading…
Cancel
Save