package com.vci.client.ui.date; import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import javax.swing.Action; import javax.swing.JButton; import javax.swing.JComboBox; import com.vci.client.ui.image.BundleImage; import com.vci.client.ui.swing.components.VCIJComboBox; /*** * 得到一个可以设置日期的button * @author Administrator * @deprecated 废用, */ @Deprecated public class PopupCalendarMethod { public JButton createDateDialogButton(String key, VCIJComboBox jcb) { Action a = new CreateDateAction("", key, "选择日期",jcb); return createButton(a); } private class CreateDateAction extends AbstractAction { private VCIJComboBox jcb; private static final long serialVersionUID = -8853426640336336204L; public CreateDateAction(String name, String fileName, String description,VCIJComboBox jcb) { this.jcb = jcb; putValue(NAME, name); putValue(SMALL_ICON, new BundleImage().createImageIcon (fileName)); putValue(SHORT_DESCRIPTION, description); } public void actionPerformed(ActionEvent e) { new PopupCalendarPanel(jcb).show(); } } public JButton createButton(Action a) { JButton b = new JButton(); b.setAction(a); return b; } }