Browse Source

Merge pull request #638 in DESIGN/design from ~YAOH.WU/design:feature/10.0 to feature/10.0

* commit '1a98f452b61c8a6a2bec2d7374a338f380820374':
  f
  REPORT-11623 模板加密 设计器拷贝剪切控制
research/10.0
yaoh.wu 6 years ago
parent
commit
67cbc1ec85
  1. 5
      designer-base/src/main/java/com/fr/design/actions/edit/CopyAction.java
  2. 6
      designer-base/src/main/java/com/fr/design/actions/edit/CutAction.java
  3. 19
      designer-base/src/main/java/com/fr/design/actions/edit/PasteAction.java
  4. 24
      designer-base/src/main/java/com/fr/design/base/mode/DesignModeContext.java
  5. 7
      designer-base/src/main/java/com/fr/design/designer/DesignerProxy.java
  6. 80
      designer-base/src/main/java/com/fr/design/designer/TargetComponent.java
  7. 3
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  8. 5
      designer-form/src/main/java/com/fr/design/designer/beans/actions/CopyAction.java
  9. 6
      designer-form/src/main/java/com/fr/design/designer/beans/actions/CutAction.java
  10. 46
      designer-form/src/main/java/com/fr/design/designer/beans/actions/PasteAction.java
  11. 12
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  12. 17
      designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java
  13. 12
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java
  14. 7
      designer-realize/src/main/java/com/fr/design/mainframe/ReportComponent.java
  15. 19
      designer-realize/src/main/java/com/fr/design/mainframe/WorkSheetDesigner.java
  16. 18
      designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java
  17. 31
      designer-realize/src/main/java/com/fr/poly/PolyDesigner.java
  18. 39
      designer-realize/src/main/java/com/fr/poly/creator/ECBlockPane.java

5
designer-base/src/main/java/com/fr/design/actions/edit/CopyAction.java

@ -29,10 +29,7 @@ public class CopyAction extends TemplateComponentAction {
@Override
public boolean executeActionReturnUndoRecordNeeded() {
TargetComponent tc = getEditingComponent();
if (tc != null) {
tc.copy();
}
DesignModeContext.doCopy(getEditingComponent());
return false;
}
}

6
designer-base/src/main/java/com/fr/design/actions/edit/CutAction.java

@ -32,10 +32,6 @@ public class CutAction extends TemplateComponentAction {
@Override
public boolean executeActionReturnUndoRecordNeeded() {
TargetComponent editPane = getEditingComponent();
if (editPane == null) {
return false;
}
return editPane.cut();
return DesignModeContext.doPaste(getEditingComponent());
}
}

19
designer-base/src/main/java/com/fr/design/actions/edit/PasteAction.java

@ -3,14 +3,13 @@
*/
package com.fr.design.actions.edit;
import java.awt.event.KeyEvent;
import javax.swing.KeyStroke;
import com.fr.base.BaseUtils;
import com.fr.design.actions.TemplateComponentAction;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.designer.TargetComponent;
import javax.swing.KeyStroke;
import java.awt.event.KeyEvent;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
@ -21,9 +20,9 @@ public class PasteAction extends TemplateComponentAction {
/**
* Constructor
*/
public PasteAction(TargetComponent t) {
super(t);
public PasteAction(TargetComponent t) {
super(t);
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Edit_Paste"));
this.setMnemonic('P');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png"));
@ -32,10 +31,6 @@ public class PasteAction extends TemplateComponentAction {
@Override
public boolean executeActionReturnUndoRecordNeeded() {
TargetComponent tc = getEditingComponent();
if (tc == null) {
return false;
}
return tc.paste();
return DesignModeContext.doPaste(getEditingComponent());
}
}

24
designer-base/src/main/java/com/fr/design/base/mode/DesignModeContext.java

@ -1,5 +1,7 @@
package com.fr.design.base.mode;
import com.fr.design.designer.TargetComponent;
import static com.fr.design.base.mode.DesignerMode.AUTHORITY;
public class DesignModeContext {
@ -39,4 +41,26 @@ public class DesignModeContext {
public static boolean isAuthorityEditing() {
return mode == AUTHORITY;
}
public static void doCopy(TargetComponent principal) {
if (isBanCopyAndCut() || principal == null) {
return;
}
principal.copy();
}
public static boolean doPaste(TargetComponent principal) {
if (principal == null) {
return false;
}
return principal.paste();
}
public static boolean doCut(TargetComponent principal) {
if (isBanCopyAndCut() || principal == null) {
return false;
}
return principal.cut();
}
}

7
designer-base/src/main/java/com/fr/design/designer/DesignerProxy.java

@ -0,0 +1,7 @@
package com.fr.design.designer;
/**
* 暂时是空接口标记一下模板设计时推出的代理其他 {@link TargetComponent} 的类
*/
public interface DesignerProxy {
}

80
designer-base/src/main/java/com/fr/design/designer/TargetComponent.java

@ -1,6 +1,5 @@
package com.fr.design.designer;
import com.fr.design.DesignState;
import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener;
import com.fr.design.mainframe.AuthorityEditPane;
@ -8,7 +7,6 @@ import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
import com.fr.design.menu.MenuDef;
import com.fr.design.menu.ShortCut;
import com.fr.design.menu.ToolBarDef;
import com.fr.stable.StringUtils;
import com.fr.third.javax.annotation.Nullable;
import javax.swing.JComponent;
@ -115,82 +113,4 @@ public abstract class TargetComponent<T> extends JComponent {
public EditingState createEditingState() {
return EditingState.NULL;
}
public static final TargetComponent<String> NULLAVOID = new TargetComponent<String>(StringUtils.EMPTY) {
@Override
public void copy() {
}
@Override
public boolean paste() {
return false;
}
@Override
public int getMenuState() {
return DesignState.WORK_SHEET;
}
@Override
public void cancelFormat() {
return;
}
@Override
public boolean cut() {
return false;
}
@Override
public void stopEditing() {
}
@Override
public AuthorityEditPane createAuthorityEditPane() {
return null;
}
@Override
public ToolBarMenuDockPlus getToolBarMenuDockPlus() {
return null;
}
@Override
public ToolBarDef[] toolbars4Target() {
return new ToolBarDef[0];
}
@Override
public MenuDef[] menus4Target() {
return new MenuDef[0];
}
@Override
public ShortCut[] shortcut4TemplateMenu() {
return new ShortCut[0];
}
@Override
public ShortCut[] shortCuts4Authority() {
return new ShortCut[0];
}
@Override
public JComponent[] toolBarButton4Form() {
return new JComponent[0];
}
@Override
public JPanel getEastUpPane() {
return new JPanel();
}
@Override
public JPanel getEastDownPane() {
return new JPanel();
}
};
}

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

@ -19,6 +19,7 @@ import com.fr.design.actions.file.SaveAsTemplateAction;
import com.fr.design.actions.file.SaveTemplateAction;
import com.fr.design.actions.file.WebPreviewUtils;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.designer.DesignerProxy;
import com.fr.design.designer.TargetComponent;
import com.fr.design.dialog.InformationWarnPane;
import com.fr.design.file.HistoryTemplateListPane;
@ -71,7 +72,7 @@ import java.util.regex.Pattern;
/**
* 报表设计和表单设计的编辑区域(设计器编辑的IO文件)
*/
public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>> extends TargetComponent<T> implements ToolBarMenuDockPlus, JTemplateProvider {
public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>> extends TargetComponent<T> implements ToolBarMenuDockPlus, JTemplateProvider, DesignerProxy {
// TODO ALEX_SEP editingFILE这个属性一定要吗?如果非要不可,有没有可能保证不为null
private static final int PREFIX_NUM = 3000;
private FILE editingFILE = null;

5
designer-form/src/main/java/com/fr/design/designer/beans/actions/CopyAction.java

@ -24,10 +24,7 @@ public class CopyAction extends FormWidgetEditAction {
@Override
public boolean executeActionReturnUndoRecordNeeded() {
FormDesigner tc = getEditingComponent();
if (tc != null) {
tc.copy();
}
DesignModeContext.doCopy(getEditingComponent());
return false;
}
}

6
designer-form/src/main/java/com/fr/design/designer/beans/actions/CutAction.java

@ -24,10 +24,6 @@ public class CutAction extends FormWidgetEditAction {
@Override
public boolean executeActionReturnUndoRecordNeeded() {
FormDesigner editPane = getEditingComponent();
if (editPane == null) {
return false;
}
return editPane.cut();
return DesignModeContext.doCut(getEditingComponent());
}
}

46
designer-form/src/main/java/com/fr/design/designer/beans/actions/PasteAction.java

@ -1,36 +1,32 @@
package com.fr.design.designer.beans.actions;
import java.awt.event.KeyEvent;
import javax.swing.KeyStroke;
import com.fr.base.BaseUtils;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.mainframe.FormDesigner;
import javax.swing.KeyStroke;
import java.awt.event.KeyEvent;
import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_MODIFIER;
public class PasteAction extends FormWidgetEditAction {
public PasteAction(FormDesigner t) {
super(t);
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Edit_Paste"));
this.setMnemonic('P');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER));
}
@Override
public boolean executeActionReturnUndoRecordNeeded() {
FormDesigner tc = getEditingComponent();
if (tc == null) {
return false;
}
return tc.paste();
}
@Override
public void update() {
this.setEnabled(true);
}
public PasteAction(FormDesigner t) {
super(t);
this.setName(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Basic_M_Edit_Paste"));
this.setMnemonic('P');
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_edit/paste.png"));
this.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, DEFAULT_MODIFIER));
}
@Override
public boolean executeActionReturnUndoRecordNeeded() {
return DesignModeContext.doPaste(getEditingComponent());
}
@Override
public void update() {
this.setEnabled(true);
}
}

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

@ -428,10 +428,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
*/
@Override
public void copy() {
if (DesignModeContext.isBanCopyAndCut()) {
return;
}
this.formDesign.copy();
DesignModeContext.doCopy(this.formDesign);
}
@ -442,7 +439,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
*/
@Override
public boolean paste() {
return this.formDesign.paste();
return DesignModeContext.doPaste(this.formDesign);
}
@ -453,10 +450,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
*/
@Override
public boolean cut() {
if (DesignModeContext.isBanCopyAndCut()) {
return false;
}
return this.formDesign.cut();
return DesignModeContext.doCut(this.formDesign);
}
// ////////////////////////////////////////////////////////////////////

17
designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java

@ -141,7 +141,7 @@ import static com.fr.design.gui.syntax.ui.rtextarea.RTADefaultInputMap.DEFAULT_M
*/
public abstract class ElementCasePane<T extends TemplateElementCase> extends TargetComponent<T> implements Selectedable<Selection>, PageAttributeGetter {
public static enum Clear {
public enum Clear {
ALL, FORMATS, CONTENTS, WIDGETS
}
@ -174,7 +174,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
private CellSelection formatReferencedCell = null;
private CellSelection cellNeedTOFormat = null;
private FormatBrushAction formatBrushAction;
ActionListener keyListener = new ActionListener() {
private ActionListener keyListener = new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (!formatBrush.isSelected()) {
DesignerContext.setFormatState(DesignerContext.FORMAT_STATE_ONCE);
@ -188,7 +188,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
}
}
};
ActionListener escKey = new ActionListener() {
private ActionListener escKey = new ActionListener() {
public void actionPerformed(ActionEvent e) {
cancelFormatBrush();
}
@ -519,10 +519,6 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
}
@Override
/**
* 加下面的判断是因为聚合报表>>添加报表聚合块>>选中B1单元格>>再选中该聚合块>>再选中B1单元格发现属性表右下侧还是现实的聚合块的属性
* 因为这边判断selection是一个selection所以不会触发fireSelectionChanged
*/
public void setSelection(Selection selection) {
if (!ComparatorUtils.equals(this.selection, selection) ||
!ComparatorUtils.equals(EastRegionContainerPane.getInstance().getCellAttrPane(), CellElementPropertyPane.getInstance())) {
@ -566,7 +562,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
}
Style style = cellElement.getStyle();
if (style == null) {
style = style.DEFAULT_STYLE;
style = Style.DEFAULT_STYLE;
}
referencedStyle[i][j] = style;
@ -583,9 +579,6 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
@Override
/**
*
*/
public Selection getSelection() {
return selection;
}
@ -596,7 +589,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
* @return 是则返回true
*/
public boolean isSelectedOneCell() {
return (selection == null) ? false : selection.isSelectedOneCell(this);
return (selection != null) && selection.isSelectedOneCell(this);
}
/**

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

@ -569,10 +569,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
*/
@Override
public void copy() {
if (DesignModeContext.isBanCopyAndCut()) {
return;
}
this.delegate4ToolbarMenuAdapter().copy();
DesignModeContext.doCopy(this.delegate4ToolbarMenuAdapter());
}
/**
@ -582,10 +579,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
*/
@Override
public boolean cut() {
if (DesignModeContext.isBanCopyAndCut()) {
return false;
}
return this.delegate4ToolbarMenuAdapter().cut();
return DesignModeContext.doCut(this.delegate4ToolbarMenuAdapter());
}
/**
@ -595,7 +589,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
*/
@Override
public boolean paste() {
return this.delegate4ToolbarMenuAdapter().paste();
return DesignModeContext.doPaste(this.delegate4ToolbarMenuAdapter());
}
/**

7
designer-realize/src/main/java/com/fr/design/mainframe/ReportComponent.java

@ -3,7 +3,6 @@
*/
package com.fr.design.mainframe;
import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.AllowAuthorityEditAction;
import com.fr.design.actions.ExitAuthorityEditAction;
@ -11,13 +10,11 @@ import com.fr.design.actions.report.ReportBackgroundAction;
import com.fr.design.actions.report.ReportFooterAction;
import com.fr.design.actions.report.ReportHeaderAction;
import com.fr.design.actions.report.ReportPageSetupAction;
import com.fr.design.actions.report.ReportWatermarkAction;
import com.fr.design.designer.TargetComponent;
import com.fr.design.menu.NameSeparator;
import com.fr.design.menu.ShortCut;
import com.fr.design.selection.SelectableElement;
import com.fr.design.selection.Selectedable;
import com.fr.report.report.TemplateReport;
import javax.swing.JScrollBar;
@ -28,9 +25,11 @@ import javax.swing.JScrollBar;
*/
public abstract class ReportComponent<T extends TemplateReport, E extends ElementCasePane, S extends SelectableElement> extends TargetComponent<T> implements Selectedable<S> {
protected E elementCasePane;
public E getEditingElementCasePane() {
return elementCasePane;
}
public ReportComponent(T t) {
super(t);
}
@ -39,6 +38,7 @@ public abstract class ReportComponent<T extends TemplateReport, E extends Elemen
public T getTemplateReport() {
return this.getTarget();
}
public abstract JScrollBar getHorizontalScrollBar();
public abstract JScrollBar getVerticalScrollBar();
@ -62,7 +62,6 @@ public abstract class ReportComponent<T extends TemplateReport, E extends Elemen
}
public void cancelFormat() {
return;
}

19
designer-realize/src/main/java/com/fr/design/mainframe/WorkSheetDesigner.java

@ -7,6 +7,7 @@ import com.fr.design.actions.report.ReportEngineAttrAction;
import com.fr.design.actions.report.ReportPageAttrAction;
import com.fr.design.actions.report.ReportWriteAttrAction;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.designer.DesignerProxy;
import com.fr.design.designer.EditingState;
import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener;
@ -29,7 +30,7 @@ import javax.swing.JPanel;
import javax.swing.JScrollBar;
import java.awt.BorderLayout;
public class WorkSheetDesigner extends ReportComponent<WorkSheet, ElementCasePaneDelegate, Selection> {
public class WorkSheetDesigner extends ReportComponent<WorkSheet, ElementCasePaneDelegate, Selection> implements DesignerProxy {
private static final int HUND = 100;
@ -81,23 +82,17 @@ public class WorkSheetDesigner extends ReportComponent<WorkSheet, ElementCasePan
@Override
public void copy() {
if (DesignModeContext.isBanCopyAndCut()) {
return;
}
this.elementCasePane.copy();
DesignModeContext.doCopy(this.elementCasePane);
}
@Override
public boolean paste() {
return this.elementCasePane.paste();
return DesignModeContext.doPaste(this.elementCasePane);
}
@Override
public boolean cut() {
if (DesignModeContext.isBanCopyAndCut()) {
return false;
}
return this.elementCasePane.cut();
return DesignModeContext.doCut(this.elementCasePane);
}
@Override
@ -117,7 +112,7 @@ public class WorkSheetDesigner extends ReportComponent<WorkSheet, ElementCasePan
@Override
public ShortCut[] shortcut4TemplateMenu() {
return (ShortCut[]) ArrayUtils.addAll(super.shortcut4TemplateMenu(), new ShortCut[]{
return ArrayUtils.addAll(super.shortcut4TemplateMenu(), new ShortCut[]{
new DottedSeparator(),
new ReportWriteAttrAction(this),
new ReportColumnsAction(this),
@ -199,8 +194,6 @@ public class WorkSheetDesigner extends ReportComponent<WorkSheet, ElementCasePan
@Override
public void removeSelectionChangeListener(SelectionListener selectionListener) {
elementCasePane.removeSelectionChangeListener(selectionListener);
}
}

18
designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java

@ -9,6 +9,7 @@ import com.fr.design.DesignState;
import com.fr.design.actions.AllowAuthorityEditAction;
import com.fr.design.actions.ExitAuthorityEditAction;
import com.fr.design.base.mode.DesignModeContext;
import com.fr.design.designer.DesignerProxy;
import com.fr.design.designer.EditingState;
import com.fr.design.designer.TargetComponent;
import com.fr.design.event.TargetModifiedEvent;
@ -49,7 +50,10 @@ import java.awt.image.BufferedImage;
/**
* 表单中的ElementCase编辑面板
*/
public class FormElementCaseDesigner<T extends FormElementCaseProvider, E extends ElementCasePane, S extends SelectableElement> extends TargetComponent<T> implements Selectedable<S>, FormECDesignerProvider {
public class FormElementCaseDesigner
<T extends FormElementCaseProvider, E extends ElementCasePane, S extends SelectableElement>
extends TargetComponent<T>
implements Selectedable<S>, FormECDesignerProvider, DesignerProxy {
protected FormElementCasePaneDelegate elementCasePane;
@Override
@ -167,10 +171,7 @@ public class FormElementCaseDesigner<T extends FormElementCaseProvider, E extend
*/
@Override
public void copy() {
if (DesignModeContext.isBanCopyAndCut()) {
return;
}
this.elementCasePane.copy();
DesignModeContext.doCopy(elementCasePane);
}
/**
@ -180,7 +181,7 @@ public class FormElementCaseDesigner<T extends FormElementCaseProvider, E extend
*/
@Override
public boolean paste() {
return this.elementCasePane.paste();
return DesignModeContext.doPaste(elementCasePane);
}
/**
@ -190,10 +191,7 @@ public class FormElementCaseDesigner<T extends FormElementCaseProvider, E extend
*/
@Override
public boolean cut() {
if (DesignModeContext.isBanCopyAndCut()) {
return false;
}
return this.elementCasePane.cut();
return DesignModeContext.doCut(elementCasePane);
}
/**

31
designer-realize/src/main/java/com/fr/poly/PolyDesigner.java

@ -167,7 +167,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
});
}
MouseWheelListener mouseWheelListener = new MouseWheelListener() {
private MouseWheelListener mouseWheelListener = new MouseWheelListener() {
@Override
public void mouseWheelMoved(MouseWheelEvent evt) {
int id = evt.getID();
@ -367,9 +367,6 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
}
@Override
/**
*
*/
public BlockCreator getSelection() {
return selection;
}
@ -378,9 +375,6 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
* 选中一个聚合快
*/
@Override
/**
* 选中一个聚合快
*/
public void setSelection(BlockCreator selectElement) {
//聚合块不参加权限编辑
@ -461,17 +455,14 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
}
@Override
/**
*
*/
public short getRulerLengthUnit() {
return DesignerEnvManager.getEnvManager().getReportLengthUnit();
}
@Override
/**
* 复制
*/
@Override
public void copy() {
if (DesignModeContext.isBanCopyAndCut()) {
return;
@ -650,9 +641,6 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
@Override
/**
* Gets horizontal scroll bar
*/
public JScrollBar getHorizontalScrollBar() {
return this.horScrollBar;
}
@ -665,32 +653,28 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
}
@Override
/**
*
*/
public int getMinWidth() {
return ReportHelper.calculateOccupiedArea(getTarget()).width.toPixI(resolution);
}
@Override
/**
/*
*
*/
public int getMinHeight() {
return ReportHelper.calculateOccupiedArea(getTarget()).width.toPixI(resolution);
}
@Override
/**
*
*/
@Override
public int getDesignerHeight() {
return this.getHeight();
}
@Override
/**
*
/*
*/
public int getDesignerWidth() {
return this.getWidth();
@ -810,7 +794,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
* @return 子菜单
*/
public ShortCut[] shortcut4TemplateMenu() {
return (ShortCut[]) ArrayUtils.addAll(super.shortcut4TemplateMenu(), new ShortCut[]{});
return ArrayUtils.addAll(super.shortcut4TemplateMenu(), new ShortCut[]{});
}
public int getMenuState() {
@ -872,9 +856,6 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
}
@Override
/**
*
*/
public BlockCreator getDefaultSelectElement() {
return null;
}

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

@ -4,17 +4,19 @@
package com.fr.poly.creator;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.edit.HyperlinkAction;
import com.fr.design.menu.KeySetUtils;
import com.fr.page.ReportSettingsProvider;
import com.fr.design.DesignState;
import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.cell.*;
import com.fr.design.actions.cell.CellAttributeAction;
import com.fr.design.actions.cell.CellExpandAttrAction;
import com.fr.design.actions.cell.CellWidgetAttrAction;
import com.fr.design.actions.cell.ConditionAttributesAction;
import com.fr.design.actions.cell.GlobalStyleMenuDef;
import com.fr.design.actions.columnrow.InsertColumnAction;
import com.fr.design.actions.columnrow.InsertRowAction;
import com.fr.design.actions.core.ActionFactory;
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.columnrow.InsertColumnAction;
import com.fr.design.actions.columnrow.InsertRowAction;
import com.fr.design.actions.utils.DeprecatedActionManager;
import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener;
@ -22,18 +24,19 @@ import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.mainframe.AuthorityPropertyPane;
import com.fr.design.mainframe.CellElementPropertyPane;
import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.DesignState;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.design.mainframe.NoSupportAuthorityEdit;
import com.fr.design.menu.KeySetUtils;
import com.fr.design.menu.MenuDef;
import com.fr.design.menu.SeparatorDef;
import com.fr.design.mainframe.ElementCasePane;
import com.fr.poly.PolyDesigner;
import com.fr.report.poly.PolyECBlock;
import com.fr.design.selection.SelectionEvent;
import com.fr.design.selection.SelectionListener;
import com.fr.page.ReportSettingsProvider;
import com.fr.poly.PolyDesigner;
import com.fr.report.poly.PolyECBlock;
import com.fr.stable.ArrayUtils;
import com.fr.design.mainframe.NoSupportAuthorityEdit;
import java.awt.*;
import java.awt.Dimension;
/**
* @author richer
@ -77,10 +80,10 @@ public class ECBlockPane extends PolyElementCasePane {
@Override
public void targetModified(TargetModifiedEvent e) {
// kunsnat: 没有找到相关作用,bug 35286 在图表聚合触发重新populate, 导致界面又回到第一层. 故屏蔽.
// ECBlockPane.this.be.resetSelectionAndChooseState();
// bug65880
// 聚合报表单元格设置拓展的时候没有触发,普通报表有触发
CellElementPropertyPane.getInstance().populate(ECBlockPane.this);
// ECBlockPane.this.be.resetSelectionAndChooseState();
// bug65880
// 聚合报表单元格设置拓展的时候没有触发,普通报表有触发
CellElementPropertyPane.getInstance().populate(ECBlockPane.this);
}
});
}
@ -109,7 +112,7 @@ public class ECBlockPane extends PolyElementCasePane {
if (DesignerMode.isAuthorityEditing()) {
return super.menus4Target();
}
return (MenuDef[]) ArrayUtils.addAll(super.menus4Target(), new MenuDef[]{createInsertMenuDef(), createCellMenuDef()});
return ArrayUtils.addAll(super.menus4Target(), new MenuDef[]{createInsertMenuDef(), createCellMenuDef()});
}
public int getMenuState() {

Loading…
Cancel
Save