Browse Source

merge code

feature/big-screen
Qinghui.Liu 4 years ago
parent
commit
abf201d120
  1. 2
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java
  2. 6
      designer-base/src/main/java/com/fr/design/editlock/EditLockUtils.java

2
designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java

@ -128,7 +128,7 @@ public class ConnectionComboBoxPanel extends ItemEditableComboBoxPanel {
boolean actionLock = EditLockUtils.lock(LockItem.CONNECTION);
if (!actionLock) {
// 锁定失败,代表已经被其他用户锁定,跳出弹窗提示
EditLockUtils.showLockMessage();
EditLockUtils.showLockMessage(this);
return;
}
// 锁定成功,执行后续操作

6
designer-base/src/main/java/com/fr/design/editlock/EditLockUtils.java

@ -13,6 +13,8 @@ import org.jetbrains.annotations.Nullable;
import javax.swing.Icon;
import javax.swing.JOptionPane;
import javax.swing.SwingUtilities;
import java.awt.Component;
import java.awt.Image;
/**
@ -65,6 +67,10 @@ public class EditLockUtils {
FineJOptionPane.showMessageDialog(DesignerContext.getDesignerFrame(), EditLockUtils.LOCKED_MESSAGE, EditLockUtils.TOOLTIPS, JOptionPane.INFORMATION_MESSAGE, EditLockUtils.TOOLTIPS_ICON);
}
public static void showLockMessage(Component parentComponent) {
FineJOptionPane.showMessageDialog(SwingUtilities.getWindowAncestor(parentComponent), EditLockUtils.LOCKED_MESSAGE, EditLockUtils.TOOLTIPS, JOptionPane.INFORMATION_MESSAGE, EditLockUtils.TOOLTIPS_ICON);
}
public static boolean lock(LockItem lockItem) {
return WorkContext.getCurrent().get(EditLockOperator.class).lock(lockItem);
}

Loading…
Cancel
Save