⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 svgexit.java

📁 完全基于java开发的svg矢量绘图工具
💻 JAVA
字号:
/* * Created on 24 mars 2004 * =============================================                   GNU LESSER GENERAL PUBLIC LICENSE Version 2.1 =============================================GLIPS Graffiti Editor, a SVG EditorCopyright (C) 2003 Jordi SUC, Philippe Gil, SARL ITRISThis library is free software; you can redistribute it and/ormodify it under the terms of the GNU Lesser General PublicLicense as published by the Free Software Foundation; eitherversion 2.1 of the License, or (at your option) any later version.This library is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNULesser General Public License for more details.You should have received a copy of the GNU Lesser General PublicLicense along with this library; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USAContact : jordi.suc@itris.fr; philippe.gil@itris.fr ============================================= */package fr.itris.glips.svgeditor.svgfile;import fr.itris.glips.svgeditor.*;import fr.itris.glips.svgeditor.resources.*;import javax.swing.*;import java.awt.event.*;import java.util.*;/** * @author Jordi SUC * the class that creates the static menu item exit in the menu bar */public class SVGExit extends SVGModuleAdapter{	/**	 * the id of the module	 */	final private String idexit="Exit";		/**	 * the labels	 */	private String labelexit="";	/**	 * the menuItems	 */	private JMenuItem exit;		/**	 * the editor 	 */	private SVGEditor editor;		/**	 * the constructor of the class	 * @param editor the editor	 */	public SVGExit(SVGEditor editor){		this.editor=editor;				//gets the labels from the resources		ResourceBundle bundle=SVGEditor.getBundle();				if(bundle!=null){		    			try{				labelexit=bundle.getString("labelexit");			}catch (Exception ex){}		}				//getting the icons		ImageIcon exitIcon=SVGResource.getIcon("Exit", false),						dexitIcon=SVGResource.getIcon("Exit", true);				//handling the menu item		exit=new JMenuItem(labelexit, exitIcon);		exit.setDisabledIcon(dexitIcon);		exit.setAccelerator(KeyStroke.getKeyStroke("ESCAPE"));					//adds a listener to the menu item		exit.addActionListener(			new ActionListener(){			    				public void actionPerformed(ActionEvent e){				    					getSVGEditor().exit();				}			}		);	}		/**	 * @return the editor	 */	public SVGEditor getSVGEditor(){		return editor;	}		/**	 * @return a map associating a menu item id to its menu item object	 */	public Hashtable getMenuItems(){				Hashtable menuItems=new Hashtable();		menuItems.put(idexit, exit);					return menuItems;	}		/**	 * @return a map associating a tool item id to its tool item object	 */	public Hashtable getToolItems(){				return null;	}		/**	 * Returns the collection of the popup items	 * @return the collection of the popup items	 */	public Collection getPopupItems(){				return null;	}		/**	 * gets the module's name	 * @return the module's name	 */	public String getName(){		return idexit;	}		/**	 * cancels all the actions that could be running	 */	public void cancelActions(){	}	/**	 * layout some elements in the module	 */	public void initialize(){			}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -