Browse Source

Merge pull request #5015 in DESIGN/design from feature/10.0 to release/11.0

* commit 'd40762ada3dc346218ae1e88354b8b30dc6cff69':
  REPORT-54374 拖拽修改tab里的绝对画布块高度,绝对画布块错乱 右侧设置面板修改高度,绝对画布块内部组件位移成画布块
  REPORT-55227 【组件背景分离】组件复用-组件悬停1s后判断组件移入tab内部,这时候的tab块没有预期的蓝色阴影样式 fix
  REPORT-55227 【组件背景分离】组件复用-组件悬停1s后判断组件移入tab内部,这时候的tab块没有预期的蓝色阴影样式
  REPORT-55339 权限编辑时,聚合报表单元格属性设置面板,在切换参数面板编辑后,面板未刷新
  REPORT-55337 【组件背景分离】组件复用-组件选中出现工具栏后,键盘delete就删不掉组件了;没有出现工具栏的情况下,可以delete快捷键删掉
fix-lag
superman 3 years ago
parent
commit
fd295ab345
  1. 12
      designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java
  2. 1
      designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java
  3. 4
      designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java
  4. 23
      designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java
  5. 1
      designer-form/src/main/java/com/fr/design/mainframe/TabDragInner.java
  6. 5
      designer-realize/src/main/java/com/fr/poly/creator/ECBlockPane.java

12
designer-form/src/main/java/com/fr/design/designer/creator/cardlayout/XWCardMainBorderLayout.java

@ -3,6 +3,7 @@
*/
package com.fr.design.designer.creator.cardlayout;
import com.fr.base.GraphHelper;
import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.ComponentAdapter;
import com.fr.design.designer.beans.LayoutAdapter;
@ -32,6 +33,8 @@ import com.fr.general.ComparatorUtils;
import com.fr.general.act.BorderPacker;
import com.fr.stable.Constants;
import java.awt.Color;
import java.awt.Component;
import java.awt.Cursor;
import java.awt.Dimension;
@ -50,6 +53,9 @@ import java.util.List;
*/
public class XWCardMainBorderLayout extends XWBorderLayout {
private static final int BORDER_WIDTH = 4;
private static final Color OUTER_BORDER_COLOR = new Color(65, 155, 249, 30);
private static final int CENTER = 1;
private static final int NORTH = 0;
private static final int TITLE_STYLE = 2;
@ -345,6 +351,12 @@ public class XWCardMainBorderLayout extends XWBorderLayout {
@Override
public void paintBorder(Graphics g, Rectangle bounds){
if (isDragInAble()) {
Color oldColor = g.getColor();
g.setColor(OUTER_BORDER_COLOR);
GraphHelper.draw(g, new Rectangle(bounds.x - BORDER_WIDTH, bounds.y - BORDER_WIDTH, bounds.width + BORDER_WIDTH + 3, bounds.height + BORDER_WIDTH + 3), Constants.LINE_LARGE);
g.setColor(oldColor);
}
if (!isMouseEnter) {
super.paintBorder(g, bounds);
}

1
designer-form/src/main/java/com/fr/design/designer/ui/SelectedPopupDialog.java

@ -24,6 +24,7 @@ public class SelectedPopupDialog extends JDialog {
super(DesignerContext.getDesignerFrame());
this.setUndecorated(true);
this.setModal(false);
this.setFocusableWindowState(false);
controlPanel = new PopupControlPanel(creator, designer);
this.getContentPane().add(controlPanel);
this.setSize(controlPanel.getDefaultDimension());

4
designer-form/src/main/java/com/fr/design/mainframe/FormCreatorDropTarget.java

@ -335,4 +335,8 @@ public class FormCreatorDropTarget extends DropTarget {
}
}
}
public TabDragInner getTabDragInner() {
return this.tabDragInner;
}
}

23
designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java

@ -13,7 +13,7 @@ import com.fr.design.designer.beans.models.SelectionModel;
import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XLayoutContainer;
import com.fr.design.designer.creator.XWFitLayout;
import com.fr.design.designer.creator.XWTitleLayout;
import com.fr.design.designer.creator.cardlayout.XWCardMainBorderLayout;
import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.roleAuthority.ReportAndFSManagePane;
import com.fr.design.utils.ComponentUtils;
@ -24,6 +24,7 @@ import com.fr.report.core.ReportUtils;
import com.fr.stable.ArrayUtils;
import com.fr.stable.Constants;
import java.awt.dnd.DropTarget;
import javax.swing.*;
import javax.swing.plaf.ComponentUI;
import java.awt.AlphaComposite;
@ -94,6 +95,7 @@ public class FormDesignerUI extends ComponentUI {
}
paintBorder(g);
paintSelection(g);
paintDropBorderShadow(g);
if (DesignerMode.isAuthorityEditing()) {
paintAuthorityDetails(g, designer.getRootComponent());
@ -330,6 +332,25 @@ public class FormDesignerUI extends ComponentUI {
}
}
/**
* 绘制可拖拽进tab块之前的阴影
*
* @param g
*/
private void paintDropBorderShadow(Graphics g) {
DropTarget dropTarget = designer.getDropTarget();
if (dropTarget instanceof FormCreatorDropTarget) {
FormCreatorDropTarget target = (FormCreatorDropTarget) dropTarget;
XLayoutContainer layoutContainer = target.getTabDragInner().getBelowXLayoutContainer();
if (layoutContainer != null && layoutContainer.acceptType(XWCardMainBorderLayout.class)) {
Rectangle creatorBounds = ComponentUtils.getRelativeBounds(layoutContainer);
creatorBounds.x -= designer.getHorizontalScaleValue();
creatorBounds.y -= designer.getVerticalScaleValue();
layoutContainer.paintBorder(g, creatorBounds);
}
}
}
/**
* 初始为自适应时处理选中的范围
* @param bound

1
designer-form/src/main/java/com/fr/design/mainframe/TabDragInner.java

@ -71,6 +71,7 @@ public class TabDragInner {
ComponentAdapter adapter = AdapterBus.getComponentAdapter(designer, belowXLayoutContainer);
if (adapter != null) {
editingMouseListener.startEditing(belowXLayoutContainer, adapter.getDesignerEditor(), adapter);
belowXLayoutContainer.setDragInAble(false);
}
}
}

5
designer-realize/src/main/java/com/fr/poly/creator/ECBlockPane.java

@ -18,6 +18,7 @@ import com.fr.design.actions.edit.HyperlinkAction;
import com.fr.design.actions.edit.merge.MergeCellAction;
import com.fr.design.actions.edit.merge.UnmergeCellAction;
import com.fr.design.actions.utils.DeprecatedActionManager;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener;
import com.fr.design.file.HistoryTemplateListPane;
@ -55,10 +56,10 @@ public class ECBlockPane extends PolyElementCasePane {
@Override
public void selectionChanged(SelectionEvent e) {
if (!isEditable()) {
if (!isEditable() && !DesignModeContext.isAuthorityEditing()) {
return;
}
if (DesignerMode.isAuthorityEditing()) {
if (DesignModeContext.isAuthorityEditing()) {
if (designer.getSelection().getEditingElementCasePane() == null) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION_DISABLED);
EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(new NoSupportAuthorityEdit());

Loading…
Cancel
Save