Browse Source

REPORT-36985 删除无用依赖,格式化

research/11.0
Yuan.Wang 4 years ago
parent
commit
add6877895
  1. 10
      designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java
  2. 2
      designer-form/src/main/java/com/fr/design/mainframe/FormHierarchyTreePane.java

10
designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java

@ -30,7 +30,12 @@ import com.fr.stable.StableUtils;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
import com.fr.third.javax.annotation.Nullable; import com.fr.third.javax.annotation.Nullable;
import javax.swing.*; import javax.swing.BorderFactory;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.border.Border; import javax.swing.border.Border;
import java.awt.BorderLayout; import java.awt.BorderLayout;
import java.awt.Color; import java.awt.Color;
@ -815,8 +820,7 @@ public abstract class XCreator extends JPanel implements XComponent, XCreatorToo
return new BasicTopXCreator(this) { return new BasicTopXCreator(this) {
@Override @Override
protected void addComponent() { protected void addComponent() {
BufferedImage image = getImage(); Icon icon = new ImageIcon(getImage());
Icon icon = new ImageIcon(image);
JLabel jLabel = new JLabel(icon, JLabel.CENTER); JLabel jLabel = new JLabel(icon, JLabel.CENTER);
jLabel.setSize(getSize()); jLabel.setSize(getSize());
this.add(jLabel); this.add(jLabel);

2
designer-form/src/main/java/com/fr/design/mainframe/FormHierarchyTreePane.java

@ -94,7 +94,7 @@ public class FormHierarchyTreePane extends FormDockView implements HierarchyTree
//TODO 太乱了,需要重写,监听器里加了监听器是什么意思,每次调用该方法都会添加一个新的监听器 //TODO 太乱了,需要重写,监听器里加了监听器是什么意思,每次调用该方法都会添加一个新的监听器
public void refreshDockingView() { public void refreshDockingView() {
FormDesigner formDesigner = this.getEditingFormDesigner(); FormDesigner formDesigner = this.getEditingFormDesigner();
List<TreePath>list=new ArrayList<>(); List<TreePath> list = new ArrayList<>();
removeAll(); removeAll();
if (this.componentTree != null) { if (this.componentTree != null) {
componentTree.getExpandNodes(list); componentTree.getExpandNodes(list);

Loading…
Cancel
Save