Merge in DESIGN/design from ~LEVY.XIE/design:newui to newui * commit '3a3147317653c21cc8be35c098750f9cf39cd7d9': REPORT-107972 设计器样式翻新 新增TreeUI、icon文件夹转移 REPORT-107972 设计器样式翻新 新增TreeUI、icon文件夹转移 REPORT-107972 设计器样式翻新 去除多余的icon REPORT-107972 设计器样式翻新 CheckBox翻新 REPORT-107972 设计器样式翻新 Tree翻新newui
@ -0,0 +1,32 @@ |
|||||||
|
package com.fr.design.gui.itree; |
||||||
|
|
||||||
|
import com.fine.theme.icon.LazyIcon; |
||||||
|
import com.formdev.flatlaf.ui.FlatTreeUI; |
||||||
|
|
||||||
|
import javax.swing.JComponent; |
||||||
|
import javax.swing.plaf.ComponentUI; |
||||||
|
|
||||||
|
/** |
||||||
|
* 主题化的TreeUI,继承自FlatTreeUI |
||||||
|
* |
||||||
|
* @author Levy.Xie |
||||||
|
* @since 11.0 |
||||||
|
* Created on 2023/11/29 |
||||||
|
*/ |
||||||
|
public class UIFlatTreeUI extends FlatTreeUI { |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建组件UI |
||||||
|
* @param x 组件 |
||||||
|
* @return 返回组件UI |
||||||
|
*/ |
||||||
|
public static ComponentUI createUI(JComponent x) { |
||||||
|
return new UIFlatTreeUI(); |
||||||
|
} |
||||||
|
|
||||||
|
protected void installDefaults() { |
||||||
|
super.installDefaults(); |
||||||
|
setExpandedIcon(new LazyIcon("minus")); |
||||||
|
setCollapsedIcon(new LazyIcon("plus")); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,30 @@ |
|||||||
|
package com.fr.design.gui.itree.filetree; |
||||||
|
|
||||||
|
import javax.swing.JTree; |
||||||
|
import javax.swing.UIManager; |
||||||
|
import javax.swing.BorderFactory; |
||||||
|
import javax.swing.tree.DefaultTreeCellRenderer; |
||||||
|
import java.awt.*; |
||||||
|
|
||||||
|
/** |
||||||
|
* Tree子节点的渲染器 |
||||||
|
* |
||||||
|
* @author Levy.Xie |
||||||
|
* @since 11.0 |
||||||
|
* Created on 2023/11/28 |
||||||
|
*/ |
||||||
|
public class FineTreeCellRender extends DefaultTreeCellRenderer { |
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L; |
||||||
|
|
||||||
|
@Override |
||||||
|
public Component getTreeCellRendererComponent(JTree tree, Object value, boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) { |
||||||
|
super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus); |
||||||
|
Insets margins = UIManager.getInsets("Tree.rendererMargins"); |
||||||
|
this.setBorder(BorderFactory.createEmptyBorder(margins.top, margins.left, |
||||||
|
margins.bottom, margins.right)); |
||||||
|
|
||||||
|
this.setIconTextGap(UIManager.getInt("Tree.iconTextGap")); |
||||||
|
return this; |
||||||
|
} |
||||||
|
} |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 938 B |
After Width: | Height: | Size: 531 B |
After Width: | Height: | Size: 586 B |
After Width: | Height: | Size: 532 B |
After Width: | Height: | Size: 580 B |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 566 B After Width: | Height: | Size: 566 B |
After Width: | Height: | Size: 689 B |
Before Width: | Height: | Size: 970 B After Width: | Height: | Size: 970 B |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 1022 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 425 B |
After Width: | Height: | Size: 838 B |
After Width: | Height: | Size: 907 B |
After Width: | Height: | Size: 414 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 918 B |
After Width: | Height: | Size: 989 B |
After Width: | Height: | Size: 990 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 905 B After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 1005 B |
Before Width: | Height: | Size: 908 B After Width: | Height: | Size: 908 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1014 B |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 938 B |
After Width: | Height: | Size: 531 B |
After Width: | Height: | Size: 586 B |
After Width: | Height: | Size: 532 B |
After Width: | Height: | Size: 580 B |
After Width: | Height: | Size: 543 B |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 953 B |
After Width: | Height: | Size: 680 B |
Before Width: | Height: | Size: 821 B After Width: | Height: | Size: 864 B |
After Width: | Height: | Size: 840 B |
After Width: | Height: | Size: 436 B |
After Width: | Height: | Size: 1009 B |
After Width: | Height: | Size: 758 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 761 B After Width: | Height: | Size: 804 B |
After Width: | Height: | Size: 660 B |
After Width: | Height: | Size: 951 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 592 B |