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

📄 caltimeeditor.java.svn-base

📁 通讯采集软件
💻 SVN-BASE
字号:
package collector.gui.guiVo;

import java.util.*;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class CalTimeEditor
    extends DefaultCellEditor {
  public MyDate m_Date = new MyDate(new Date().getTime());

  public CalTimeEditor(JButton b) {
    super(new JCheckBox()); //Unfortunately, the constructor
    editorComponent = b;
    setClickCountToStart(1); //This is usually 1 or 2.

    b.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        fireEditingStopped();
      }
    });
  }

  protected void fireEditingStopped() {
    super.fireEditingStopped();
  }

  public Object getCellEditorValue() {
    if (m_Date == null) {
      return new MyDate(new Date().getTime());
    }
    else {
      return m_Date;
    }
  }

  public Component getTableCellEditorComponent(JTable table,
                                               Object value,
                                               boolean isSelected,
                                               int row,
                                               int column) {
    if (value == null) {
      ( (JButton) editorComponent).setText("");
    }
    else {
      ( (JButton) editorComponent).setText(value.toString());
    }
    m_Date = (MyDate) value;
    if (value == null) {
      ;
    }
    else {
      ;
    }
    return editorComponent;
  }

}

⌨️ 快捷键说明

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