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