|
|
@ -408,6 +408,9 @@ public class ComponentTree extends JTree { |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void mouseReleased(MouseEvent e) { |
|
|
|
public void mouseReleased(MouseEvent e) { |
|
|
|
|
|
|
|
if (e.isControlDown() || e.isShiftDown()) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
if (e.getButton() == MouseEvent.BUTTON1 && selectedCreator != null) { |
|
|
|
if (e.getButton() == MouseEvent.BUTTON1 && selectedCreator != null) { |
|
|
|
showSelectedPopup(selectedCreator); |
|
|
|
showSelectedPopup(selectedCreator); |
|
|
|
} |
|
|
|
} |
|
|
@ -426,6 +429,9 @@ public class ComponentTree extends JTree { |
|
|
|
* @param consumer |
|
|
|
* @param consumer |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void onMouseEvent(final MouseEvent e, Consumer<XCreator> consumer) { |
|
|
|
private void onMouseEvent(final MouseEvent e, Consumer<XCreator> consumer) { |
|
|
|
|
|
|
|
if (e.isControlDown() || e.isShiftDown()) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
Point p = e.getPoint(); |
|
|
|
Point p = e.getPoint(); |
|
|
|
// 解析组件树路径 获取选中的组件
|
|
|
|
// 解析组件树路径 获取选中的组件
|
|
|
|
int selRow = tree.getRowForLocation(p.x, p.y); |
|
|
|
int selRow = tree.getRowForLocation(p.x, p.y); |
|
|
|