📄 calendartable.java
字号:
/*
* CalendarTable.java
*
* Created on 2007年5月4日, 下午2:01
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package outlook;
import java.awt.*;
import java.util.*;
import javax.swing.*;
import java.io.*;
import javax.swing.table.*;
/**
*
* @author yy
*/
public class CalendarTable extends JTable {
private Calendar calendar;
public CalendarTable(TableModel model, Calendar calendar) {
super(model);
this.calendar = calendar;
}
public void changeSelection(int row, int column, boolean toggle, boolean extend) {
super.changeSelection(row, column, toggle, extend);
if (row == 0) {
return;
}
Object obj = getValueAt(row, column);
if (obj != null) {
calendar.set(Calendar.DAY_OF_MONTH, ((Integer)obj).intValue());
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -