mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-20 07:15:31 +00:00
8378204: Remove AppContext from two Swing UI classes
Reviewed-by: serb, kizune
This commit is contained in:
parent
82fe8b9cd0
commit
9b44ea39bf
@ -36,8 +36,6 @@ import javax.swing.UIManager;
|
||||
import javax.swing.plaf.ComponentUI;
|
||||
import javax.swing.plaf.basic.BasicRadioButtonUI;
|
||||
|
||||
import sun.awt.AppContext;
|
||||
|
||||
/**
|
||||
* RadioButtonUI implementation for MotifRadioButtonUI
|
||||
*
|
||||
@ -45,7 +43,7 @@ import sun.awt.AppContext;
|
||||
*/
|
||||
public class MotifRadioButtonUI extends BasicRadioButtonUI {
|
||||
|
||||
private static final Object MOTIF_RADIO_BUTTON_UI_KEY = new Object();
|
||||
private static final ComponentUI UI = new MotifRadioButtonUI();
|
||||
|
||||
protected Color focusColor;
|
||||
|
||||
@ -55,14 +53,7 @@ public class MotifRadioButtonUI extends BasicRadioButtonUI {
|
||||
// Create PLAF
|
||||
// ********************************
|
||||
public static ComponentUI createUI(JComponent c) {
|
||||
AppContext appContext = AppContext.getAppContext();
|
||||
MotifRadioButtonUI motifRadioButtonUI =
|
||||
(MotifRadioButtonUI) appContext.get(MOTIF_RADIO_BUTTON_UI_KEY);
|
||||
if (motifRadioButtonUI == null) {
|
||||
motifRadioButtonUI = new MotifRadioButtonUI();
|
||||
appContext.put(MOTIF_RADIO_BUTTON_UI_KEY, motifRadioButtonUI);
|
||||
}
|
||||
return motifRadioButtonUI;
|
||||
return UI;
|
||||
}
|
||||
|
||||
// ********************************
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2026, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -26,7 +26,6 @@
|
||||
package javax.swing.plaf.metal;
|
||||
|
||||
import sun.swing.SwingUtilities2;
|
||||
import sun.awt.AppContext;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.plaf.*;
|
||||
|
||||
@ -35,7 +35,6 @@ import java.awt.PopupMenu;
|
||||
import java.awt.Menu;
|
||||
import java.awt.MenuItem;
|
||||
import java.awt.Toolkit;
|
||||
import sun.awt.AppContext;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.InvocationEvent;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user