|
|
|
@ -4,6 +4,7 @@ import com.fr.design.editlock.EditLockChangeEvent;
|
|
|
|
|
import com.fr.design.editlock.EditLockChangeListener; |
|
|
|
|
import com.fr.design.editlock.EditLockUtils; |
|
|
|
|
import com.fr.report.LockItem; |
|
|
|
|
import com.fr.start.common.DesignerStartupContext; |
|
|
|
|
|
|
|
|
|
import javax.swing.Icon; |
|
|
|
|
|
|
|
|
@ -41,7 +42,8 @@ public class UILockButton extends UIButton implements EditLockChangeListener {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void init() { |
|
|
|
|
boolean locked = EditLockUtils.isLocked(LockItem.CONNECTION); |
|
|
|
|
// 设计器如果还在启动中就不需要判断上锁情况,界面都还没出现呢,直接短路掉
|
|
|
|
|
boolean locked = !DesignerStartupContext.getInstance().isOnStartup() && EditLockUtils.isLocked(LockItem.CONNECTION); |
|
|
|
|
this.setIcon(locked ? lockedIcon : normalIcon); |
|
|
|
|
this.setToolTipText(locked ? lockedTooltips : normalTooltips); |
|
|
|
|
} |
|
|
|
|