本文整理汇总了Java中org.netbeans.modeler.resource.toolbar.ImageUtil类的典型用法代码示例。如果您正苦于以下问题:Java ImageUtil类的具体用法?Java ImageUtil怎么用?Java ImageUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ImageUtil类属于org.netbeans.modeler.resource.toolbar包,在下文中一共展示了ImageUtil类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initComponents
import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入依赖的package包/类
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
searchBox= new AutocompleteJComboBox<INodeWidget>(getTerms(),onSelection());
javax.swing.JComboBox jComboBox1 = searchBox;
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle(org.openide.util.NbBundle.getMessage(SearchDialog.class, "SearchDialog.title.text")); // NOI18N
setIconImage(ImageUtil.getInstance().getImage("search.png"));
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jComboBox1, 0, 379, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jComboBox1, javax.swing.GroupLayout.DEFAULT_SIZE, 27, Short.MAX_VALUE)
);
pack();
}
开发者ID:jeddict,项目名称:NBModeler,代码行数:30,代码来源:SearchDialog.java
示例2: getPopupMenuItemList
import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入依赖的package包/类
protected List<JMenuItem> getPopupMenuItemList() {
List<JMenuItem> menuItemList = new LinkedList<>();
JMenuItem delete = new JMenuItem("Delete");
delete.setIcon(ImageUtil.getInstance().getIcon("delete.png"));
delete.addActionListener((ActionEvent e) -> {
PNodeWidget.this.remove(true);
PNodeWidget.this.getModelerScene().getModelerPanelTopComponent().changePersistenceState(false);
});
menuItemList.add(delete);
menuItemList.add(null);
menuItemList.add(getCopyMenu());
menuItemList.add(getPasteMenu());
menuItemList.add(getPropertyMenu());
return menuItemList;
}
开发者ID:jeddict,项目名称:NBModeler,代码行数:18,代码来源:PNodeWidget.java
示例3: getPopupMenuItemList
import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入依赖的package包/类
@Override
protected List<JMenuItem> getPopupMenuItemList() {
List<JMenuItem> menuList = super.getPopupMenuItemList();
JMenuItem delete;
delete = new JMenuItem("Delete");
delete.setIcon(ImageUtil.getInstance().getIcon("delete.png"));
delete.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
AttributeWidget.this.remove(true);
}
});
menuList.add(0, delete);
return menuList;
}
开发者ID:foxerfly,项目名称:Netbeans-JPA-Modeler,代码行数:19,代码来源:AttributeWidget.java
示例4: getPropertyMenu
import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入依赖的package包/类
protected JMenuItem getPropertyMenu() {
JMenuItem baseProperty = new JMenuItem("Properties");
baseProperty.setIcon(ImageUtil.getInstance().getIcon("properties.gif"));
baseProperty.addActionListener((ActionEvent e) -> {
AbstractPModelerScene.this.showProperties();
});
return baseProperty;
}
开发者ID:jeddict,项目名称:NBModeler,代码行数:9,代码来源:AbstractPModelerScene.java
示例5: initCursor
import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入依赖的package包/类
private void initCursor() {
MOUSE_PRESSED = Utilities.createCustomCursor(scene.getView(),
ImageUtilities.icon2Image(ImageUtil.getInstance().getIcon("pan-closed-hand.gif")),
"PanClosedHand");
MOUSE_RELEASED = Utilities.createCustomCursor(scene.getView(),
ImageUtilities.icon2Image(ImageUtil.getInstance().getIcon("pan-open-hand.gif")),
"PanOpenedHand");
}
开发者ID:jeddict,项目名称:NBModeler,代码行数:9,代码来源:PanAction.java
示例6: 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
示例7: 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
示例8: 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
示例9: 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
示例10: 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
示例11: getMarqueeZoomCursor
import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入依赖的package包/类
private Cursor getMarqueeZoomCursor() {
if (zoomCursor == null) {
zoomCursor = Utilities.createCustomCursor(scene.getView(),
ImageUtilities.icon2Image(ImageUtil.getInstance().getIcon("marquee-zoom.gif")), "MarqueeZoom");
}
return zoomCursor;
}
开发者ID:jeddict,项目名称:NBModeler,代码行数:8,代码来源:ZoomManager.java
示例12: getMarqueeZoomStopCursor
import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入依赖的package包/类
private Cursor getMarqueeZoomStopCursor() {
if (zoomStopCursor == null) {
zoomStopCursor = Utilities.createCustomCursor(scene.getView(),
ImageUtilities.icon2Image(ImageUtil.getInstance().getIcon("marquee-zoom-stop.gif")), "MarqueeZoomStop");
}
return zoomStopCursor;
}
开发者ID:jeddict,项目名称:NBModeler,代码行数:8,代码来源:ZoomManager.java
示例13: ExportAction
import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入依赖的package包/类
public ExportAction(IModelerScene scene) {
this.scene = scene;
putValue(Action.SMALL_ICON, ImageUtil.getInstance().getIcon("export-as-image.png")); // NOI18N
putValue(Action.SHORT_DESCRIPTION,
NbBundle.getMessage(ExportAction.class, "LBL_ExportImageAction")); // NOI18N
putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke("ctrl shift X"));
}
开发者ID:jeddict,项目名称:NBModeler,代码行数:9,代码来源:ExportAction.java
示例14: getPropertyMenu
import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入依赖的package包/类
protected JMenuItem getPropertyMenu() {
JMenuItem baseProperty = new JMenuItem("Properties");
baseProperty.setIcon(ImageUtil.getInstance().getIcon("properties.gif"));
baseProperty.addActionListener((ActionEvent e) -> {
PinWidget.this.showProperties();
PinWidget.this.getModelerScene().getModelerPanelTopComponent().changePersistenceState(false);
});
return baseProperty;
}
开发者ID:jeddict,项目名称:NBModeler,代码行数:10,代码来源:PinWidget.java
示例15: getPropertyMenu
import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入依赖的package包/类
protected JMenuItem getPropertyMenu(){
JMenuItem baseProperty = new JMenuItem("Properties");
baseProperty.setIcon(ImageUtil.getInstance().getIcon("properties.gif"));
baseProperty.addActionListener((ActionEvent e) -> {
PNodeWidget.this.showProperties();
});
return baseProperty;
}
开发者ID:jeddict,项目名称:NBModeler,代码行数:9,代码来源:PNodeWidget.java
示例16: buildSaveDocTool
import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入依赖的package包/类
protected void buildSaveDocTool(JToolBar bar) {
JButton saveButton = new JButton(ImageUtil.getInstance().getIcon("save-doc.png"));
saveButton.setToolTipText("Save");
bar.add(saveButton);
saveButton.addActionListener((ActionEvent e) -> {
file.save();
});
}
开发者ID:jeddict,项目名称:NBModeler,代码行数:9,代码来源:ModelerDiagramEngine.java
示例17: buildReRouteTool
import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入依赖的package包/类
protected void buildReRouteTool(JToolBar bar) {
JButton reRouteButton = new JButton(ImageUtil.getInstance().getIcon("reroute.png"));
reRouteButton.setToolTipText("Re-Route");
bar.add(reRouteButton);
reRouteButton.addActionListener(e -> {
int option = JOptionPane.showConfirmDialog(WindowManager.getDefault().getMainWindow(), "Are you want to re-route the diagram ?", "Re-Route Diagram", JOptionPane.YES_NO_OPTION);
if (option == javax.swing.JOptionPane.OK_OPTION) {
file.getModelerScene().autoLayout();
file.getModelerPanelTopComponent().changePersistenceState(false);
}
});
}
开发者ID:jeddict,项目名称:NBModeler,代码行数:13,代码来源:ModelerDiagramEngine.java
示例18: buildSearchTool
import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入依赖的package包/类
protected void buildSearchTool(JToolBar bar) {
JButton reRouteButton = new JButton(ImageUtil.getInstance().getIcon("search.png"));
reRouteButton.setToolTipText("Search");
bar.add(reRouteButton);
reRouteButton.addActionListener(e -> {
searchWidget();
});
}
开发者ID:jeddict,项目名称:NBModeler,代码行数:9,代码来源:ModelerDiagramEngine.java
示例19: buildSatelliteTool
import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入依赖的package包/类
protected void buildSatelliteTool(JToolBar bar) {
JButton satelliteViewButton = new JButton(ImageUtil.getInstance().getIcon("satelliteView.png"));
bar.add(satelliteViewButton);
satelliteViewButton.addActionListener(e -> {
JPopupMenu popup = new JPopupMenu();
popup.setLayout(new BorderLayout());
JComponent satelliteView = file.getModelerScene().createSatelliteView();
popup.add(satelliteView, BorderLayout.CENTER);
popup.show(satelliteViewButton, (satelliteViewButton.getSize().width - satelliteView.getPreferredSize().width) / 2, satelliteViewButton.getSize().height);
});
}
开发者ID:jeddict,项目名称:NBModeler,代码行数:12,代码来源:ModelerDiagramEngine.java
示例20: getIcon
import org.netbeans.modeler.resource.toolbar.ImageUtil; //导入依赖的package包/类
@Override
public Image getIcon() {
return ImageUtil.getInstance().getImage(BPMNConversationFileDataObject.class,"conversation.png");
}
开发者ID:jGauravGupta,项目名称:jBPMNSuite,代码行数:5,代码来源:BPMNConversationFileDataObject.java
注:本文中的org.netbeans.modeler.resource.toolbar.ImageUtil类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论