From ec36ca85a5850457edb1a84166ad04fe3aefec50 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Sun, 1 Sep 2013 05:02:56 +0200 Subject: [PATCH] TreePath bound shouldn't be changed. Roll back last two changes --- .../util/ui/tree/WideSelectionTreeUI.java | 21 +++---------------- 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/platform/util/src/com/intellij/util/ui/tree/WideSelectionTreeUI.java b/platform/util/src/com/intellij/util/ui/tree/WideSelectionTreeUI.java index 1a31ab8f41ac..bdd97246c15b 100644 --- a/platform/util/src/com/intellij/util/ui/tree/WideSelectionTreeUI.java +++ b/platform/util/src/com/intellij/util/ui/tree/WideSelectionTreeUI.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2012 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,7 +44,7 @@ public class WideSelectionTreeUI extends BasicTreeUI { private static final Border LIST_BACKGROUND_PAINTER = UIManager.getBorder("List.sourceListBackgroundPainter"); private static final Border LIST_SELECTION_BACKGROUND_PAINTER = UIManager.getBorder("List.sourceListSelectionBackgroundPainter"); private static final Border LIST_FOCUSED_SELECTION_BACKGROUND_PAINTER = UIManager.getBorder("List.sourceListFocusedSelectionBackgroundPainter"); - + @NotNull private final Condition myWideSelectionCondition; private boolean myWideSelection; private boolean myOldRepaintAllRowValue; @@ -58,7 +58,7 @@ public class WideSelectionTreeUI extends BasicTreeUI { /** * Creates new WideSelectionTreeUI object. - * + * * @param wideSelection flag that determines if wide selection should be used * @param wideSelectionCondition strategy that determine if wide selection should be used for a target row (it's zero-based index * is given to the condition as an argument) @@ -69,11 +69,6 @@ public class WideSelectionTreeUI extends BasicTreeUI { } private final MouseListener mySelectionListener = new MouseAdapter() { - @Override - public void mouseReleased(MouseEvent e) { - mousePressed(e); - } - @Override public void mousePressed(@NotNull final MouseEvent e) { final JTree tree = (JTree)e.getSource(); @@ -103,16 +98,6 @@ public class WideSelectionTreeUI extends BasicTreeUI { } }; - @Override - public Rectangle getPathBounds(JTree tree, TreePath path) { - Rectangle bounds = super.getPathBounds(tree, path); - if (bounds != null && tree != null) { - bounds.x = 0; - bounds.width = tree.getWidth(); - } - return bounds; - } - @Override protected void completeUIInstall() { super.completeUIInstall();