Browse Source

REPORT-4634 组件叠加体验优化=>bug修改=>修复鼠标快速移出,缩略图未关闭的问题

master
plough 7 years ago
parent
commit
2b0ce23184
  1. 15
      designer_form/src/com/fr/design/mainframe/ComponentTree.java

15
designer_form/src/com/fr/design/mainframe/ComponentTree.java

@ -42,13 +42,19 @@ public class ComponentTree extends JTree {
this.setDropMode(DropMode.ON_OR_INSERT);
this.setTransferHandler(new TreeTransferHandler());
this.refreshTreeRoot();
addTreeSelectionListener(designer);
addMouseMotionListener(new ComponetTreeMouseListener(this));
initListeners();
setEditable(true);
setUI(uiTreeUI);
setBorder(BorderFactory.createEmptyBorder(PADDING_TOP, PADDING_LEFT, 0, 0));
}
private void initListeners() {
this.addTreeSelectionListener(designer);
ComponetTreeMouseListener componetTreeMouseListener = new ComponetTreeMouseListener(this);
this.addMouseMotionListener(componetTreeMouseListener);
this.addMouseListener(componetTreeMouseListener);
}
public FormDesigner getDesigner() {
return designer;
}
@ -276,6 +282,11 @@ public class ComponentTree extends JTree {
hidePreviewPane();
}
}
@Override
public void mouseExited(MouseEvent e) {
hidePreviewPane();
}
}
private class PopupPreviewPane extends JPopupMenu {

Loading…
Cancel
Save