diff --git a/designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java b/designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java index 216d7dd8ad..19a012b54b 100644 --- a/designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/server/ConnectionListAction.java @@ -1,6 +1,7 @@ package com.fr.design.actions.server; import com.fine.theme.icon.LazyIcon; +import com.fine.theme.utils.FineClientProperties; import com.fr.data.impl.Connection; import com.fr.design.actions.UpdateAction; import com.fr.design.data.datapane.connect.ConnectionShowPane; @@ -115,6 +116,7 @@ public class ConnectionListAction extends UpdateAction { Object object = this.getValue(UILockMenuItem.class.getName()); if (object == null && !(object instanceof UILockMenuItem)) { UILockMenuItem menuItem = new UILockMenuItem(this, EditLockUtils.CONNECTION_LOCKED_TOOLTIPS, null, LockItem.CONNECTION); + menuItem.putClientProperty(FineClientProperties.MENU_ITEM_TYPE, null); // 设置名字用作单元测 menuItem.setName(getName()); setPressedIcon4Button(menuItem); diff --git a/designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java b/designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java index c2c6d64b79..baaa7cc0c6 100644 --- a/designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java @@ -4,6 +4,7 @@ package com.fr.design.actions.server; import com.fine.theme.icon.LazyIcon; +import com.fine.theme.utils.FineClientProperties; import com.fr.base.TableData; import com.fr.design.DesignModelAdapter; import com.fr.design.actions.UpdateAction; @@ -176,6 +177,7 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS Object object = this.getValue(UILockMenuItem.class.getName()); if (object == null && !(object instanceof UILockMenuItem)) { UILockMenuItem menuItem = new UILockMenuItem(this, EditLockUtils.SERVER_TABLEDATA_LOCKED_TOOLTIPS, null, LockItem.SERVER_TABLE_DATA); + menuItem.putClientProperty(FineClientProperties.MENU_ITEM_TYPE, null); // 设置名字用作单元测 menuItem.setName(getName()); setPressedIcon4Button(menuItem); diff --git a/designer-base/src/main/java/com/fr/design/gui/imenu/UILockMenuItem.java b/designer-base/src/main/java/com/fr/design/gui/imenu/UILockMenuItem.java index 9128fd9242..4127b3eec8 100644 --- a/designer-base/src/main/java/com/fr/design/gui/imenu/UILockMenuItem.java +++ b/designer-base/src/main/java/com/fr/design/gui/imenu/UILockMenuItem.java @@ -33,6 +33,7 @@ public class UILockMenuItem extends UIMenuItem implements EditLockChangeListener this.lockedTooltips = lockedTooltips; this.normalTooltips = normalTooltips; this.lockItem = lockItem; + this.putClientProperty(FineClientProperties.MENU_ITEM_TYPE, FineClientProperties.MENU_ITEM_TYPE_LOCK); } public LockItem getLockItem() {