|
|
|
@ -7,6 +7,7 @@ import com.fr.design.gui.ibutton.UIButton;
|
|
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
|
import com.fr.design.gui.itextfield.UITextField; |
|
|
|
|
import com.fr.design.i18n.Toolkit; |
|
|
|
|
import com.fr.design.mainframe.vcs.common.VcsHelper; |
|
|
|
|
import com.fr.report.entity.VcsEntity; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
@ -17,6 +18,7 @@ import javax.swing.Box;
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.FlowLayout; |
|
|
|
|
import java.awt.Frame; |
|
|
|
|
import java.awt.Window; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
@ -24,14 +26,12 @@ import java.awt.event.ActionListener;
|
|
|
|
|
import java.util.Date; |
|
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
import static com.fr.design.mainframe.vcs.common.VcsHelper.EMPTY_BORDER; |
|
|
|
|
import static com.fr.design.mainframe.vcs.common.VcsHelper.EMPTY_BORDER_BOTTOM; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public class FileVersionDialog extends UIDialog { |
|
|
|
|
public static final long DELAY = 24 * 60 * 60 * 1000; |
|
|
|
|
private UIButton okBtn = new UIButton(Toolkit.i18nText("Fine-Design_Report_OK")); |
|
|
|
|
private UIButton cancelBtn = new UIButton(Toolkit.i18nText("Fine-Design_Basic_Utils_Design_Action_Cancel")); |
|
|
|
|
private UIButton okBtn; |
|
|
|
|
private UIButton cancelBtn; |
|
|
|
|
private DateEditor dateEditor; |
|
|
|
|
private UITextField textField; |
|
|
|
|
|
|
|
|
@ -39,23 +39,25 @@ public class FileVersionDialog extends UIDialog {
|
|
|
|
|
public FileVersionDialog(Frame frame) { |
|
|
|
|
super(frame); |
|
|
|
|
setUndecorated(true); |
|
|
|
|
setModal(true); |
|
|
|
|
JPanel panel = new JPanel(new BorderLayout()); |
|
|
|
|
Box upBox = Box.createHorizontalBox(); |
|
|
|
|
upBox.setBorder(EMPTY_BORDER_BOTTOM); |
|
|
|
|
upBox.add(new UILabel(Toolkit.i18nText("Fine-Design_Vcs_buildTime"))); |
|
|
|
|
upBox.setBorder(VcsHelper.EMPTY_BORDER); |
|
|
|
|
upBox.add(new UILabel(Toolkit.i18nText("Fine-Design_Vcs_buildTime") + " ")); |
|
|
|
|
upBox.add(Box.createHorizontalGlue()); |
|
|
|
|
dateEditor = new DateEditor(new Date(), true, StringUtils.EMPTY, UIDatePicker.STYLE_CN_DATE1); |
|
|
|
|
upBox.add(dateEditor); |
|
|
|
|
Box downBox = Box.createHorizontalBox(); |
|
|
|
|
downBox.setBorder(EMPTY_BORDER_BOTTOM); |
|
|
|
|
downBox.add(new UILabel(Toolkit.i18nText("Fine-Design_Vcs_CommitMsg"))); |
|
|
|
|
downBox.setBorder(VcsHelper.EMPTY_BORDER); |
|
|
|
|
downBox.add(new UILabel(Toolkit.i18nText("Fine-Design_Vcs_CommitMsg") + " ")); |
|
|
|
|
textField = new UITextField(); |
|
|
|
|
downBox.add(textField); |
|
|
|
|
Box box2 = Box.createHorizontalBox(); |
|
|
|
|
box2.add(Box.createHorizontalGlue()); |
|
|
|
|
box2.setBorder(EMPTY_BORDER); |
|
|
|
|
box2.add(okBtn); |
|
|
|
|
box2.add(cancelBtn); |
|
|
|
|
JPanel buttonPane = new JPanel(new FlowLayout(FlowLayout.RIGHT)); |
|
|
|
|
okBtn = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_OK")); |
|
|
|
|
cancelBtn = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Design_Action_Cancel")); |
|
|
|
|
buttonPane.setBorder(VcsHelper.EMPTY_BORDER); |
|
|
|
|
buttonPane.add(okBtn); |
|
|
|
|
buttonPane.add(cancelBtn); |
|
|
|
|
okBtn.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
@ -74,9 +76,9 @@ public class FileVersionDialog extends UIDialog {
|
|
|
|
|
}); |
|
|
|
|
panel.add(upBox, BorderLayout.NORTH); |
|
|
|
|
panel.add(downBox, BorderLayout.CENTER); |
|
|
|
|
panel.add(box2, BorderLayout.SOUTH); |
|
|
|
|
panel.add(buttonPane, BorderLayout.SOUTH); |
|
|
|
|
add(panel); |
|
|
|
|
setSize(new Dimension(220, 100)); |
|
|
|
|
setSize(new Dimension(230, 105)); |
|
|
|
|
centerWindow(this); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|