wow, the 1x and 2x icons are gone?

This commit is contained in:
Ben Fry
2022-05-01 19:09:32 -04:00
parent 7b16619158
commit 809c9827d1
+22 -24
View File
@@ -58,9 +58,7 @@ import java.util.Locale;
import java.util.regex.Pattern;
import javax.swing.Action;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBoxMenuItem;
import javax.swing.JComponent;
import javax.swing.JMenu;
@@ -622,28 +620,28 @@ public class Toolkit {
}
/**
* Create a JButton with an icon, and set its disabled and pressed images
* to be the same image, so that 2x versions of the icon work properly.
*/
static public JButton createIconButton(String title, String base) {
ImageIcon icon = Toolkit.getLibIconX(base);
return createIconButton(title, icon);
}
/** Same as above, but with no text title (follows JButton constructor) */
static public JButton createIconButton(String base) {
return createIconButton(null, base);
}
static public JButton createIconButton(String title, Icon icon) {
JButton button = new JButton(title, icon);
button.setDisabledIcon(icon);
button.setPressedIcon(icon);
return button;
}
// /**
// * Create a JButton with an icon, and set its disabled and pressed images
// * to be the same image, so that 2x versions of the icon work properly.
// */
// static public JButton createIconButton(String title, String base) {
// ImageIcon icon = Toolkit.getLibIconX(base);
// return createIconButton(title, icon);
// }
//
//
// /** Same as above, but with no text title (follows JButton constructor) */
// static public JButton createIconButton(String base) {
// return createIconButton(null, base);
// }
//
//
// static public JButton createIconButton(String title, Icon icon) {
// JButton button = new JButton(title, icon);
// button.setDisabledIcon(icon);
// button.setPressedIcon(icon);
// return button;
// }
// . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .