本文整理汇总了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"));
}
示例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"));
}
示例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"));
}
示例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
}
示例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
}