Browse Source

REPORT-16559

research/10.0
XiaXiang 6 years ago
parent
commit
6fd40efe16
  1. 2
      designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java
  2. 7
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/EditFileVersionDialog.java
  3. 5
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionRowPanel.java

2
designer-base/src/main/java/com/fr/design/mainframe/vcs/common/VcsHelper.java

@ -40,7 +40,7 @@ public class VcsHelper {
public final static EmptyBorder EMPTY_BORDER = new EmptyBorder(10, 10, 0, 10);
public final static EmptyBorder EMPTY_BORDER_MEDIUM = new EmptyBorder(5, 10, 0, 10);
public final static EmptyBorder EMPTY_BORDER_BOTTOM = new EmptyBorder(10, 10, 10, 10);

7
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/EditFileVersionDialog.java

@ -8,16 +8,15 @@ import com.fr.design.gui.itextarea.UITextArea;
import com.fr.design.layout.TableLayoutHelper;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.utils.gui.GUICoreUtils;
import com.fr.locale.InterProviderFactory;
import com.fr.report.ReportContext;
import com.fr.report.entity.VcsEntity;
import com.fr.workspace.WorkContext;
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.Frame;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
@ -80,7 +79,7 @@ public class EditFileVersionDialog extends UIDialog {
@Override
public void actionPerformed(ActionEvent e) {
entity.setCommitMsg(msgTestArea.getText());
ReportContext.getInstance().getVcsController().saveOrUpdateFileVersion(entity);
WorkContext.getCurrent().get(VcsOperator.class).updateVersion(entity);
setVisible(false);
}
});

5
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/FileVersionRowPanel.java

@ -16,6 +16,7 @@ import javax.swing.Box;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.SwingConstants;
import javax.swing.border.EmptyBorder;
import javax.swing.text.BadLocationException;
import javax.swing.text.Style;
import javax.swing.text.StyleConstants;
@ -43,13 +44,13 @@ public class FileVersionRowPanel extends JPanel {
// version + username
Box upPane = Box.createHorizontalBox();
upPane.setBorder(VcsHelper.EMPTY_BORDER);
upPane.setBorder(VcsHelper.EMPTY_BORDER_MEDIUM);
upPane.add(versionLabel);
upPane.add(Box.createHorizontalGlue());
// msg
msgLabel.setBorder(VcsHelper.EMPTY_BORDER);
msgLabel.setBorder(VcsHelper.EMPTY_BORDER_MEDIUM);
msgLabel.setOpaque(false);
msgLabel.setBackground(new Color(0, 0, 0, 0));
msgLabel.setEditable(false);

Loading…
Cancel
Save