|
|
|
@ -1,5 +1,11 @@
|
|
|
|
|
package com.fr.design.mainframe.vcs.ui; |
|
|
|
|
|
|
|
|
|
import com.fine.swing.ui.layout.Column; |
|
|
|
|
import com.fine.theme.utils.FineComponentsFactory; |
|
|
|
|
import com.fine.theme.utils.FineLayoutBuilder; |
|
|
|
|
import com.fine.theme.utils.FineUIScale; |
|
|
|
|
import com.formdev.flatlaf.util.ScaledEmptyBorder; |
|
|
|
|
import com.fr.design.border.FineBorderFactory; |
|
|
|
|
import com.fr.design.dialog.UIDialog; |
|
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
|
import com.fr.design.gui.icontainer.UIScrollPane; |
|
|
|
@ -10,7 +16,6 @@ import com.fr.design.layout.TableLayoutHelper;
|
|
|
|
|
import com.fr.design.mainframe.DesignerContext; |
|
|
|
|
import com.fr.design.mainframe.DesignerFrameFileDealerPane; |
|
|
|
|
import com.fr.design.utils.gui.GUICoreUtils; |
|
|
|
|
import com.fr.log.FineLoggerFactory; |
|
|
|
|
import com.fr.report.entity.VcsEntity; |
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
import com.fr.workspace.WorkContext; |
|
|
|
@ -19,7 +24,7 @@ import com.fr.workspace.server.vcs.VcsOperator;
|
|
|
|
|
import javax.swing.JPanel; |
|
|
|
|
import java.awt.BorderLayout; |
|
|
|
|
import java.awt.Component; |
|
|
|
|
import java.awt.FlowLayout; |
|
|
|
|
import java.awt.Dimension; |
|
|
|
|
import java.awt.Frame; |
|
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
|
import java.awt.event.ActionListener; |
|
|
|
@ -47,7 +52,7 @@ public class EditFileVersionDialog extends UIDialog {
|
|
|
|
|
initComponents(); |
|
|
|
|
setModal(true); |
|
|
|
|
setTitle(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Vcs_Save_Version")); |
|
|
|
|
setSize(300, 220); |
|
|
|
|
setSize(FineUIScale.scale(new Dimension(300, 220))); |
|
|
|
|
setResizable(false); |
|
|
|
|
GUICoreUtils.centerWindow(this); |
|
|
|
|
|
|
|
|
@ -55,15 +60,20 @@ public class EditFileVersionDialog extends UIDialog {
|
|
|
|
|
|
|
|
|
|
private void initComponents() { |
|
|
|
|
|
|
|
|
|
Column centerColumn = new Column(); |
|
|
|
|
centerColumn.setSpacing(10); |
|
|
|
|
add(centerColumn, BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
JPanel fontPane = new JPanel(new BorderLayout()); |
|
|
|
|
UILabel fontLabel = new UILabel(" " + Toolkit.i18nText("Fine-Design_Vcs_Version_Message") + ":"); |
|
|
|
|
|
|
|
|
|
UILabel fontLabel = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Version_Message")); |
|
|
|
|
fontLabel.setToolTipText(Toolkit.i18nText("Fine-Design_Vcs_Version_Message")); |
|
|
|
|
fontPane.add(fontLabel, BorderLayout.NORTH); |
|
|
|
|
|
|
|
|
|
msgTestArea.setBorder(null); |
|
|
|
|
UIScrollPane scrollPane = new UIScrollPane(msgTestArea); |
|
|
|
|
|
|
|
|
|
UILabel versionTip = new UILabel(" " + Toolkit.i18nText("Fine-Design_Vcs_Version_Number") + ":"); |
|
|
|
|
JPanel scrollPane = FineLayoutBuilder.asBorderLayoutWrapped(new UIScrollPane(msgTestArea)); |
|
|
|
|
scrollPane.setBorder(FineBorderFactory.createWrappedRoundBorder()); |
|
|
|
|
UILabel versionTip = new UILabel(Toolkit.i18nText("Fine-Design_Vcs_Version_Number")); |
|
|
|
|
versionTip.setToolTipText(Toolkit.i18nText("Fine-Design_Vcs_Version_Number")); |
|
|
|
|
Component[][] components = new Component[][]{ |
|
|
|
|
new Component[]{versionTip, versionLabel}, |
|
|
|
@ -72,16 +82,16 @@ public class EditFileVersionDialog extends UIDialog {
|
|
|
|
|
double[] rowSizes = new double[]{25, 100}; |
|
|
|
|
double[] columnSizes = new double[]{70, 200}; |
|
|
|
|
|
|
|
|
|
add(TableLayoutHelper.createTableLayoutPane(components, rowSizes, columnSizes), BorderLayout.CENTER); |
|
|
|
|
|
|
|
|
|
JPanel buttonPane = new JPanel(new FlowLayout(FlowLayout.RIGHT)); |
|
|
|
|
add(buttonPane, BorderLayout.SOUTH); |
|
|
|
|
JPanel pane = TableLayoutHelper.createTableLayoutPane(components, rowSizes, columnSizes); |
|
|
|
|
|
|
|
|
|
UIButton ok = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_OK")); |
|
|
|
|
UIButton cancel = new UIButton(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_Utils_Design_Action_Cancel")); |
|
|
|
|
JPanel buttonPane = FineComponentsFactory.createConfirmCancelButtonPane(ok, cancel); |
|
|
|
|
|
|
|
|
|
centerColumn.add(pane); |
|
|
|
|
centerColumn.add(buttonPane); |
|
|
|
|
centerColumn.setBorder(new ScaledEmptyBorder(10, 10, 10, 10)); |
|
|
|
|
|
|
|
|
|
buttonPane.add(ok); |
|
|
|
|
buttonPane.add(cancel); |
|
|
|
|
|
|
|
|
|
ok.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|