当前位置: 首页>>代码示例>>Java>>正文


Java ImageUtil.getIcon方法代码示例

本文整理汇总了Java中org.netbeans.modeler.resource.toolbar.ImageUtil.getIcon方法的典型用法代码示例。如果您正苦于以下问题:Java ImageUtil.getIcon方法的具体用法?Java ImageUtil.getIcon怎么用?Java ImageUtil.getIcon使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.netbeans.modeler.resource.toolbar.ImageUtil的用法示例。


在下文中一共展示了ImageUtil.getIcon方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: FitDiagramAction

import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入方法依赖的package包/类
/**
 * Creates a new instance of FitDiagramAction.
 *
 * @param manager the zoom manager.
 */
public FitDiagramAction(ZoomManager manager) {
    this.manager = manager;

    ImageUtil util = ImageUtil.getInstance();
    Icon img = util.getIcon("fit-to-window.png");
    if (img != null) {
        putValue(Action.SMALL_ICON, img);
    }
    String desc = NbBundle.getMessage(FitDiagramAction.class, "LBL_FitDiagramAction");
    putValue(Action.NAME, desc); // for accessibility
    putValue(Action.SHORT_DESCRIPTION, desc);

    putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke("ctrl shift F"));
}
 
开发者ID:jeddict,项目名称:NBModeler,代码行数:20,代码来源:ZoomManager.java

示例2: FitWidthAction

import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入方法依赖的package包/类
/**
 * Creates a new instance of FitWidthAction.
 *
 * @param manager the zoom manager.
 */
public FitWidthAction(ZoomManager manager) {
    this.manager = manager;
    ImageUtil util = ImageUtil.getInstance();
    Icon img = util.getIcon("fit-width.png");
    if (img != null) {
        putValue(Action.SMALL_ICON, img);
    }
    String desc = NbBundle.getMessage(FitWidthAction.class, "LBL_FitWidthAction");
    putValue(Action.NAME, desc); // for accessibility
    putValue(Action.SHORT_DESCRIPTION, desc);
    putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke("ctrl shift L"));
}
 
开发者ID:jeddict,项目名称:NBModeler,代码行数:18,代码来源:ZoomManager.java

示例3: ZoomDefaultAction

import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入方法依赖的package包/类
/**
 * Creates a new instance of ZoomDefaultAction.
 *
 * @param manager the zoom manager.
 */
public ZoomDefaultAction(ZoomManager manager) {
    this.manager = manager;
    ImageUtil util = ImageUtil.getInstance();
    Icon img = util.getIcon("normal-size.png");
    if (img != null) {
        putValue(Action.SMALL_ICON, img);
    }
    String desc = NbBundle.getMessage(ZoomDefaultAction.class, "LBL_ZoomDefaultAction");
    putValue(Action.NAME, desc); // for accessibility
    putValue(Action.SHORT_DESCRIPTION, desc);
    putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke("ctrl shift D"));
}
 
开发者ID:jeddict,项目名称:NBModeler,代码行数:18,代码来源:ZoomManager.java

示例4: ZoomInAction

import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入方法依赖的package包/类
/**
         * Creates a new instance of ZoomInAction.
         *
         * @param manager the zoom manager.
         */
        public ZoomInAction(ZoomManager manager) {
            this.manager = manager;
            ImageUtil util = ImageUtil.getInstance();
            Icon img = util.getIcon("zoom-in.png");
            if (img != null) {
                putValue(Action.SMALL_ICON, img);
            }
            String desc = NbBundle.getMessage(ZoomInAction.class, "LBL_ZoomInAction");
            putValue(Action.NAME, desc); // for accessibility
            putValue(Action.SHORT_DESCRIPTION, desc);

//            KeyStroke keystroke = KeyStroke.getKeyStroke(KeyEvent.VK_PLUS,
//                    KeyEvent.CTRL_MASK);
//            KeyStroke macStroke = KeyStroke.getKeyStroke(KeyEvent.VK_PLUS,
//                    KeyEvent.META_MASK);
//
//            KeyStroke[] additionalKeystrokes = {
//                //KeyStroke.getKeyStroke(KeyEvent.VK_EQUALS, KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK),
//                KeyStroke.getKeyStroke(KeyEvent.VK_EQUALS, KeyEvent.CTRL_MASK),
//                KeyStroke.getKeyStroke(KeyEvent.VK_ADD, KeyEvent.CTRL_MASK)
//            };
//
//            KeyStroke[] additionalMacKeystrokes = {
//                //KeyStroke.getKeyStroke(KeyEvent.VK_EQUALS, KeyEvent.META_MASK|KeyEvent.SHIFT_MASK),
//                KeyStroke.getKeyStroke(KeyEvent.VK_EQUALS, KeyEvent.META_MASK),
//                KeyStroke.getKeyStroke(KeyEvent.VK_ADD, KeyEvent.CTRL_MASK)
//            };
//
//            putValue(Action.ACCELERATOR_KEY, keystroke);
//            putValue(DiagramInputkeyMapper.MAC_ACCELERATOR, macStroke);
//            putValue(DiagramInputkeyMapper.ADDITIONAL_ACCELERATORS, additionalKeystrokes);
//            putValue(DiagramInputkeyMapper.ADDITIONAL_MAC_ACCELERATORS, additionalMacKeystrokes);gg2
        }
 
开发者ID:jeddict,项目名称:NBModeler,代码行数:39,代码来源:ZoomManager.java

示例5: ZoomOutAction

import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入方法依赖的package包/类
/**
         * Creates a new instance of ZoomOutAction.
         *
         * @param manager the zoom manager.
         */
        public ZoomOutAction(ZoomManager manager) {
            this.manager = manager;
            ImageUtil util = ImageUtil.getInstance();
            Icon img = util.getIcon("zoom-out.png");
            if (img != null) {
                putValue(Action.SMALL_ICON, img);
            }
            String desc = NbBundle.getMessage(ZoomOutAction.class, "LBL_ZoomOutAction");
            putValue(Action.NAME, desc); // for accessibility
            putValue(Action.SHORT_DESCRIPTION, desc);

//            KeyStroke keystroke = KeyStroke.getKeyStroke(KeyEvent.VK_MINUS,
//                    KeyEvent.CTRL_MASK);
//            KeyStroke macStroke = KeyStroke.getKeyStroke(KeyEvent.VK_MINUS,
//                    KeyEvent.META_MASK);
//
//            KeyStroke[] additionalKeystrokes = {
//                //KeyStroke.getKeyStroke(KeyEvent.VK_MINUS, KeyEvent.CTRL_MASK|KeyEvent.SHIFT_MASK),
//                KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, KeyEvent.CTRL_MASK)
//            };
//
//            KeyStroke[] additionalMacKeystrokes = {
//                //KeyStroke.getKeyStroke(KeyEvent.VK_MINUS, KeyEvent.META_MASK|KeyEvent.SHIFT_MASK),
//                KeyStroke.getKeyStroke(KeyEvent.VK_SUBTRACT, KeyEvent.META_MASK)
//            };
//
//            putValue(Action.ACCELERATOR_KEY, keystroke);
//            putValue(DiagramInputkeyMapper.MAC_ACCELERATOR, macStroke);
//            putValue(DiagramInputkeyMapper.ADDITIONAL_ACCELERATORS, additionalKeystrokes);
//            putValue(DiagramInputkeyMapper.ADDITIONAL_MAC_ACCELERATORS, additionalMacKeystrokes);gg2
        }
 
开发者ID:jeddict,项目名称:NBModeler,代码行数:37,代码来源:ZoomManager.java


注:本文中的org.netbeans.modeler.resource.toolbar.ImageUtil.getIcon方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。