mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
get rid of deprecated method implementations
This commit is contained in:
@@ -613,7 +613,7 @@ public class BreakpointTree extends CheckboxTree {
|
||||
}
|
||||
|
||||
private static class BreakpointTreeCellRenderer extends CheckboxTreeCellRenderer {
|
||||
public void customizeCellRenderer(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
|
||||
public void customizeRenderer(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
|
||||
// Fix GTK background
|
||||
if (UIUtil.isUnderGTKLookAndFeel()){
|
||||
final Color background = selected ? UIUtil.getTreeSelectionBackground() : UIUtil.getTreeTextBackground();
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public class DetectedFacetsTree extends CheckboxTreeBase {
|
||||
}
|
||||
|
||||
private static class FacetsCheckboxTreeCellRenderer extends CheckboxTreeCellRendererBase {
|
||||
public void customizeCellRenderer(final JTree tree,
|
||||
public void customizeRenderer(final JTree tree,
|
||||
final Object value,
|
||||
final boolean selected,
|
||||
final boolean expanded, final boolean leaf, final int row, final boolean hasFocus) {
|
||||
|
||||
+2
-1
@@ -128,13 +128,14 @@ public class DetectedSourceRootsDialog extends DialogWrapper {
|
||||
*/
|
||||
private CheckboxTree createCheckboxTree() {
|
||||
CheckboxTree tree = new CheckboxTree(new CheckboxTree.CheckboxTreeCellRenderer(true) {
|
||||
public void customizeCellRenderer(JTree tree,
|
||||
public void customizeRenderer(JTree tree,
|
||||
Object value,
|
||||
boolean selected,
|
||||
boolean expanded,
|
||||
boolean leaf,
|
||||
int row,
|
||||
boolean hasFocus) {
|
||||
if (!(value instanceof CheckedTreeNode)) return;
|
||||
CheckedTreeNode node = (CheckedTreeNode)value;
|
||||
VirtualFile file = (VirtualFile)node.getUserObject();
|
||||
String text;
|
||||
|
||||
+2
-1
@@ -66,7 +66,8 @@ public abstract class IntentionSettingsTree {
|
||||
|
||||
private void initTree() {
|
||||
myTree = new CheckboxTree(new CheckboxTree.CheckboxTreeCellRenderer(true) {
|
||||
public void customizeCellRenderer(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
|
||||
public void customizeRenderer(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
|
||||
if (!(value instanceof CheckedTreeNode)) return;
|
||||
CheckedTreeNode node = (CheckedTreeNode)value;
|
||||
SimpleTextAttributes attributes = node.getUserObject() instanceof IntentionActionMetaData ? SimpleTextAttributes.REGULAR_ATTRIBUTES : SimpleTextAttributes.REGULAR_BOLD_ATTRIBUTES;
|
||||
final String text = getNodeText(node);
|
||||
|
||||
+2
-2
@@ -632,14 +632,14 @@ class TemplateListPanel extends JPanel {
|
||||
myTreeRoot = new CheckedTreeNode(null);
|
||||
|
||||
myTree = new CheckboxTree(new CheckboxTree.CheckboxTreeCellRenderer(){
|
||||
public void customizeCellRenderer(final JTree tree,
|
||||
public void customizeRenderer(final JTree tree,
|
||||
Object value,
|
||||
final boolean selected,
|
||||
final boolean expanded,
|
||||
final boolean leaf,
|
||||
final int row,
|
||||
final boolean hasFocus) {
|
||||
|
||||
if (!(value instanceof DefaultMutableTreeNode)) return;
|
||||
value = ((DefaultMutableTreeNode)value).getUserObject();
|
||||
// Fix GTK background
|
||||
if (UIUtil.isUnderGTKLookAndFeel()){
|
||||
|
||||
+2
-2
@@ -36,14 +36,14 @@ import java.awt.*;
|
||||
abstract class InspectionsConfigTreeRenderer extends CheckboxTree.CheckboxTreeCellRenderer {
|
||||
protected abstract String getFilter();
|
||||
|
||||
public void customizeCellRenderer(final JTree tree,
|
||||
public void customizeRenderer(final JTree tree,
|
||||
final Object value,
|
||||
final boolean selected,
|
||||
final boolean expanded,
|
||||
final boolean leaf,
|
||||
final int row,
|
||||
final boolean hasFocus) {
|
||||
|
||||
if (!(value instanceof InspectionConfigTreeNode)) return;
|
||||
InspectionConfigTreeNode node = (InspectionConfigTreeNode)value;
|
||||
|
||||
Object object = node.getUserObject();
|
||||
|
||||
@@ -77,13 +77,14 @@ class ToolsPanel extends JPanel {
|
||||
|
||||
myTree = new CheckboxTree(
|
||||
new CheckboxTree.CheckboxTreeCellRenderer() {
|
||||
public void customizeCellRenderer(final JTree tree,
|
||||
public void customizeRenderer(final JTree tree,
|
||||
final Object value,
|
||||
final boolean selected,
|
||||
final boolean expanded,
|
||||
final boolean leaf,
|
||||
final int row,
|
||||
final boolean hasFocus) {
|
||||
if (!(value instanceof CheckedTreeNode)) return;
|
||||
Object object = ((CheckedTreeNode)value).getUserObject();
|
||||
// Fix GTK background
|
||||
if (UIUtil.isUnderGTKLookAndFeel()) {
|
||||
|
||||
@@ -413,10 +413,10 @@ public class CheckboxTreeBase extends Tree {
|
||||
}
|
||||
|
||||
public static class CheckPolicy {
|
||||
boolean checkChildrenWithCheckedParent;
|
||||
boolean uncheckChildrenWithUncheckedParent;
|
||||
boolean checkParentWithCheckedChild;
|
||||
boolean uncheckParentWithUncheckedChild;
|
||||
final boolean checkChildrenWithCheckedParent;
|
||||
final boolean uncheckChildrenWithUncheckedParent;
|
||||
final boolean checkParentWithCheckedChild;
|
||||
final boolean uncheckParentWithUncheckedChild;
|
||||
|
||||
public CheckPolicy(final boolean checkChildrenWithCheckedParent,
|
||||
final boolean uncheckChildrenWithUncheckedParent,
|
||||
|
||||
@@ -237,13 +237,14 @@ public class GitRefspecAddRefsDialog extends DialogWrapper {
|
||||
myTreeRoot = new CheckedTreeNode("");
|
||||
myReferenceChooser = new CheckboxTree(new CheckboxTree.CheckboxTreeCellRenderer() {
|
||||
|
||||
public void customizeCellRenderer(final JTree tree,
|
||||
public void customizeRenderer(final JTree tree,
|
||||
final Object value,
|
||||
final boolean selected,
|
||||
final boolean expanded,
|
||||
final boolean leaf,
|
||||
final int row,
|
||||
final boolean hasFocus) {
|
||||
if (!(value instanceof CheckedTreeNode)) return;
|
||||
// Fix GTK background
|
||||
if (UIUtil.isUnderGTKLookAndFeel()) {
|
||||
final Color background = selected ? UIUtil.getTreeSelectionBackground() : UIUtil.getTreeTextBackground();
|
||||
|
||||
Reference in New Issue
Block a user