mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[push] More correct names
RepositoryWithBranchPanel is not a renderer, but an editor. At least, remove "implements" and rename the method.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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<T extends PushTarget> extends NonOpaquePanel implements TreeCellRenderer {
|
||||
public class RepositoryWithBranchPanel<T extends PushTarget> extends NonOpaquePanel {
|
||||
|
||||
private final JBCheckBox myRepositoryCheckbox;
|
||||
private final PushTargetPanel<T> myDestPushTargetPanelComponent;
|
||||
@@ -112,14 +111,14 @@ public class RepositoryWithBranchPanel<T extends PushTarget> 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)) {
|
||||
|
||||
Reference in New Issue
Block a user