From 18a0d1dd30d71f7562396ccb2b9cc086b9751006 Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Thu, 25 Sep 2014 18:44:25 +0400 Subject: [PATCH] [push] More correct names RepositoryWithBranchPanel is not a renderer, but an editor. At least, remove "implements" and rename the method. --- .../com/intellij/dvcs/push/ui/PushLog.java | 2 +- .../push/ui/RepositoryWithBranchPanel.java | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/PushLog.java b/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/PushLog.java index 0f9432d1e2a7..a7cdd0c34d1d 100644 --- a/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/PushLog.java +++ b/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/PushLog.java @@ -270,7 +270,7 @@ public class PushLog extends JPanel implements TypeSafeDataProvider { public Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row) { RepositoryWithBranchPanel panel = (RepositoryWithBranchPanel)((DefaultMutableTreeNode)value).getUserObject(); myValue = panel; - return panel.getTreeCellRendererComponent(tree, value, isSelected, expanded, leaf, row, true); + return panel.getTreeCellEditorComponent(tree, value, isSelected, expanded, leaf, row, true); } @Override diff --git a/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/RepositoryWithBranchPanel.java b/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/RepositoryWithBranchPanel.java index d9587e420f2d..cdff2f34b0a5 100644 --- a/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/RepositoryWithBranchPanel.java +++ b/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/RepositoryWithBranchPanel.java @@ -31,13 +31,12 @@ import com.intellij.util.containers.ContainerUtil; import org.jetbrains.annotations.NotNull; import javax.swing.*; -import javax.swing.tree.TreeCellRenderer; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.List; -public class RepositoryWithBranchPanel extends NonOpaquePanel implements TreeCellRenderer { +public class RepositoryWithBranchPanel extends NonOpaquePanel { private final JBCheckBox myRepositoryCheckbox; private final PushTargetPanel myDestPushTargetPanelComponent; @@ -112,14 +111,14 @@ public class RepositoryWithBranchPanel extends NonOpaquePa return myArrowLabel.getText(); } - @Override - public Component getTreeCellRendererComponent(JTree tree, - Object value, - boolean selected, - boolean expanded, - boolean leaf, - int row, - boolean hasFocus) { + @NotNull + public Component getTreeCellEditorComponent(JTree tree, + Object value, + boolean selected, + boolean expanded, + boolean leaf, + int row, + boolean hasFocus) { Rectangle bounds = tree.getPathBounds(tree.getPathForRow(row)); invalidate(); if (!(value instanceof SingleRepositoryNode)) {