diff --git a/designer-base/src/main/java/com/fine/theme/light/ui/FineHeadGroupUI.java b/designer-base/src/main/java/com/fine/theme/light/ui/FineHeadGroupUI.java index 6b2289f0c6..2047918bb2 100644 --- a/designer-base/src/main/java/com/fine/theme/light/ui/FineHeadGroupUI.java +++ b/designer-base/src/main/java/com/fine/theme/light/ui/FineHeadGroupUI.java @@ -27,7 +27,12 @@ public class FineHeadGroupUI extends PanelUI { @Styleable(dot = true) protected int arc; - @SuppressWarnings({"MethodOverridesStaticMethodOfSuperclass", "UnusedDeclaration"}) + /** + * 创建UI + * + * @param c 组件 + * @return ComponentUI + */ public static ComponentUI createUI(JComponent c) { return new FineHeadGroupUI(); } diff --git a/designer-base/src/main/java/com/fr/design/gui/ibutton/UIButton.java b/designer-base/src/main/java/com/fr/design/gui/ibutton/UIButton.java index 8a64e7e687..f01c52cb7b 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ibutton/UIButton.java +++ b/designer-base/src/main/java/com/fr/design/gui/ibutton/UIButton.java @@ -98,7 +98,6 @@ public class UIButton extends JButton implements UIObserver, UITextComponent { setPressedIcon(pressed); setExtraPainted(false); setBackground(null); -// setForeground(UIConstants.FONT_COLOR); setOpaque(false); initListener(); } @@ -139,7 +138,6 @@ public class UIButton extends JButton implements UIObserver, UITextComponent { public void set4ToolbarButton() { setNormalPainted(false); Dimension dim = getPreferredSize(); -// dim.height = HEIGHT; setBackground(null); setOpaque(false); setSize(dim); @@ -159,7 +157,6 @@ public class UIButton extends JButton implements UIObserver, UITextComponent { setNormalPainted(false); setBackground(null); setOpaque(false); - setSize(new Dimension(34, 44)); setBorderPaintedOnlyWhenPressed(true); } @@ -177,24 +174,6 @@ public class UIButton extends JButton implements UIObserver, UITextComponent { return this.border; } -// @Override -// public Insets getInsets() { -// if (getIcon() != null) { -// return new Insets(0, 3, 0, 3); -// } -// return new Insets(0, 10, 0, 10); -// } - - //@Override -// public Dimension getPreferredSize() { -// Dimension dim = super.getPreferredSize(); -// if (isFixedHeight() || dim.height < HEIGHT) { -// dim.height = HEIGHT; -// } -// return dim; -// } - - public int getBorderType() { return borderType; } @@ -324,15 +303,6 @@ public class UIButton extends JButton implements UIObserver, UITextComponent { this.isBorderPaintedOnlyWhenPressed = value; } -// private boolean isFixedHeight() { -// String text = this.getText(); -// if (StringUtils.isEmpty(text)) { -// return true; -// } -// // 如果允许换行,需要放开按钮高度的限制 -// return !text.startsWith(""); -// } - /** * 主函数 * @param args 入口参数 diff --git a/designer-base/src/main/java/com/fr/design/gui/ibutton/UIHeadGroup.java b/designer-base/src/main/java/com/fr/design/gui/ibutton/UIHeadGroup.java index b72bbf1dab..4fa5cc4eba 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ibutton/UIHeadGroup.java +++ b/designer-base/src/main/java/com/fr/design/gui/ibutton/UIHeadGroup.java @@ -30,7 +30,7 @@ import static com.formdev.flatlaf.FlatClientProperties.BUTTON_TYPE_TAB; */ public class UIHeadGroup extends Row { - private static final String uiClassID = "HeadGroupUI"; + private static final String UI_CLASS_ID = "HeadGroupUI"; private UIHeadGroupSingleSelectionModel model; private List btns; @@ -62,7 +62,7 @@ public class UIHeadGroup extends Row { * @see UIDefaults#getUI */ public String getUIClassID() { - return uiClassID; + return UI_CLASS_ID; } private void intiContent() {