TreePath bound shouldn't be changed. Roll back last two changes

This commit is contained in:
Konstantin Bulenkov
2013-09-01 05:02:56 +02:00
parent abe39e9f53
commit ec36ca85a5
@@ -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<Integer> myWideSelectionCondition;
private boolean myWideSelection;
private boolean myOldRepaintAllRowValue;
@@ -58,7 +58,7 @@ public class WideSelectionTreeUI extends BasicTreeUI {
/**
* Creates new <code>WideSelectionTreeUI</code> 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();