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

📄 cellmousecontrol.java

📁 定要上载质量高而定要上载质量高而定要上载质量高而定要上载质量高而定要上定要上载质量高而定要上载质量高而载质量高而
💻 JAVA
字号:
package net.sf.fjreport.cell;

import java.awt.event.MouseEvent;
import java.util.Iterator;

import net.sf.fjreport.FJReport;
import net.sf.fjreport.control.BaseControl;

public class CellMouseControl extends BaseControl{

	private FJReport report;
	
	public CellMouseControl(FJReport report) {
		this.report = report;
	}
	
	public void mouseClicked(MouseEvent arg0) {
		if (arg0.getButton() == MouseEvent.BUTTON1 && arg0.getClickCount() == 2) {
			Iterator it = report.getCurrentPage().cells.iterator();
			Cell c;
			while(it.hasNext()) {
				c = (Cell) it.next();
				if (c.contains(arg0.getX(), arg0.getY())) {
					CellEditor.edit(c, report);
					return;
				}
			}
		} else if (arg0.getButton() == MouseEvent.BUTTON1) {
			Iterator it = report.getCurrentPage().cells.iterator();
			Cell c;
			while(it.hasNext()) {
				c = (Cell) it.next();
				if (c.contains(arg0.getX(), arg0.getY())) {
					report.setCurrentCell(c);
					report.updateUI();
					return;
				}
			}
			report.setCurrentCell(null);
			report.updateUI();			
		}
	}

}

⌨️ 快捷键说明

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