Package org.pushingpixels.flamingo.api.common.icon

Examples of org.pushingpixels.flamingo.api.common.icon.ImageWrapperResizableIcon


  public void addMenuItem(final String relativeKey, final JMenuItem item, final String key, final int position) {
    //RIBBONS - to set the right icon size
    if(item.getIcon() != null && item.getIcon() instanceof ImageIcon) {
      ImageIcon ico = (ImageIcon)item.getIcon();
      ImageWrapperResizableIcon newIco = ImageWrapperResizableIcon.getIcon(ico.getImage(), new Dimension(ico.getIconWidth(), ico.getIconHeight()));
      newIco.setPreferredSize(new Dimension(16, 16));
      newIco.addAsynchronousLoadListener(new AsynchronousLoadListener() {
        public void completed(boolean success) {
          item.repaint();
        }
      });
      item.setIcon(newIco);
View Full Code Here

TOP

Related Classes of org.pushingpixels.flamingo.api.common.icon.ImageWrapperResizableIcon

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.