@ -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.7 KiB |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1022 B |
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 395 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 548 B After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 425 B |
Before Width: | Height: | Size: 292 B After Width: | Height: | Size: 414 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 838 B |
After Width: | Height: | Size: 907 B |
Before Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 918 B |
After Width: | Height: | Size: 989 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 990 B |
After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 774 B |