Browse Source

Pull request #5379: REPORT-55756 设计器界面移动时,工具栏保持停留原位置,没有随着移动,这个看下要不要优化下。鼠标再回到设计画布就好了

Merge in DESIGN/design from ~HADES/design:feature/10.0 to feature/10.0

* commit '42f24c5bcf1f09c2421cad431eac7d087bb396b6':
  REPORT-55756 设计器界面移动时,工具栏保持停留原位置,没有随着移动,这个看下要不要优化下。鼠标再回到设计画布就好了
feature/10.0
Hades 3 years ago
parent
commit
829fa083f5
  1. 18
      designer-base/src/main/java/com/fr/design/PluginClassRefreshManager.java
  2. 8
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  3. 4
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  4. 7
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  5. 8
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

18
designer-base/src/main/java/com/fr/design/PluginClassRefreshManager.java

@ -4,6 +4,8 @@ import com.fr.design.constants.DesignerLaunchStatus;
import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.fun.HyperlinkProvider;
import com.fr.design.fun.TableDataDefineProvider;
import com.fr.design.mainframe.JTemplate;
import com.fr.design.ui.util.UIUtil;
import com.fr.plugin.observer.PluginEvent;
import com.fr.plugin.observer.PluginEventListener;
import com.fr.plugin.observer.PluginEventType;
@ -28,7 +30,7 @@ public class PluginClassRefreshManager {
@Override
public void on(PluginEvent event) {
// 重载模版之前 触发下hide
HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().fireTabChange();
fireTabChange();
// 兼容之前版本特性
for (String tag : context) {
if (event.getContext().contain(tag)) {
@ -53,12 +55,24 @@ public class PluginClassRefreshManager {
public void on(PluginEvent event) {
PluginListenerRegistration.getInstance().listen(PluginEventType.AfterRun, pluginAfterRunEventListener);
if (DesignerLaunchStatus.getStatus() != DesignerLaunchStatus.WORKSPACE_INIT_COMPLETE) {
HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().fireTabChange();
fireTabChange();
HistoryTemplateListCache.getInstance().reloadAllEditingTemplate();
}
}
};
public void fireTabChange() {
JTemplate<?, ?> template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (template != null) {
UIUtil.invokeLaterIfNeeded(new Runnable() {
@Override
public void run() {
template.fireTabChange();
}
});
}
}
public static PluginClassRefreshManager getInstance() {
return INSTANCE;

8
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java

@ -275,6 +275,14 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
//刷新FixedPopupPane的位置
EastRegionContainerPane.getInstance().freshCurrentPopupPane();
}
@Override
public void componentMoved(ComponentEvent e) {
JTemplate<?, ?> template = HistoryTemplateListCache.getInstance().getCurrentEditingTemplate();
if (template != null) {
template.refreshFormDesigner();
}
}
});
this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
this.setVisible(false);

4
designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java

@ -221,6 +221,10 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
// do nothing
}
public void refreshFormDesigner() {
// do nothing
}
/**
* @deprecated move to cloud ops pluginleft only for compatible

7
designer-form/src/main/java/com/fr/design/mainframe/JForm.java

@ -1135,4 +1135,11 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm<F
formDesign.hidePopup();
}
}
@Override
public void refreshFormDesigner() {
if (formDesign != null) {
formDesign.repaint();
}
}
}

8
designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java

@ -1238,4 +1238,12 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
designer.hidePopup();
}
}
@Override
public void refreshFormDesigner() {
FormDesigner designer = (FormDesigner) parameterPane.getParaDesigner();
if (designer != null) {
designer.repaint();
}
}
}

Loading…
Cancel
Save