Browse Source

REPORT-43833 【10.0.14】远程设计数据连接/服务器数据集增加锁定

【问题原因】自测+修改一些bug
【改动思路】自测+修改一些bug
feature/big-screen
Yvan 4 years ago
parent
commit
389483541d
  1. 2
      designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java
  2. 2
      designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java
  3. 1
      designer-base/src/main/java/com/fr/design/data/datapane/connect/ConnectionComboBoxPanel.java
  4. 14
      designer-base/src/main/java/com/fr/design/editlock/EditLockUtils.java
  5. 9
      designer-base/src/main/java/com/fr/design/gui/ibutton/UILockButton.java
  6. BIN
      designer-base/src/main/resources/com/fr/design/images/m_web/warningIcon.png
  7. 21
      designer-base/src/main/resources/com/fr/design/images/m_web/warningIcon_normal.svg

2
designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java

@ -115,7 +115,7 @@ public class ConnectionListAction extends UpdateAction {
public UIMenuItem createMenuItem() {
Object object = this.getValue(UILockMenuItem.class.getName());
if (object == null && !(object instanceof UILockMenuItem)) {
UILockMenuItem menuItem = new UILockMenuItem(this, EditLockUtils.CONNECTION_LOCKED_TOOLTIPS, StringUtils.EMPTY, LockItem.CONNECTION);
UILockMenuItem menuItem = new UILockMenuItem(this, EditLockUtils.CONNECTION_LOCKED_TOOLTIPS, null, LockItem.CONNECTION);
// 设置名字用作单元测
menuItem.setName(getName());
setPressedIcon4Button(menuItem);

2
designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java

@ -192,7 +192,7 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS
public UIMenuItem createMenuItem() {
Object object = this.getValue(UILockMenuItem.class.getName());
if (object == null && !(object instanceof UILockMenuItem)) {
UILockMenuItem menuItem = new UILockMenuItem(this, EditLockUtils.SERVER_TABLEDATA_LOCKED_TOOLTIPS, StringUtils.EMPTY, LockItem.SERVER_TABLE_DATA);
UILockMenuItem menuItem = new UILockMenuItem(this, EditLockUtils.SERVER_TABLEDATA_LOCKED_TOOLTIPS, null, LockItem.SERVER_TABLE_DATA);
// 设置名字用作单元测
menuItem.setName(getName());
setPressedIcon4Button(menuItem);

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

@ -73,7 +73,6 @@ public class ConnectionComboBoxPanel extends ItemEditableComboBoxPanel {
EditLockUtils.CONNECTION_LOCKED_TOOLTIPS,
StringUtils.EMPTY
);
editButton.setIcon(IconUtils.readIcon("/com/fr/design/images/m_web/connection"));
editButton.setPreferredSize(buttonSize);
editButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent evt) {

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

@ -5,6 +5,7 @@ import com.fr.base.svg.SVGLoader;
import com.fr.design.dialog.FineJOptionPane;
import com.fr.design.i18n.Toolkit;
import com.fr.design.mainframe.DesignerContext;
import com.fr.general.IOUtils;
import com.fr.workspace.WorkContext;
import com.fr.workspace.server.lock.editlock.EditLockOperator;
import com.fr.workspace.server.lock.editlock.LockItem;
@ -32,7 +33,10 @@ public class EditLockUtils {
*/
public static final @Nullable Image LOCKED_IMAGE = SVGLoader.load("/com/fr/design/images/m_web/locked_normal.svg");
public static final Icon TOOLTIPS_ICON = IconUtils.readIcon("/com/fr/design/images/m_web/warningIcon");
/**
* 提示弹窗中的提示标志
*/
public static final Icon TOOLTIPS_ICON = IOUtils.readIcon("/com/fr/design/images/m_web/warningIcon.png");
/**
* 数据连接锁定中
@ -44,9 +48,15 @@ public class EditLockUtils {
*/
public static final String SERVER_TABLEDATA_LOCKED_TOOLTIPS = Toolkit.i18nText("Fine_Designer_Remote_Design_Server_TableData_Locked");
/**
* 提示弹窗中的提示信息
*/
public static final String LOCKED_MESSAGE = Toolkit.i18nText("Fine_Designer_Remote_Design_Locked_Message");
public static final String TOOLTIPS = Toolkit.i18nText("Fine-Engine_Report_Tooltips");
/**
* 提示弹窗中的标题
*/
public static final String TOOLTIPS = Toolkit.i18nText("Fine-Design_Basic_Remote_Design_Title_Hint");
/**
* 已经被锁跳出弹窗提示

9
designer-base/src/main/java/com/fr/design/gui/ibutton/UILockButton.java

@ -2,6 +2,8 @@ package com.fr.design.gui.ibutton;
import com.fr.design.editlock.EditLockChangeEvent;
import com.fr.design.editlock.EditLockChangeListener;
import com.fr.design.editlock.EditLockUtils;
import com.fr.workspace.server.lock.editlock.LockItem;
import javax.swing.Icon;
@ -35,6 +37,13 @@ public class UILockButton extends UIButton implements EditLockChangeListener {
this.normalIcon = normalIcon;
this.lockedTooltips = lockedTooltips;
this.normalTooltips = normalTooltips;
init();
}
private void init() {
boolean locked = EditLockUtils.isLocked(LockItem.CONNECTION);
this.setIcon(locked ? lockedIcon : normalIcon);
this.setToolTipText(locked ? lockedTooltips : normalTooltips);
}
@Override

BIN
designer-base/src/main/resources/com/fr/design/images/m_web/warningIcon.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

21
designer-base/src/main/resources/com/fr/design/images/m_web/warningIcon_normal.svg

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="46px" height="41px" viewBox="0 0 46 41" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>icon_WarningIcon_normal</title>
<defs>
<polygon id="path-1" points="0 41 46 41 46 0 0 0"></polygon>
</defs>
<g id="远程设计数据连接/服务器数据集增加锁定" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="弹窗/提示" transform="translate(-11.000000, -42.000000)">
<g id="Group" transform="translate(10.000000, 38.000000)">
<g id="Page-1" transform="translate(1.000000, 4.000000)">
<path d="M3.7061,41 C0.4041,41 -0.9459,38.646 0.7051,35.771 L19.9981,2.157 C21.6491,-0.719 24.3511,-0.719 26.0011,2.157 L45.2951,35.771 C46.9461,38.646 45.5961,41 42.2941,41 L3.7061,41 Z" id="Fill-1" fill="#FBB03B"></path>
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="Clip-4"></g>
<path d="M21,35 L25,35 L25,31 L21,31 L21,35 Z M26,13 L25,29 L21,29 L20,13 L26,13 Z" id="Fill-3" fill="#FFFFFF" mask="url(#mask-2)"></path>
</g>
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.3 KiB

Loading…
Cancel
Save