Java Code Examples for sun.swing.SwingUtilities2#makeIcon()
The following examples show how to use
sun.swing.SwingUtilities2#makeIcon() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WindowsLookAndFeel.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
@Override public Object createValue(UIDefaults table) { if (icon == null) { Image image = (Image)ShellFolder.get(nativeImageName); if (image != null) { icon = new ImageIconUIResource(image); } } if (icon == null && fallbackName != null) { UIDefaults.LazyValue fallback = (UIDefaults.LazyValue) SwingUtilities2.makeIcon(WindowsLookAndFeel.class, BasicLookAndFeel.class, fallbackName); icon = (Icon) fallback.createValue(table); } return icon; }
Example 2
Source File: WindowsLookAndFeel.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
public Object createValue(UIDefaults table) { if (nativeImage != null) { Image image = (Image)ShellFolder.get(nativeImage); if (image != null) { return new ImageIcon(image); } } return SwingUtilities2.makeIcon(getClass(), WindowsLookAndFeel.class, resource); }
Example 3
Source File: WindowsLookAndFeel.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public Object createValue(UIDefaults table) { if (nativeImage != null) { Image image = (Image)ShellFolder.get(nativeImage); if (image != null) { return new ImageIcon(image); } } return SwingUtilities2.makeIcon(getClass(), WindowsLookAndFeel.class, resource); }
Example 4
Source File: WindowsLookAndFeel.java From hottub with GNU General Public License v2.0 | 5 votes |
public Object createValue(UIDefaults table) { if (nativeImage != null) { Image image = (Image)ShellFolder.get(nativeImage); if (image != null) { return new ImageIcon(image); } } return SwingUtilities2.makeIcon(getClass(), WindowsLookAndFeel.class, resource); }
Example 5
Source File: WindowsLookAndFeel.java From jdk1.8-source-analysis with Apache License 2.0 | 5 votes |
public Object createValue(UIDefaults table) { if (nativeImage != null) { Image image = (Image)ShellFolder.get(nativeImage); if (image != null) { return new ImageIcon(image); } } return SwingUtilities2.makeIcon(getClass(), WindowsLookAndFeel.class, resource); }
Example 6
Source File: WindowsLookAndFeel.java From JDKSourceCode1.8 with MIT License | 5 votes |
public Object createValue(UIDefaults table) { if (nativeImage != null) { Image image = (Image)ShellFolder.get(nativeImage); if (image != null) { return new ImageIcon(image); } } return SwingUtilities2.makeIcon(getClass(), WindowsLookAndFeel.class, resource); }
Example 7
Source File: WindowsLookAndFeel.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public Object createValue(UIDefaults table) { if (nativeImage != null) { Image image = (Image)ShellFolder.get(nativeImage); if (image != null) { return new ImageIcon(image); } } return SwingUtilities2.makeIcon(getClass(), WindowsLookAndFeel.class, resource); }
Example 8
Source File: WindowsLookAndFeel.java From openjdk-jdk8u with GNU General Public License v2.0 | 5 votes |
public Object createValue(UIDefaults table) { if (nativeImage != null) { Image image = (Image)ShellFolder.get(nativeImage); if (image != null) { return new ImageIcon(image); } } return SwingUtilities2.makeIcon(getClass(), WindowsLookAndFeel.class, resource); }
Example 9
Source File: OceanTheme.java From jdk8u-jdk with GNU General Public License v2.0 | 4 votes |
private Object getIconResource(String iconID) { return SwingUtilities2.makeIcon(getClass(), OceanTheme.class, iconID); }
Example 10
Source File: OceanTheme.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
private Object getIconResource(String iconID) { return SwingUtilities2.makeIcon(getClass(), OceanTheme.class, iconID); }
Example 11
Source File: OceanTheme.java From jdk8u_jdk with GNU General Public License v2.0 | 4 votes |
private Object getIconResource(String iconID) { return SwingUtilities2.makeIcon(getClass(), OceanTheme.class, iconID); }
Example 12
Source File: OceanTheme.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
private Object getIconResource(String iconID) { return SwingUtilities2.makeIcon(getClass(), OceanTheme.class, iconID); }
Example 13
Source File: OceanTheme.java From Java8CN with Apache License 2.0 | 4 votes |
private Object getIconResource(String iconID) { return SwingUtilities2.makeIcon(getClass(), OceanTheme.class, iconID); }
Example 14
Source File: OceanTheme.java From hottub with GNU General Public License v2.0 | 4 votes |
private Object getIconResource(String iconID) { return SwingUtilities2.makeIcon(getClass(), OceanTheme.class, iconID); }
Example 15
Source File: LookAndFeel.java From jdk8u60 with GNU General Public License v2.0 | 2 votes |
/** * Creates and returns a {@code UIDefault.LazyValue} that loads an * image. The returned value is an implementation of {@code * UIDefaults.LazyValue}. When {@code createValue} is invoked on * the returned object, the image is loaded. If the image is {@code * non-null}, it is then wrapped in an {@code Icon} that implements {@code * UIResource}. The image is loaded using {@code * Class.getResourceAsStream(gifFile)}. * <p> * This method does not check the arguments in any way. It is * strongly recommended that {@code non-null} values are supplied else * exceptions may occur when {@code createValue} is invoked on the * returned object. * * @param baseClass {@code Class} used to load the resource * @param gifFile path to the image to load * @return a {@code UIDefaults.LazyValue}; when resolved the * {@code LazyValue} loads the specified image * @see UIDefaults.LazyValue * @see Icon * @see Class#getResourceAsStream(String) */ public static Object makeIcon(final Class<?> baseClass, final String gifFile) { return SwingUtilities2.makeIcon(baseClass, baseClass, gifFile); }
Example 16
Source File: LookAndFeel.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 2 votes |
/** * Creates and returns a {@code UIDefault.LazyValue} that loads an * image. The returned value is an implementation of {@code * UIDefaults.LazyValue}. When {@code createValue} is invoked on * the returned object, the image is loaded. If the image is {@code * non-null}, it is then wrapped in an {@code Icon} that implements {@code * UIResource}. The image is loaded using {@code * Class.getResourceAsStream(gifFile)}. * <p> * This method does not check the arguments in any way. It is * strongly recommended that {@code non-null} values are supplied else * exceptions may occur when {@code createValue} is invoked on the * returned object. * * @param baseClass {@code Class} used to load the resource * @param gifFile path to the image to load * @return a {@code UIDefaults.LazyValue}; when resolved the * {@code LazyValue} loads the specified image * @see UIDefaults.LazyValue * @see Icon * @see Class#getResourceAsStream(String) */ public static Object makeIcon(final Class<?> baseClass, final String gifFile) { return SwingUtilities2.makeIcon(baseClass, baseClass, gifFile); }
Example 17
Source File: LookAndFeel.java From Java8CN with Apache License 2.0 | 2 votes |
/** * Creates and returns a {@code UIDefault.LazyValue} that loads an * image. The returned value is an implementation of {@code * UIDefaults.LazyValue}. When {@code createValue} is invoked on * the returned object, the image is loaded. If the image is {@code * non-null}, it is then wrapped in an {@code Icon} that implements {@code * UIResource}. The image is loaded using {@code * Class.getResourceAsStream(gifFile)}. * <p> * This method does not check the arguments in any way. It is * strongly recommended that {@code non-null} values are supplied else * exceptions may occur when {@code createValue} is invoked on the * returned object. * * @param baseClass {@code Class} used to load the resource * @param gifFile path to the image to load * @return a {@code UIDefaults.LazyValue}; when resolved the * {@code LazyValue} loads the specified image * @see UIDefaults.LazyValue * @see Icon * @see Class#getResourceAsStream(String) */ public static Object makeIcon(final Class<?> baseClass, final String gifFile) { return SwingUtilities2.makeIcon(baseClass, baseClass, gifFile); }
Example 18
Source File: LookAndFeel.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 2 votes |
/** * Creates and returns a {@code UIDefault.LazyValue} that loads an * image. The returned value is an implementation of {@code * UIDefaults.LazyValue}. When {@code createValue} is invoked on * the returned object, the image is loaded. If the image is {@code * non-null}, it is then wrapped in an {@code Icon} that implements {@code * UIResource}. The image is loaded using {@code * Class.getResourceAsStream(gifFile)}. * <p> * This method does not check the arguments in any way. It is * strongly recommended that {@code non-null} values are supplied else * exceptions may occur when {@code createValue} is invoked on the * returned object. * * @param baseClass {@code Class} used to load the resource * @param gifFile path to the image to load * @return a {@code UIDefaults.LazyValue}; when resolved the * {@code LazyValue} loads the specified image * @see UIDefaults.LazyValue * @see Icon * @see Class#getResourceAsStream(String) */ public static Object makeIcon(final Class<?> baseClass, final String gifFile) { return SwingUtilities2.makeIcon(baseClass, baseClass, gifFile); }
Example 19
Source File: LookAndFeel.java From jdk8u-jdk with GNU General Public License v2.0 | 2 votes |
/** * Creates and returns a {@code UIDefault.LazyValue} that loads an * image. The returned value is an implementation of {@code * UIDefaults.LazyValue}. When {@code createValue} is invoked on * the returned object, the image is loaded. If the image is {@code * non-null}, it is then wrapped in an {@code Icon} that implements {@code * UIResource}. The image is loaded using {@code * Class.getResourceAsStream(gifFile)}. * <p> * This method does not check the arguments in any way. It is * strongly recommended that {@code non-null} values are supplied else * exceptions may occur when {@code createValue} is invoked on the * returned object. * * @param baseClass {@code Class} used to load the resource * @param gifFile path to the image to load * @return a {@code UIDefaults.LazyValue}; when resolved the * {@code LazyValue} loads the specified image * @see UIDefaults.LazyValue * @see Icon * @see Class#getResourceAsStream(String) */ public static Object makeIcon(final Class<?> baseClass, final String gifFile) { return SwingUtilities2.makeIcon(baseClass, baseClass, gifFile); }
Example 20
Source File: LookAndFeel.java From jdk1.8-source-analysis with Apache License 2.0 | 2 votes |
/** * Creates and returns a {@code UIDefault.LazyValue} that loads an * image. The returned value is an implementation of {@code * UIDefaults.LazyValue}. When {@code createValue} is invoked on * the returned object, the image is loaded. If the image is {@code * non-null}, it is then wrapped in an {@code Icon} that implements {@code * UIResource}. The image is loaded using {@code * Class.getResourceAsStream(gifFile)}. * <p> * This method does not check the arguments in any way. It is * strongly recommended that {@code non-null} values are supplied else * exceptions may occur when {@code createValue} is invoked on the * returned object. * * @param baseClass {@code Class} used to load the resource * @param gifFile path to the image to load * @return a {@code UIDefaults.LazyValue}; when resolved the * {@code LazyValue} loads the specified image * @see UIDefaults.LazyValue * @see Icon * @see Class#getResourceAsStream(String) */ public static Object makeIcon(final Class<?> baseClass, final String gifFile) { return SwingUtilities2.makeIcon(baseClass, baseClass, gifFile); }