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

📄 arcpathpointhandler.java

📁 Petri网分析工具PIPE is open-source
💻 JAVA
字号:
//######################################################################################/* * Created on 28-Feb-2004 * Author is Michael Camacho * *///######################################################################################package pipe.gui;import java.awt.Container;import java.awt.event.MouseEvent;import javax.swing.JMenuItem;import javax.swing.JPopupMenu;import pipe.dataLayer.ArcPathPoint;public class ArcPathPointHandler extends PetriNetObjectHandler {	public ArcPathPointHandler(Container contentpane, ArcPathPoint obj) {		super(contentpane, obj);		enablePopup = true;	}			/** Creates the popup menu that the user will see when they right click on a component */		public JPopupMenu getPopup(MouseEvent e)		{      JPopupMenu popup;            if(((ArcPathPoint)myObject).isDeleteable()) popup = super.getPopup(e);      else popup = new JPopupMenu();      if(((ArcPathPoint)myObject).getIndex()==0) return null;      else {  	  	JMenuItem menuItem = new JMenuItem(new ToggleArcPointAction((ArcPathPoint)myObject));  	  	if (((ArcPathPoint)myObject).getPointType() == ArcPathPoint.STRAIGHT)  	  		menuItem.setText("Change to Curved");  	  	else  	  		menuItem.setText("Change to Straight");  	  	popup.add(menuItem);      }			return popup;		}	public void mousePressed(MouseEvent e)	{		if (myObject.isEnabled())		{			((ArcPathPoint)e.getComponent()).setVisibilityLock(true);			super.mousePressed(e);		}	}	public void mouseDragged(MouseEvent e) {		super.mouseDragged(e);		}  public void mouseReleased(MouseEvent e) {		((ArcPathPoint)e.getComponent()).setVisibilityLock(false);		super.mouseReleased(e);	}}

⌨️ 快捷键说明

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