Browse Source

REPORT-100958 【版本管理三期】还原或者预览版本,弹窗应该关闭

newui
Destiny.Lin 1 year ago
parent
commit
83b13ffd4b
  1. 3
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  2. 45
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java
  3. 3
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsCenterPane.java
  4. 4
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java
  5. 2
      designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java

3
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -524,8 +524,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
private void showVcsNewPane(String path) {
VcsNewPane panel = new VcsNewPane(path);
BasicDialog dialog = panel.showWindow(DesignerContext.getDesignerFrame(), false);
dialog.setVisible(true);
panel.showDialog();
}
/**

45
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/RecyclePane.java

@ -1,10 +1,12 @@
package com.fr.design.mainframe.vcs.ui;
import com.fr.base.svg.IconUtils;
import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.FineJOptionPane;
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.DesignerContext;
import com.fr.design.mainframe.vcs.VcsOperatorWorker;
import com.fr.design.mainframe.vcs.TableEntity;
import com.fr.design.mainframe.vcs.TableValueOperator;
@ -47,7 +49,9 @@ public class RecyclePane extends AbstractSupportSelectTablePane<VcsTableEntity>
protected UILabel restoreLabel;
private static final int COLUMNS_COUNT = 15;
private BasicDialog dialog;
private BasicDialog parent;
private List<VcsTableEntity> tableEntities;
public RecyclePane() {
@ -196,6 +200,47 @@ public class RecyclePane extends AbstractSupportSelectTablePane<VcsTableEntity>
}
/**
* 显示弹窗
*
*/
public void showDialog() {
dialog = this.showWindow(DesignerContext.getDesignerFrame(), false);
dialog.setVisible(true);
}
/**
* 依据父弹窗显示弹窗
*
* @param parent 父弹窗
*/
public void showDialog(BasicDialog parent) {
this.parent = parent;
dialog = this.showWindow(parent, false);
dialog.setVisible(true);
}
/**
* 关闭弹窗如果有父弹窗则一起关闭
*
*/
public void closeDialog() {
if (dialog != null) {
dialog.dispose();
}
if (parent != null) {
parent.dispose();
}
}
public BasicDialog getDialog() {
return dialog;
}
public void setDialog(BasicDialog dialog) {
this.dialog = dialog;
}
/**
* 删除范围
*

3
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsCenterPane.java

@ -159,8 +159,7 @@ public class VcsCenterPane extends VcsNewPane {
return entity.getFilename()+Toolkit.i18nText("Fine-Design_Vcs_Version_Tips");
}
};
BasicDialog dialog = pane.showWindow(DesignerContext.getDesignerFrame(), false);
dialog.setVisible(true);
pane.showDialog(getDialog());
}
}
});

4
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsMovePanel.java

@ -265,9 +265,7 @@ public class VcsMovePanel extends BasicPane {
@Override
public void actionPerformed(ActionEvent e) {
VcsCenterPane vcsCenterPane = new VcsCenterPane();
BasicDialog dialog = vcsCenterPane.showWindow(DesignerContext.getDesignerFrame(), false);
dialog.setVisible(true);
vcsCenterPane.showDialog();
}
});
}

2
designer-base/src/main/java/com/fr/design/mainframe/vcs/ui/VcsNewPane.java

@ -160,6 +160,7 @@ public class VcsNewPane extends RecyclePane {
JOptionPane.QUESTION_MESSAGE);
if (selVal == JOptionPane.YES_OPTION) {
restoreEntity(entity);
VcsNewPane.this.closeDialog();
}
}
}
@ -229,6 +230,7 @@ public class VcsNewPane extends RecyclePane {
if (o instanceof VcsTableEntity) {
VcsEntity entity = ((VcsTableEntity) o).getEntity();
previewEntity(entity);
VcsNewPane.this.closeDialog();
}
}
});

Loading…
Cancel
Save