Browse Source

REPORT-9221

10.0插件兼容-版本管理
final/10.0
hzzz 6 years ago
parent
commit
eca7394dbc
  1. 3
      designer-base/src/main/java/com/fr/design/DesignState.java
  2. 82
      designer-base/src/main/java/com/fr/design/actions/AllowAuthorityEditAction.java
  3. 5
      designer-base/src/main/java/com/fr/design/actions/ExitAuthorityEditAction.java
  4. 7
      designer-base/src/main/java/com/fr/design/gui/ibutton/UISliderButtonUI.java
  5. 3
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java
  6. 9
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java
  7. 5
      designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java
  8. 10
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrame.java
  9. 13
      designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java
  10. 12
      designer-base/src/main/java/com/fr/design/mainframe/JTemplate.java
  11. 5
      designer-base/src/main/java/com/fr/design/mainframe/UndoStateEdit.java
  12. 1
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java
  13. 1
      designer-base/src/main/java/com/fr/design/mainframe/toolbar/VcsScene.java
  14. 3
      designer-base/src/main/java/com/fr/design/roleAuthority/ReportAndFSManagePane.java
  15. 9
      designer-base/src/main/java/com/fr/design/utils/gui/GUIPaintUtils.java
  16. 1
      designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java
  17. 1
      designer-form/src/main/java/com/fr/design/mainframe/FormDesigner.java
  18. 3
      designer-form/src/main/java/com/fr/design/mainframe/FormDesignerUI.java
  19. 3
      designer-form/src/main/java/com/fr/design/mainframe/FormToolBarButton.java
  20. 8
      designer-form/src/main/java/com/fr/design/mainframe/JForm.java
  21. 3
      designer-form/src/main/java/com/fr/design/mainframe/ShareWidgetButton.java
  22. 3
      designer-form/src/main/java/com/fr/design/mainframe/ToolBarButton.java
  23. 5
      designer-form/src/main/java/com/fr/design/mainframe/WidgetToolBarPane.java
  24. 9
      designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePane.java
  25. 7
      designer-realize/src/main/java/com/fr/design/mainframe/ElementCasePaneDelegate.java
  26. 10
      designer-realize/src/main/java/com/fr/design/mainframe/JWorkBook.java
  27. 3
      designer-realize/src/main/java/com/fr/design/mainframe/ReportComponent.java
  28. 3
      designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentCardPane.java
  29. 3
      designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java
  30. 3
      designer-realize/src/main/java/com/fr/design/mainframe/form/FormElementCaseDesigner.java
  31. 5
      designer-realize/src/main/java/com/fr/design/parameter/ParameterDefinitePane.java
  32. 3
      designer-realize/src/main/java/com/fr/design/webattr/ToolBarButton.java
  33. 5
      designer-realize/src/main/java/com/fr/grid/AbstractGridHeaderMouseHandler.java
  34. 3
      designer-realize/src/main/java/com/fr/grid/GridColumnUI.java
  35. 13
      designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java
  36. 3
      designer-realize/src/main/java/com/fr/grid/GridRowUI.java
  37. 3
      designer-realize/src/main/java/com/fr/grid/GridUI.java
  38. 3
      designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java
  39. 3
      designer-realize/src/main/java/com/fr/grid/selection/FloatSelection.java
  40. 3
      designer-realize/src/main/java/com/fr/poly/PolyComponetsBar.java
  41. 7
      designer-realize/src/main/java/com/fr/poly/PolyDesigner.java
  42. 3
      designer-realize/src/main/java/com/fr/poly/actions/DeleteBlockAction.java
  43. 7
      designer-realize/src/main/java/com/fr/poly/creator/ChartBlockEditor.java
  44. 3
      designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java
  45. 5
      designer-realize/src/main/java/com/fr/poly/creator/ECBlockPane.java
  46. 7
      designer-realize/src/main/java/com/fr/poly/hanlder/BottomCornerMouseHanlder.java
  47. 5
      designer-realize/src/main/java/com/fr/poly/hanlder/ColumnOperationMouseHandler.java
  48. 3
      designer-realize/src/main/java/com/fr/poly/hanlder/PolyDesignerDropTarget.java
  49. 5
      designer-realize/src/main/java/com/fr/poly/hanlder/RowOperationMouseHandler.java

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

@ -1,6 +1,7 @@
package com.fr.design; package com.fr.design;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus; import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
import com.fr.workspace.WorkContext; import com.fr.workspace.WorkContext;
@ -43,7 +44,7 @@ public class DesignState {
// designState += REMOTE; // designState += REMOTE;
// } // }
// isRoot = env != null && env.isRoot(); // isRoot = env != null && env.isRoot();
isAuthority = BaseUtils.isAuthorityEditing(); isAuthority = DesignerMode.isAuthorityEditing();
} }
public int getDesignState() { public int getDesignState() {

82
designer-base/src/main/java/com/fr/design/actions/AllowAuthorityEditAction.java

@ -1 +1,81 @@
package com.fr.design.actions; import com.fr.base.BaseUtils; import com.fr.design.constants.UIConstants; import com.fr.design.menu.KeySetUtils; import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.designer.TargetComponent; import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.mainframe.*; /** * Author : daisy * Date: 13-8-30 * Time: 上午10:12 */ public class AllowAuthorityEditAction extends TemplateComponentAction { public AllowAuthorityEditAction(TargetComponent t) { super(t); this.setMenuKeySet(KeySetUtils.ALLOW_AUTHORITY_EDIT); this.setName(getMenuKeySet().getMenuName()); this.setMnemonic(getMenuKeySet().getMnemonic()); this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/allow_authority_edit.png")); } /** * 撤销 */ public void prepare4Undo() { HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().iniAuthorityUndoState(); } /** * 执行动作 * * @return 是否执行成功 */ public boolean executeActionReturnUndoRecordNeeded() { TargetComponent tc = getEditingComponent(); if (tc == null) { return false; } cleanAuthorityCondition(); //进入时是格式刷则取消格式刷 if (DesignerContext.getFormatState() != DesignerContext.FORMAT_STATE_NULL) { tc.cancelFormat(); } BaseUtils.setAuthorityEditing(true); ReportAndFSManagePane.getInstance().refreshDockingView(); RolesAlreadyEditedPane.getInstance().refreshDockingView(); WestRegionContainerPane.getInstance().replaceDownPane(ReportAndFSManagePane.getInstance()); DesignerContext.getDesignerFrame().setCloseMode(UIConstants.CLOSE_OF_AUTHORITY); DesignerContext.getDesignerFrame().resetToolkitByPlus(tc.getToolBarMenuDockPlus()); DesignerContext.getDesignerFrame().needToAddAuhtorityPaint(); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION); EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(tc.getEastUpPane()); DesignerContext.getDesignerFrame().refreshDottedLine(); EastRegionContainerPane.getInstance().replaceConfiguredRolesPane(RolesAlreadyEditedPane.getInstance()); EastRegionContainerPane.getInstance().removeParameterPane(); //画虚线 return true; } /** * 进入权限编辑之前将权限编辑界面重置一下工具栏 */ private void cleanAuthorityCondition() { java.util.List<JTemplate<?, ?>> opendedTemplate = HistoryTemplateListPane.getInstance().getHistoryList(); for (int i = 0; i < opendedTemplate.size(); i++) { opendedTemplate.get(i).cleanAuthorityUndo(); } } } package com.fr.design.actions;
import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants;
import com.fr.design.menu.KeySetUtils;
import com.fr.design.roleAuthority.ReportAndFSManagePane;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
import com.fr.design.designer.TargetComponent;
import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.mainframe.*;
/**
* Author : daisy
* Date: 13-8-30
* Time: 上午10:12
*/
public class AllowAuthorityEditAction extends TemplateComponentAction {
public AllowAuthorityEditAction(TargetComponent t) {
super(t);
this.setMenuKeySet(KeySetUtils.ALLOW_AUTHORITY_EDIT);
this.setName(getMenuKeySet().getMenuName());
this.setMnemonic(getMenuKeySet().getMnemonic());
this.setSmallIcon(BaseUtils.readIcon("/com/fr/design/images/m_report/allow_authority_edit.png"));
}
/**
* 撤销
*/
public void prepare4Undo() {
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().iniAuthorityUndoState();
}
/**
* 执行动作
*
* @return 是否执行成功
*/
public boolean executeActionReturnUndoRecordNeeded() {
TargetComponent tc = getEditingComponent();
if (tc == null) {
return false;
}
cleanAuthorityCondition();
//进入时是格式刷则取消格式刷
if (DesignerContext.getFormatState() != DesignerContext.FORMAT_STATE_NULL) {
tc.cancelFormat();
}
DesignerMode.setMode(DesignerMode.AUTHORITY);
ReportAndFSManagePane.getInstance().refreshDockingView();
RolesAlreadyEditedPane.getInstance().refreshDockingView();
WestRegionContainerPane.getInstance().replaceDownPane(ReportAndFSManagePane.getInstance());
DesignerContext.getDesignerFrame().setCloseMode(UIConstants.CLOSE_OF_AUTHORITY);
DesignerContext.getDesignerFrame().resetToolkitByPlus(tc.getToolBarMenuDockPlus());
DesignerContext.getDesignerFrame().needToAddAuhtorityPaint();
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION);
EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(tc.getEastUpPane());
DesignerContext.getDesignerFrame().refreshDottedLine();
EastRegionContainerPane.getInstance().replaceConfiguredRolesPane(RolesAlreadyEditedPane.getInstance());
EastRegionContainerPane.getInstance().removeParameterPane();
//画虚线
return true;
}
/**
* 进入权限编辑之前将权限编辑界面重置一下工具栏
*/
private void cleanAuthorityCondition() {
java.util.List<JTemplate<?, ?>> opendedTemplate = HistoryTemplateListPane.getInstance().getHistoryList();
for (int i = 0; i < opendedTemplate.size(); i++) {
opendedTemplate.get(i).cleanAuthorityUndo();
}
}
}

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

@ -1,6 +1,7 @@
package com.fr.design.actions; package com.fr.design.actions;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.data.datapane.TableDataTreePane; import com.fr.design.data.datapane.TableDataTreePane;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.designer.TargetComponent; import com.fr.design.designer.TargetComponent;
@ -33,8 +34,8 @@ public class ExitAuthorityEditAction extends TemplateComponentAction {
return false; return false;
} }
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
BaseUtils.setAuthorityEditing(false); DesignerMode.setMode(DesignerMode.NORMARL);
WestRegionContainerPane.getInstance().replaceDownPane(TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter())); WestRegionContainerPane.getInstance().replaceDownPane(TableDataTreePane.getInstance(DesignModelAdapter.getCurrentModelAdapter()));
HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane(); HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().refreshEastPropertiesPane();
DesignerContext.getDesignerFrame().resetToolkitByPlus(tc.getToolBarMenuDockPlus()); DesignerContext.getDesignerFrame().resetToolkitByPlus(tc.getToolBarMenuDockPlus());

7
designer-base/src/main/java/com/fr/design/gui/ibutton/UISliderButtonUI.java

@ -13,6 +13,7 @@ import javax.swing.plaf.basic.BasicHTML;
import javax.swing.text.View; import javax.swing.text.View;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.roleAuthority.ReportAndFSManagePane; import com.fr.design.roleAuthority.ReportAndFSManagePane;
import com.fr.stable.Constants; import com.fr.stable.Constants;
@ -174,7 +175,7 @@ public class UISliderButtonUI extends BasicButtonUI {
private void fillNormal(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted) { private void fillNormal(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted) {
GradientPaint gp; GradientPaint gp;
if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { if (DesignerMode.isAuthorityEditing() && isAuthorityEdited) {
gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.AUTHORITY_DARK_BLUE); gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.AUTHORITY_DARK_BLUE);
} else if (isPressedPainted) { } else if (isPressedPainted) {
gp = new GradientPaint(1, 1, UIConstants.SELECT_TAB, 1, height - 1, UIConstants.SELECT_TAB); gp = new GradientPaint(1, 1, UIConstants.SELECT_TAB, 1, height - 1, UIConstants.SELECT_TAB);
@ -187,7 +188,7 @@ public class UISliderButtonUI extends BasicButtonUI {
private void fillRollOver(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted) { private void fillRollOver(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted) {
GradientPaint gp; GradientPaint gp;
if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { if (DesignerMode.isAuthorityEditing() && isAuthorityEdited) {
gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.HOVER_BLUE); gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.HOVER_BLUE);
} else if (isPressedPainted) { } else if (isPressedPainted) {
gp = new GradientPaint(1, 1, UIConstants.POP_DIALOG_BORDER, 1, height - 1, UIConstants.POP_DIALOG_BORDER); gp = new GradientPaint(1, 1, UIConstants.POP_DIALOG_BORDER, 1, height - 1, UIConstants.POP_DIALOG_BORDER);
@ -199,7 +200,7 @@ public class UISliderButtonUI extends BasicButtonUI {
private void fillPressed(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited) { private void fillPressed(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited) {
Color oldColor = g2d.getColor(); Color oldColor = g2d.getColor();
if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { if (DesignerMode.isAuthorityEditing() && isAuthorityEdited) {
g2d.setColor(UIConstants.AUTHORITY_PRESS_BLUE); g2d.setColor(UIConstants.AUTHORITY_PRESS_BLUE);
} else { } else {
g2d.setColor(UIConstants.POP_DIALOG_BORDER); g2d.setColor(UIConstants.POP_DIALOG_BORDER);

3
designer-base/src/main/java/com/fr/design/gui/icontainer/UIEastResizableContainer.java

@ -1,6 +1,7 @@
package com.fr.design.gui.icontainer; package com.fr.design.gui.icontainer;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
@ -281,7 +282,7 @@ public class UIEastResizableContainer extends JPanel {
} }
onResize(); onResize();
refreshContainer(); refreshContainer();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
DesignerContext.getDesignerFrame().doResize(); DesignerContext.getDesignerFrame().doResize();
} }
} }

9
designer-base/src/main/java/com/fr/design/gui/icontainer/UIModeControlContainer.java

@ -1,6 +1,7 @@
package com.fr.design.gui.icontainer; package com.fr.design.gui.icontainer;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -72,7 +73,7 @@ public class UIModeControlContainer extends JLayeredPane {
public void needToShowCoverAndHidPane() { public void needToShowCoverAndHidPane() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
this.remove(coverPane); this.remove(coverPane);
this.remove(hidePane); this.remove(hidePane);
} else { } else {
@ -115,7 +116,7 @@ public class UIModeControlContainer extends JLayeredPane {
if (isHideMode || !upEditMode) { if (isHideMode || !upEditMode) {
return; return;
} }
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
setCursor(Cursor.getPredefinedCursor(Cursor.N_RESIZE_CURSOR)); setCursor(Cursor.getPredefinedCursor(Cursor.N_RESIZE_CURSOR));
@ -142,7 +143,7 @@ public class UIModeControlContainer extends JLayeredPane {
@Override @Override
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
boolean notUpEditMode = isHideMode || !upEditMode; boolean notUpEditMode = isHideMode || !upEditMode;
@ -183,7 +184,7 @@ public class UIModeControlContainer extends JLayeredPane {
setUpPaneHeight(0); setUpPaneHeight(0);
} }
if (BaseUtils.isAuthorityEditing() && isSheeetCovered) { if (DesignerMode.isAuthorityEditing() && isSheeetCovered) {
sheetInvisibleCoverPane.setBounds(0, toolPaneY + toolPaneHeight + UIConstants.SIZE, getWidth(), getHeight() - toolPaneY - toolPaneHeight - sheetCorverGap); sheetInvisibleCoverPane.setBounds(0, toolPaneY + toolPaneHeight + UIConstants.SIZE, getWidth(), getHeight() - toolPaneY - toolPaneHeight - sheetCorverGap);
UIModeControlContainer.this.add(sheetInvisibleCoverPane); UIModeControlContainer.this.add(sheetInvisibleCoverPane);
UIModeControlContainer.this.setLayer(sheetInvisibleCoverPane, 2); UIModeControlContainer.this.setLayer(sheetInvisibleCoverPane, 2);

5
designer-base/src/main/java/com/fr/design/gui/icontainer/UIResizableContainer.java

@ -1,6 +1,7 @@
package com.fr.design.gui.icontainer; package com.fr.design.gui.icontainer;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.stable.Constants; import com.fr.stable.Constants;
@ -443,7 +444,7 @@ public class UIResizableContainer extends JPanel {
containerWidth = toolPaneHeight; containerWidth = toolPaneHeight;
} }
refreshContainer(); refreshContainer();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
DesignerContext.getDesignerFrame().doResize(); DesignerContext.getDesignerFrame().doResize();
} }
@ -476,7 +477,7 @@ public class UIResizableContainer extends JPanel {
containerWidth = toolPaneHeight; containerWidth = toolPaneHeight;
} }
refreshContainer(); refreshContainer();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
DesignerContext.getDesignerFrame().doResize(); DesignerContext.getDesignerFrame().doResize();
} }
} }

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

@ -306,7 +306,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
public void componentResized(ComponentEvent e) { public void componentResized(ComponentEvent e) {
reCalculateFrameSize(); reCalculateFrameSize();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
doResize(); doResize();
} }
} }
@ -529,7 +529,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
*/ */
public void refreshDottedLine() { public void refreshDottedLine() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
populateAuthorityArea(); populateAuthorityArea();
populateCloseButton(); populateCloseButton();
addDottedLine(); addDottedLine();
@ -592,7 +592,7 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
for (int i = 0; i < fixButtons.length; i++) { for (int i = 0; i < fixButtons.length; i++) {
combineUp.add(fixButtons[i]); combineUp.add(fixButtons[i]);
} }
if (!BaseUtils.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
combineUp.addSeparator(new Dimension(2, 16)); combineUp.addSeparator(new Dimension(2, 16));
if (toolbar4Form != null) { if (toolbar4Form != null) {
for (int i = 0; i < toolbar4Form.length; i++) { for (int i = 0; i < toolbar4Form.length; i++) {
@ -709,13 +709,13 @@ public class DesignerFrame extends JFrame implements JTemplateActionListener, Ta
*/ */
public void needToAddAuhtorityPaint() { public void needToAddAuhtorityPaint() {
newWorkBookPane.setButtonGray(BaseUtils.isAuthorityEditing()); newWorkBookPane.setButtonGray(DesignerMode.isAuthorityEditing());
// 进入或退出权限编辑模式,通知插件 // 进入或退出权限编辑模式,通知插件
Set<ShortCut> extraShortCuts = ExtraDesignClassManager.getInstance().getExtraShortCuts(); Set<ShortCut> extraShortCuts = ExtraDesignClassManager.getInstance().getExtraShortCuts();
for (ShortCut shortCut : extraShortCuts) { for (ShortCut shortCut : extraShortCuts) {
if (shortCut instanceof AbstractTemplateTreeShortCutProvider) { if (shortCut instanceof AbstractTemplateTreeShortCutProvider) {
((AbstractTemplateTreeShortCutProvider) shortCut).notifyFromAuhtorityChange(BaseUtils.isAuthorityEditing()); ((AbstractTemplateTreeShortCutProvider) shortCut).notifyFromAuhtorityChange(DesignerMode.isAuthorityEditing());
} }
} }
} }

13
designer-base/src/main/java/com/fr/design/mainframe/DesignerFrameFileDealerPane.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
@ -68,13 +69,11 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
private CardLayout card; private CardLayout card;
private JPanel cardPane; private JPanel cardPane;
private java.util.List<FileToolbarStateChangeListener> otherToobarStateChangeListeners= new ArrayList<>();
public FileOperations getSelectedOperation() { private java.util.List<FileToolbarStateChangeListener> otherToobarStateChangeListeners = new ArrayList<>();
return selectedOperation;
}
private FileOperations selectedOperation; private FileOperations selectedOperation;
private UIToolbar toolBar; private UIToolbar toolBar;
private OpenReportAction openReportAction = new OpenReportAction(); private OpenReportAction openReportAction = new OpenReportAction();
@ -143,7 +142,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
HistoryTemplateListPane.getInstance().setCurrentEditingTemplate(jt); HistoryTemplateListPane.getInstance().setCurrentEditingTemplate(jt);
//处理自动新建的模板 //处理自动新建的模板
MutilTempalteTabPane.getInstance().doWithtemTemplate(); MutilTempalteTabPane.getInstance().doWithtemTemplate();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
RolesAlreadyEditedPane.getInstance().refreshDockingView(); RolesAlreadyEditedPane.getInstance().refreshDockingView();
} }
@ -341,6 +340,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
delFileAction.setEnabled(true); delFileAction.setEnabled(true);
} }
otherStateChange();
} }
/** /**
@ -606,4 +606,7 @@ public class DesignerFrameFileDealerPane extends JPanel implements FileToolbarSt
return null; return null;
} }
public FileOperations getSelectedOperation() {
return selectedOperation;
}
} }

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

@ -276,7 +276,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
* @return 是则返回true * @return 是则返回true
*/ */
public boolean isSaved() { public boolean isSaved() {
return BaseUtils.isAuthorityEditing() ? this.authoritySaved : this.saved; return DesignerMode.isAuthorityEditing() ? this.authoritySaved : this.saved;
} }
/** /**
@ -299,7 +299,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
} }
public void setSaved(boolean isSaved) { public void setSaved(boolean isSaved) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
authoritySaved = isSaved; authoritySaved = isSaved;
} else { } else {
saved = isSaved; saved = isSaved;
@ -310,7 +310,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
* @return * @return
*/ */
public UndoManager getUndoManager() { public UndoManager getUndoManager() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
if (this.authorityUndoManager == null) { if (this.authorityUndoManager == null) {
this.authorityUndoManager = new UndoManager(); this.authorityUndoManager = new UndoManager();
int limit = DesignerEnvManager.getEnvManager().getUndoLimit(); int limit = DesignerEnvManager.getEnvManager().getUndoLimit();
@ -385,7 +385,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
return; return;
} }
//如果是在不同的模式下产生的 //如果是在不同的模式下产生的
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
this.getUndoManager().addEdit(new UndoStateEdit(authorityUndoState, newState)); this.getUndoManager().addEdit(new UndoStateEdit(authorityUndoState, newState));
authorityUndoState = newState; authorityUndoState = newState;
} else { } else {
@ -414,7 +414,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
} }
private void fireSuperTargetModified() { private void fireSuperTargetModified() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
this.authoritySaved = false; this.authoritySaved = false;
} else { } else {
this.saved = false; this.saved = false;
@ -720,7 +720,7 @@ public abstract class JTemplate<T extends BaseBook, U extends BaseUndoState<?>>
public MenuDef[] menus4Target() { public MenuDef[] menus4Target() {
MenuDef tplMenu = new MenuDef(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_M-Template"), 'T'); MenuDef tplMenu = new MenuDef(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_M-Template"), 'T');
tplMenu.setAnchor(MenuHandler.TEMPLATE); tplMenu.setAnchor(MenuHandler.TEMPLATE);
if (!BaseUtils.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
tplMenu.addShortCut(new NameSeparator(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_WorkBook"))); tplMenu.addShortCut(new NameSeparator(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_WorkBook")));
tplMenu.addShortCut(new TableDataSourceAction(this)); tplMenu.addShortCut(new TableDataSourceAction(this));
tplMenu.addShortCut(shortcut4TemplateMenu()); tplMenu.addShortCut(shortcut4TemplateMenu());

5
designer-base/src/main/java/com/fr/design/mainframe/UndoStateEdit.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.roleAuthority.RolesAlreadyEditedPane; import com.fr.design.roleAuthority.RolesAlreadyEditedPane;
@ -52,7 +53,7 @@ public class UndoStateEdit extends AbstractUndoableEdit {
if (this.old != null) { if (this.old != null) {
this.old.applyState(); this.old.applyState();
} }
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
RolesAlreadyEditedPane.getInstance().refreshDockingView(); RolesAlreadyEditedPane.getInstance().refreshDockingView();
} }
} }
@ -67,7 +68,7 @@ public class UndoStateEdit extends AbstractUndoableEdit {
if (this.cur != null) { if (this.cur != null) {
this.cur.applyState(); this.cur.applyState();
} }
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
RolesAlreadyEditedPane.getInstance().refreshDockingView(); RolesAlreadyEditedPane.getInstance().refreshDockingView();
} }
} }

1
designer-base/src/main/java/com/fr/design/mainframe/toolbar/ToolBarMenuDock.java

@ -3,6 +3,7 @@
*/ */
package com.fr.design.mainframe.toolbar; package com.fr.design.mainframe.toolbar;
import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.vcs.DesignerMode; import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignState; import com.fr.design.DesignState;

1
designer-base/src/main/java/com/fr/design/mainframe/toolbar/VcsScene.java

@ -1,5 +1,6 @@
package com.fr.design.mainframe.toolbar; package com.fr.design.mainframe.toolbar;
import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode; import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.edit.RedoAction; import com.fr.design.actions.edit.RedoAction;
import com.fr.design.actions.edit.UndoAction; import com.fr.design.actions.edit.UndoAction;

3
designer-base/src/main/java/com/fr/design/roleAuthority/ReportAndFSManagePane.java

@ -1,6 +1,7 @@
package com.fr.design.roleAuthority; package com.fr.design.roleAuthority;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.data.DesignTableDataManager; import com.fr.design.data.DesignTableDataManager;
@ -265,7 +266,7 @@ public class ReportAndFSManagePane extends DockingView implements Prepare4DataSo
DesignTableDataManager.addDsChangeListener(new ChangeListener() { DesignTableDataManager.addDsChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) { public void stateChanged(ChangeEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
roleTree.refreshTreeNode(); roleTree.refreshTreeNode();
expandTree(roleTree, true); expandTree(roleTree, true);
roleTree.updateUI(); roleTree.updateUI();

9
designer-base/src/main/java/com/fr/design/utils/gui/GUIPaintUtils.java

@ -1,6 +1,7 @@
package com.fr.design.utils.gui; package com.fr.design.utils.gui;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.stable.Constants; import com.fr.stable.Constants;
@ -17,7 +18,7 @@ public class GUIPaintUtils {
public static final void drawBorder(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited) { public static final void drawBorder(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited) {
Color oldColor = g2d.getColor(); Color oldColor = g2d.getColor();
Shape oldClip = g2d.getClip(); Shape oldClip = g2d.getClip();
if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { if (DesignerMode.isAuthorityEditing() && isAuthorityEdited) {
g2d.setColor(UIConstants.AUTHORITY_LINE_COLOR); g2d.setColor(UIConstants.AUTHORITY_LINE_COLOR);
} else { } else {
g2d.setColor(UIConstants.POP_DIALOG_BORDER); g2d.setColor(UIConstants.POP_DIALOG_BORDER);
@ -67,7 +68,7 @@ public class GUIPaintUtils {
public static final void fillNormal(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted, Color color) { public static final void fillNormal(Graphics2D g2d, int x, int y, int width, int height, boolean isRound, int rectDirection, boolean isAuthorityEdited, boolean isPressedPainted, Color color) {
GradientPaint gp; GradientPaint gp;
if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { if (DesignerMode.isAuthorityEditing() && isAuthorityEdited) {
gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.AUTHORITY_DARK_BLUE); gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.AUTHORITY_DARK_BLUE);
} else if (isPressedPainted) { } else if (isPressedPainted) {
gp = new GradientPaint(1, 1, color, 1, height - 1, color); gp = new GradientPaint(1, 1, color, 1, height - 1, color);
@ -99,7 +100,7 @@ public class GUIPaintUtils {
GradientPaint gp; GradientPaint gp;
if (hoverColor != null) { if (hoverColor != null) {
gp = new GradientPaint(1, 1, hoverColor, 1, height - 1, hoverColor); gp = new GradientPaint(1, 1, hoverColor, 1, height - 1, hoverColor);
} else if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { } else if (DesignerMode.isAuthorityEditing() && isAuthorityEdited) {
gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.HOVER_BLUE); gp = new GradientPaint(1, 1, UIConstants.AUTHORITY_BLUE, 1, height - 1, UIConstants.HOVER_BLUE);
} else if (isPressedPainted) { } else if (isPressedPainted) {
gp = new GradientPaint(1, 1, UIConstants.ATTRIBUTE_HOVER, 1, height - 1, UIConstants.ATTRIBUTE_HOVER); gp = new GradientPaint(1, 1, UIConstants.ATTRIBUTE_HOVER, 1, height - 1, UIConstants.ATTRIBUTE_HOVER);
@ -129,7 +130,7 @@ public class GUIPaintUtils {
Color oldColor = g2d.getColor(); Color oldColor = g2d.getColor();
if (pressedColor != null) { if (pressedColor != null) {
g2d.setColor(pressedColor); g2d.setColor(pressedColor);
} else if (BaseUtils.isAuthorityEditing() && isAuthorityEdited) { } else if (DesignerMode.isAuthorityEditing() && isAuthorityEdited) {
g2d.setColor(UIConstants.AUTHORITY_PRESS_BLUE); g2d.setColor(UIConstants.AUTHORITY_PRESS_BLUE);
} else { } else {
g2d.setColor(UIConstants.ATTRIBUTE_PRESS); g2d.setColor(UIConstants.ATTRIBUTE_PRESS);

1
designer-form/src/main/java/com/fr/design/designer/creator/XCreator.java

@ -3,6 +3,7 @@
*/ */
package com.fr.design.designer.creator; package com.fr.design.designer.creator;
import com.fr.base.BaseUtils;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.base.vcs.DesignerMode; import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;

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

@ -1,5 +1,6 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.BaseUtils;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode; import com.fr.base.vcs.DesignerMode;

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

@ -5,6 +5,7 @@ import com.fr.base.GraphHelper;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.base.iofile.attr.WatermarkAttr; import com.fr.base.iofile.attr.WatermarkAttr;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.designer.beans.AdapterBus; import com.fr.design.designer.beans.AdapterBus;
import com.fr.design.designer.beans.ComponentAdapter; import com.fr.design.designer.beans.ComponentAdapter;
@ -84,7 +85,7 @@ public class FormDesignerUI extends ComponentUI {
paintSelection(g); paintSelection(g);
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
paintAuthorityDetails(g, designer.getRootComponent()); paintAuthorityDetails(g, designer.getRootComponent());
} }

3
designer-form/src/main/java/com/fr/design/mainframe/FormToolBarButton.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
import com.fr.design.dialog.DialogActionAdapter; import com.fr.design.dialog.DialogActionAdapter;
import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.core.WidgetOption;
@ -102,7 +103,7 @@ public class FormToolBarButton extends JButton implements MouseListener {
//该button只在报表块工具栏中使用, //该button只在报表块工具栏中使用,
//parent只有FormToolBarPane一种,故可以直接强转 //parent只有FormToolBarPane一种,故可以直接强转
final FormToolBarPane toolBarPane = (FormToolBarPane) this.getParent(); final FormToolBarPane toolBarPane = (FormToolBarPane) this.getParent();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
auhtorityMouseAction(); auhtorityMouseAction();
return; return;
} }

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

@ -342,7 +342,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
} }
ParameterPropertyPane.getInstance().setAddParaPaneVisible(isAddParaPaneVisible(comp), this); ParameterPropertyPane.getInstance().setAddParaPaneVisible(isAddParaPaneVisible(comp), this);
editingComponent = comp.createToolPane(this, formDesign); editingComponent = comp.createToolPane(this, formDesign);
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
EastRegionContainerPane.getInstance().replaceWidgetSettingsPane( EastRegionContainerPane.getInstance().replaceWidgetSettingsPane(
ComparatorUtils.equals(editingComponent.getClass(), NoSupportAuthorityEdit.class) ? editingComponent : createAuthorityEditPane()); ComparatorUtils.equals(editingComponent.getClass(), NoSupportAuthorityEdit.class) ? editingComponent : createAuthorityEditPane());
} else { } else {
@ -580,7 +580,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
this.authorityUndoState = u; this.authorityUndoState = u;
} else { } else {
this.undoState = u; this.undoState = u;
@ -655,7 +655,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
public JPanel getEastUpPane() { public JPanel getEastUpPane() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
if (formDesign.isSupportAuthority()) { if (formDesign.isSupportAuthority()) {
return new AuthorityPropertyPane(this); return new AuthorityPropertyPane(this);
} else { } else {
@ -719,7 +719,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
DesignerContext.getDesignerFrame().resetToolkitByPlus(JForm.this); DesignerContext.getDesignerFrame().resetToolkitByPlus(JForm.this);
//表单切换后拖不进去组件是因为找不到designer //表单切换后拖不进去组件是因为找不到designer
WidgetToolBarPane.getInstance(formDesign); WidgetToolBarPane.getInstance(formDesign);
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
if (formDesign.isSupportAuthority()) { if (formDesign.isSupportAuthority()) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION);
EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(new AuthorityPropertyPane(this)); EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(new AuthorityPropertyPane(this));

3
designer-form/src/main/java/com/fr/design/mainframe/ShareWidgetButton.java

@ -2,6 +2,7 @@ package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.iofile.attr.SharableAttrMark; import com.fr.base.iofile.attr.SharableAttrMark;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.designer.creator.XCreator; import com.fr.design.designer.creator.XCreator;
import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.creator.XCreatorUtils;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
@ -199,7 +200,7 @@ public class ShareWidgetButton extends JPanel implements MouseListener, MouseMot
@Override @Override
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
if (lastPressEvent == null) { if (lastPressEvent == null) {

3
designer-form/src/main/java/com/fr/design/mainframe/ToolBarButton.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.core.WidgetOption; import com.fr.design.gui.core.WidgetOption;
import com.fr.design.designer.creator.XCreatorUtils; import com.fr.design.designer.creator.XCreatorUtils;
@ -70,7 +71,7 @@ public class ToolBarButton extends UIButton implements MouseListener, MouseMotio
@Override @Override
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
if (lastPressEvent == null) { if (lastPressEvent == null) {

5
designer-form/src/main/java/com/fr/design/mainframe/WidgetToolBarPane.java

@ -1,6 +1,7 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.bridge.DesignToolbarProvider; import com.fr.design.bridge.DesignToolbarProvider;
import com.fr.design.dialog.BasicPane; import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.core.FormWidgetOption; import com.fr.design.gui.core.FormWidgetOption;
@ -122,7 +123,7 @@ public class WidgetToolBarPane extends BasicPane implements DesignToolbarProvide
private void checkEnable() { private void checkEnable() {
for (JComponent comp : componentsList4Form) { for (JComponent comp : componentsList4Form) {
comp.setEnabled(!BaseUtils.isAuthorityEditing()); comp.setEnabled(!DesignerMode.isAuthorityEditing());
} }
} }
@ -149,7 +150,7 @@ public class WidgetToolBarPane extends BasicPane implements DesignToolbarProvide
chartButton.addMouseListener(new MouseAdapter() { chartButton.addMouseListener(new MouseAdapter() {
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
if (chartWindow == null) { if (chartWindow == null) {

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

@ -10,6 +10,7 @@ import com.fr.base.FRContext;
import com.fr.base.Formula; import com.fr.base.Formula;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.Style; import com.fr.base.Style;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.ExtraDesignClassManager; import com.fr.design.ExtraDesignClassManager;
@ -756,7 +757,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
* @return 返回是否清除内容. * @return 返回是否清除内容.
*/ */
public boolean clearContents() { public boolean clearContents() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return false; return false;
} }
boolean b = this.selection.clear(Clear.CONTENTS, this); boolean b = this.selection.clear(Clear.CONTENTS, this);
@ -1043,7 +1044,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
*/ */
public UIPopupMenu createRowPopupMenu(MouseEvent evt, int selectedRows) { public UIPopupMenu createRowPopupMenu(MouseEvent evt, int selectedRows) {
UIPopupMenu popupMenu = new UIPopupMenu(); UIPopupMenu popupMenu = new UIPopupMenu();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
popupMenu.add(new CleanAuthorityAction(this).createMenuItem()); popupMenu.add(new CleanAuthorityAction(this).createMenuItem());
return popupMenu; return popupMenu;
} }
@ -1136,7 +1137,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
public UIPopupMenu createColumnPopupMenu(MouseEvent evt, int selectedColumn) { public UIPopupMenu createColumnPopupMenu(MouseEvent evt, int selectedColumn) {
UIPopupMenu popupMenu = new UIPopupMenu(); UIPopupMenu popupMenu = new UIPopupMenu();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
popupMenu.add(new CleanAuthorityAction(this).createMenuItem()); popupMenu.add(new CleanAuthorityAction(this).createMenuItem());
return popupMenu; return popupMenu;
} }
@ -1237,7 +1238,7 @@ public abstract class ElementCasePane<T extends TemplateElementCase> extends Tar
public ShortCut[] shortCuts4Authority() { public ShortCut[] shortCuts4Authority() {
return new ShortCut[]{ return new ShortCut[]{
new NameSeparator(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"DashBoard-Potence", "Edit"})), new NameSeparator(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"DashBoard-Potence", "Edit"})),
BaseUtils.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this), DesignerMode.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this),
}; };
} }

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

@ -1,6 +1,7 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.actions.cell.CellAttributeAction; import com.fr.design.actions.cell.CellAttributeAction;
@ -51,7 +52,7 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
this.addSelectionChangeListener(new SelectionListener() { this.addSelectionChangeListener(new SelectionListener() {
@Override @Override
public void selectionChanged(SelectionEvent e) { public void selectionChanged(SelectionEvent e) {
if (!isEditable() && !BaseUtils.isAuthorityEditing()) { if (!isEditable() && !DesignerMode.isAuthorityEditing()) {
return; return;
} }
refreshPropertyPanes(); refreshPropertyPanes();
@ -71,7 +72,7 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
private void refreshPropertyPanes() { private void refreshPropertyPanes() {
//在编辑权限,所以要更新权限编辑面板 //在编辑权限,所以要更新权限编辑面板
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
AuthorityPropertyPane authorityPropertyPane = new AuthorityPropertyPane(ElementCasePaneDelegate.this); AuthorityPropertyPane authorityPropertyPane = new AuthorityPropertyPane(ElementCasePaneDelegate.this);
authorityPropertyPane.populate(); authorityPropertyPane.populate();
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION);
@ -124,7 +125,7 @@ public class ElementCasePaneDelegate extends ElementCasePane<WorkSheet> {
* @return 返回MenuDef数组. * @return 返回MenuDef数组.
*/ */
public MenuDef[] menus4Target() { public MenuDef[] menus4Target() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return super.menus4Target(); return super.menus4Target();
} }
return (MenuDef[]) ArrayUtils.addAll(super.menus4Target(), new MenuDef[]{createInsertMenuDef(), createCellMenuDef()}); return (MenuDef[]) ArrayUtils.addAll(super.menus4Target(), new MenuDef[]{createInsertMenuDef(), createCellMenuDef()});

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

@ -286,7 +286,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
if (this.getEditingElementCasePane() == null) { if (this.getEditingElementCasePane() == null) {
return JWorkBook.this; return JWorkBook.this;
} }
this.getEditingElementCasePane().getGrid().setEditable(!BaseUtils.isAuthorityEditing()); this.getEditingElementCasePane().getGrid().setEditable(!DesignerMode.isAuthorityEditing());
centerPane.needToShowCoverAndHidPane(); centerPane.needToShowCoverAndHidPane();
if (centerPane.isUpEditMode()) { if (centerPane.isUpEditMode()) {
return parameterPane; return parameterPane;
@ -317,7 +317,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
@Override @Override
public JPanel getEastUpPane() { public JPanel getEastUpPane() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return allowAuthorityUpPane(); return allowAuthorityUpPane();
} else { } else {
return exitEastUpPane(); return exitEastUpPane();
@ -682,7 +682,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
public ShortCut[] shortCuts4Authority() { public ShortCut[] shortCuts4Authority() {
return new ShortCut[]{ return new ShortCut[]{
new NameSeparator(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Permissions_Edition")), new NameSeparator(com.fr.design.i18n.Toolkit.i18nText("FR-Designer_Permissions_Edition")),
BaseUtils.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this), DesignerMode.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this),
}; };
} }
@ -728,7 +728,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
protected void applyUndoState(WorkBookUndoState u) { protected void applyUndoState(WorkBookUndoState u) {
try { try {
this.setTarget((WorkBook) u.getWorkBook().clone()); this.setTarget((WorkBook) u.getWorkBook().clone());
if (!BaseUtils.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
if (u.getAuthorityType() != BaseUndoState.NORMAL_STATE) { if (u.getAuthorityType() != BaseUndoState.NORMAL_STATE) {
applyAll(u); applyAll(u);
this.undoState = u; this.undoState = u;
@ -993,7 +993,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
} }
} }
} }
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION);
EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(allowAuthorityUpPane()); EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(allowAuthorityUpPane());
EastRegionContainerPane.getInstance().replaceConfiguredRolesPane(RolesAlreadyEditedPane.getInstance()); EastRegionContainerPane.getInstance().replaceConfiguredRolesPane(RolesAlreadyEditedPane.getInstance());

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

@ -4,6 +4,7 @@
package com.fr.design.mainframe; package com.fr.design.mainframe;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.AllowAuthorityEditAction; import com.fr.design.actions.AllowAuthorityEditAction;
import com.fr.design.actions.ExitAuthorityEditAction; import com.fr.design.actions.ExitAuthorityEditAction;
import com.fr.design.actions.report.ReportBackgroundAction; import com.fr.design.actions.report.ReportBackgroundAction;
@ -68,7 +69,7 @@ public abstract class ReportComponent<T extends TemplateReport, E extends Elemen
public ShortCut[] shortCuts4Authority() { public ShortCut[] shortCuts4Authority() {
return new ShortCut[]{ return new ShortCut[]{
new NameSeparator(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"DashBoard-Potence", "Edit"})), new NameSeparator(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"DashBoard-Potence", "Edit"})),
BaseUtils.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this), DesignerMode.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this),
}; };
} }

3
designer-realize/src/main/java/com/fr/design/mainframe/ReportComponentCardPane.java

@ -5,6 +5,7 @@ import java.awt.CardLayout;
import javax.swing.JComponent; import javax.swing.JComponent;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener; import com.fr.design.event.TargetModifiedListener;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
@ -125,7 +126,7 @@ public class ReportComponentCardPane extends JComponent implements TargetModifie
} else if (tpl instanceof PolyWorkSheet) { } else if (tpl instanceof PolyWorkSheet) {
showPoly((PolyWorkSheet) tpl); showPoly((PolyWorkSheet) tpl);
} }
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate editingTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
String selectedRoles = ReportAndFSManagePane.getInstance().getRoleTree().getSelectedRoleName(); String selectedRoles = ReportAndFSManagePane.getInstance().getRoleTree().getSelectedRoleName();
editingTemplate.setSheetCovered(tpl.getWorkSheetPrivilegeControl().checkInvisible(selectedRoles)); editingTemplate.setSheetCovered(tpl.getWorkSheetPrivilegeControl().checkInvisible(selectedRoles));

3
designer-realize/src/main/java/com/fr/design/mainframe/SheetNameTabPane.java

@ -21,6 +21,7 @@ import javax.swing.UIManager;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
@ -318,7 +319,7 @@ public class SheetNameTabPane extends JComponent implements MouseListener, Mouse
*/ */
public void paintComponent(Graphics g) { public void paintComponent(Graphics g) {
super.paintComponent(g); super.paintComponent(g);
isAuthorityEditing = BaseUtils.isAuthorityEditing(); isAuthorityEditing = DesignerMode.isAuthorityEditing();
showCount = 0; showCount = 0;
// 开始画那些Tab. // 开始画那些Tab.
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;

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

@ -5,6 +5,7 @@ package com.fr.design.mainframe.form;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.actions.AllowAuthorityEditAction; import com.fr.design.actions.AllowAuthorityEditAction;
import com.fr.design.actions.ExitAuthorityEditAction; import com.fr.design.actions.ExitAuthorityEditAction;
@ -94,7 +95,7 @@ public class FormElementCaseDesigner<T extends FormElementCaseProvider, E extend
public ShortCut[] shortCuts4Authority() { public ShortCut[] shortCuts4Authority() {
return new ShortCut[]{ return new ShortCut[]{
new NameSeparator(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"DashBoard-Potence", "Edit"})), new NameSeparator(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"DashBoard-Potence", "Edit"})),
BaseUtils.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this), DesignerMode.isAuthorityEditing() ? new ExitAuthorityEditAction(this) : new AllowAuthorityEditAction(this),
}; };
} }

5
designer-realize/src/main/java/com/fr/design/parameter/ParameterDefinitePane.java

@ -4,6 +4,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.base.parameter.ParameterUI; import com.fr.base.parameter.ParameterUI;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.actions.AllowAuthorityEditAction; import com.fr.design.actions.AllowAuthorityEditAction;
import com.fr.design.actions.ExitAuthorityEditAction; import com.fr.design.actions.ExitAuthorityEditAction;
@ -458,7 +459,7 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
* @return 文件菜单的子菜单 * @return 文件菜单的子菜单
*/ */
public ShortCut[] shortcut4FileMenu() { public ShortCut[] shortcut4FileMenu() {
return (ShortCut[]) ArrayUtils.addAll(BaseUtils.isAuthorityEditing() ? return (ShortCut[]) ArrayUtils.addAll(DesignerMode.isAuthorityEditing() ?
new ShortCut[]{new SaveTemplateAction(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()), new ShortCut[]{new SaveTemplateAction(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()),
new UndoAction(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()), new UndoAction(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate()),
new RedoAction(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate())} : new RedoAction(HistoryTemplateListPane.getInstance().getCurrentEditingTemplate())} :
@ -477,7 +478,7 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
*/ */
public MenuDef[] menus4Target() { public MenuDef[] menus4Target() {
MenuDef tplMenu = new MenuDef(KeySetUtils.TEMPLATE.getMenuKeySetName(),KeySetUtils.TEMPLATE.getMnemonic()); MenuDef tplMenu = new MenuDef(KeySetUtils.TEMPLATE.getMenuKeySetName(),KeySetUtils.TEMPLATE.getMnemonic());
if (!BaseUtils.isAuthorityEditing()) { if (!DesignerMode.isAuthorityEditing()) {
tplMenu.addShortCut(new NameSeparator(com.fr.design.i18n.Toolkit.i18nText("FR-Utils_WorkBook"))); tplMenu.addShortCut(new NameSeparator(com.fr.design.i18n.Toolkit.i18nText("FR-Utils_WorkBook")));
tplMenu.addShortCut(new ReportParameterAction(workBook)); tplMenu.addShortCut(new ReportParameterAction(workBook));
tplMenu.addShortCut(new NameSeparator(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"DashBoard-Potence", "Edit"}))); tplMenu.addShortCut(new NameSeparator(com.fr.design.i18n.Toolkit.i18nTextArray(new String[]{"DashBoard-Potence", "Edit"})));

3
designer-realize/src/main/java/com/fr/design/webattr/ToolBarButton.java

@ -1,6 +1,7 @@
package com.fr.design.webattr; package com.fr.design.webattr;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.design.dialog.BasicDialog; import com.fr.design.dialog.BasicDialog;
@ -90,7 +91,7 @@ public class ToolBarButton extends UIButton implements MouseListener {
* @param e 鼠标点击事件 * @param e 鼠标点击事件
*/ */
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
auhtorityMouseAction(); auhtorityMouseAction();
return; return;
} }

5
designer-realize/src/main/java/com/fr/grid/AbstractGridHeaderMouseHandler.java

@ -19,6 +19,7 @@ import com.fr.base.DynamicUnitList;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
import com.fr.design.gui.imenu.UIPopupMenu; import com.fr.design.gui.imenu.UIPopupMenu;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
@ -417,7 +418,7 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter {
this.setToolTipText2(this.getSelectedHeaderTooltip(Math.abs(startMultiSelectIndex - endMultiSelectIndex) + 1)); this.setToolTipText2(this.getSelectedHeaderTooltip(Math.abs(startMultiSelectIndex - endMultiSelectIndex) + 1));
} else if (dragType == GridUtils.DRAG_CELL_SIZE) { } else if (dragType == GridUtils.DRAG_CELL_SIZE) {
//权限编辑状态不可以改变行列的宽度 //权限编辑状态不可以改变行列的宽度
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
if (!(isDragPermited)) { if (!(isDragPermited)) {
@ -488,7 +489,7 @@ public abstract class AbstractGridHeaderMouseHandler extends MouseInputAdapter {
tmpIncreaseSize = sizeList.get(i).toPixD(resolution); tmpIncreaseSize = sizeList.get(i).toPixD(resolution);
tmpSize2 = tmpIncreaseSize <= 0 ? tmpSize1 + 1 : tmpSize1 + tmpIncreaseSize; tmpSize2 = tmpIncreaseSize <= 0 ? tmpSize1 + 1 : tmpSize1 + tmpIncreaseSize;
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
break; break;
} }

3
designer-realize/src/main/java/com/fr/grid/GridColumnUI.java

@ -13,6 +13,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList; import com.fr.base.DynamicUnitList;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.cache.list.IntList; import com.fr.cache.list.IntList;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
@ -132,7 +133,7 @@ public class GridColumnUI extends ComponentUI {
} }
private void drawAuthority(ElementCase elementCase, Graphics2D g2d, double tmpWidth1, double tmpIncreaseWidth, Dimension size, int i) { private void drawAuthority(ElementCase elementCase, Graphics2D g2d, double tmpWidth1, double tmpIncreaseWidth, Dimension size, int i) {
boolean isAuthorityEdited = BaseUtils.isAuthorityEditing(); boolean isAuthorityEdited = DesignerMode.isAuthorityEditing();
if (isAuthorityEdited) { if (isAuthorityEdited) {
ColumnRowPrivilegeControl cpc = elementCase.getColumnPrivilegeControl(i); ColumnRowPrivilegeControl cpc = elementCase.getColumnPrivilegeControl(i);
String selectedRoles = ReportAndFSManagePane.getInstance().getRoleTree().getSelectedRoleName(); String selectedRoles = ReportAndFSManagePane.getInstance().getRoleTree().getSelectedRoleName();

13
designer-realize/src/main/java/com/fr/grid/GridMouseAdapter.java

@ -3,6 +3,7 @@ package com.fr.grid;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList; import com.fr.base.DynamicUnitList;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
@ -157,7 +158,7 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous
* 处理左击事件 * 处理左击事件
*/ */
private void doWithLeftButtonPressed(MouseEvent evt) { private void doWithLeftButtonPressed(MouseEvent evt) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
grid.setEditable(false); grid.setEditable(false);
} }
@ -188,10 +189,10 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous
// 得到点击所在的column and row // 得到点击所在的column and row
ColumnRow columnRow = GridUtils.getEventColumnRow_withresolution(reportPane, this.oldEvtX, this.oldEvtY, this.resolution); ColumnRow columnRow = GridUtils.getEventColumnRow_withresolution(reportPane, this.oldEvtX, this.oldEvtY, this.resolution);
TemplateCellElement cellElement = report.getTemplateCellElement(columnRow.getColumn(), columnRow.getRow()); TemplateCellElement cellElement = report.getTemplateCellElement(columnRow.getColumn(), columnRow.getRow());
if (clickCount >= 2 && !BaseUtils.isAuthorityEditing()) { if (clickCount >= 2 && !DesignerMode.isAuthorityEditing()) {
grid.startEditing(); grid.startEditing();
} }
if (clickCount == 1 && cellElement != null && cellElement.getWidget() != null && !BaseUtils.isAuthorityEditing()) { if (clickCount == 1 && cellElement != null && cellElement.getWidget() != null && !DesignerMode.isAuthorityEditing()) {
showWidetWindow(cellElement, report); showWidetWindow(cellElement, report);
} }
reportPane.repaint(); reportPane.repaint();
@ -362,12 +363,12 @@ public class GridMouseAdapter implements MouseListener, MouseWheelListener, Mous
} }
Selection selection = reportPane.getSelection(); Selection selection = reportPane.getSelection();
if (selection instanceof FloatSelection && !BaseUtils.isAuthorityEditing()) { if (selection instanceof FloatSelection && !DesignerMode.isAuthorityEditing()) {
doWithFloatElementDragged(evtX, evtY, (FloatSelection) selection); doWithFloatElementDragged(evtX, evtY, (FloatSelection) selection);
grid.setDragType(GridUtils.DRAG_FLOAT); grid.setDragType(GridUtils.DRAG_FLOAT);
} else if (grid.getDragType() == GridUtils.DRAG_CELLSELECTION_BOTTOMRIGHT_CORNER && !BaseUtils.isAuthorityEditing()) { } else if (grid.getDragType() == GridUtils.DRAG_CELLSELECTION_BOTTOMRIGHT_CORNER && !DesignerMode.isAuthorityEditing()) {
doWithCellElementDragged(evtX, evtY, (CellSelection) selection); doWithCellElementDragged(evtX, evtY, (CellSelection) selection);
} else if (grid.getDragType() == GridUtils.DRAG_CELLSELECTION && !BaseUtils.isAuthorityEditing()) { } else if (grid.getDragType() == GridUtils.DRAG_CELLSELECTION && !DesignerMode.isAuthorityEditing()) {
// peter:获得调整过的Selected Column Row. // peter:获得调整过的Selected Column Row.
ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(reportPane, evtX, evtY, resolution); ColumnRow selectedCellPoint = GridUtils.getAdjustEventColumnRow_withresolution(reportPane, evtX, evtY, resolution);
if (selectedCellPoint.getColumn() != grid.getDragRectangle().x || selectedCellPoint.getRow() != grid.getDragRectangle().y) { if (selectedCellPoint.getColumn() != grid.getDragRectangle().x || selectedCellPoint.getRow() != grid.getDragRectangle().y) {

3
designer-realize/src/main/java/com/fr/grid/GridRowUI.java

@ -12,6 +12,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.DynamicUnitList; import com.fr.base.DynamicUnitList;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.cache.list.IntList; import com.fr.cache.list.IntList;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.mainframe.ElementCasePane; import com.fr.design.mainframe.ElementCasePane;
@ -137,7 +138,7 @@ public class GridRowUI extends ComponentUI {
} }
private void drawAuthority(ElementCase elementCase, Graphics2D g2d, double tmpHeight1, double tmpIncreaseHeight, Dimension size, int i) { private void drawAuthority(ElementCase elementCase, Graphics2D g2d, double tmpHeight1, double tmpIncreaseHeight, Dimension size, int i) {
boolean isAuthorityEdited = BaseUtils.isAuthorityEditing(); boolean isAuthorityEdited = DesignerMode.isAuthorityEditing();
if (isAuthorityEdited) { if (isAuthorityEdited) {
ColumnRowPrivilegeControl cpc = elementCase.getRowPrivilegeControl(i); ColumnRowPrivilegeControl cpc = elementCase.getRowPrivilegeControl(i);
String selectedRoles = ReportAndFSManagePane.getInstance().getRoleTree().getSelectedRoleName(); String selectedRoles = ReportAndFSManagePane.getInstance().getRoleTree().getSelectedRoleName();

3
designer-realize/src/main/java/com/fr/grid/GridUI.java

@ -11,6 +11,7 @@ import com.fr.base.Utils;
import com.fr.base.background.ColorBackground; import com.fr.base.background.ColorBackground;
import com.fr.base.background.ImageFileBackground; import com.fr.base.background.ImageFileBackground;
import com.fr.base.iofile.attr.WatermarkAttr; import com.fr.base.iofile.attr.WatermarkAttr;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
@ -1060,7 +1061,7 @@ public class GridUI extends ComponentUI {
throw new IllegalArgumentException("The component c to paint must be a Grid!"); throw new IllegalArgumentException("The component c to paint must be a Grid!");
} }
isAuthority = BaseUtils.isAuthorityEditing(); isAuthority = DesignerMode.isAuthorityEditing();
Graphics2D g2d = (Graphics2D) g; Graphics2D g2d = (Graphics2D) g;

3
designer-realize/src/main/java/com/fr/grid/selection/CellSelection.java

@ -4,6 +4,7 @@ import com.fr.base.BaseFormula;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.NameStyle; import com.fr.base.NameStyle;
import com.fr.base.Utils; import com.fr.base.Utils;
import com.fr.base.vcs.DesignerMode;
import com.fr.cache.list.IntList; import com.fr.cache.list.IntList;
import com.fr.config.ServerPreferenceConfig; import com.fr.config.ServerPreferenceConfig;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
@ -463,7 +464,7 @@ public class CellSelection extends Selection {
*/ */
public UIPopupMenu createPopupMenu(ElementCasePane ePane) { public UIPopupMenu createPopupMenu(ElementCasePane ePane) {
UIPopupMenu popup = new UIPopupMenu(); UIPopupMenu popup = new UIPopupMenu();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
popup.add(new CleanAuthorityAction(ePane).createMenuItem()); popup.add(new CleanAuthorityAction(ePane).createMenuItem());
return popup; return popup;
} }

3
designer-realize/src/main/java/com/fr/grid/selection/FloatSelection.java

@ -2,6 +2,7 @@ package com.fr.grid.selection;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.cell.CleanAuthorityAction; import com.fr.design.actions.cell.CleanAuthorityAction;
import com.fr.design.actions.cell.FloatStyleAction; import com.fr.design.actions.cell.FloatStyleAction;
import com.fr.design.actions.core.ActionFactory; import com.fr.design.actions.core.ActionFactory;
@ -125,7 +126,7 @@ public class FloatSelection extends Selection {
@Override @Override
public JPopupMenu createPopupMenu(ElementCasePane ePane) { public JPopupMenu createPopupMenu(ElementCasePane ePane) {
UIPopupMenu popup = new UIPopupMenu(); UIPopupMenu popup = new UIPopupMenu();
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
popup.add(new CleanAuthorityAction(ePane).createMenuItem()); popup.add(new CleanAuthorityAction(ePane).createMenuItem());
return popup; return popup;
} }

3
designer-realize/src/main/java/com/fr/poly/PolyComponetsBar.java

@ -5,6 +5,7 @@ import com.fr.base.FRContext;
import com.fr.base.chart.BaseChart; import com.fr.base.chart.BaseChart;
import com.fr.base.chart.BaseChartGetter; import com.fr.base.chart.BaseChartGetter;
import com.fr.base.chart.BaseChartNameID; import com.fr.base.chart.BaseChartNameID;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.gui.ibutton.UIButton; import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.itooltip.MultiLineToolTip; import com.fr.design.gui.itooltip.MultiLineToolTip;
@ -53,7 +54,7 @@ public class PolyComponetsBar extends JToolBar {
*/ */
public void checkEnable() { public void checkEnable() {
for (SerIcon serIcon : serIcons) { for (SerIcon serIcon : serIcons) {
serIcon.setEnabled(!BaseUtils.isAuthorityEditing()); serIcon.setEnabled(!DesignerMode.isAuthorityEditing());
} }
} }

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

@ -7,6 +7,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.GraphHelper; import com.fr.base.GraphHelper;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.common.inputevent.InputEventBaseOnOS; import com.fr.common.inputevent.InputEventBaseOnOS;
import com.fr.design.DesignState; import com.fr.design.DesignState;
import com.fr.design.DesignerEnvManager; import com.fr.design.DesignerEnvManager;
@ -355,7 +356,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
//聚合块不参加权限编辑 //聚合块不参加权限编辑
if (selectElement == null) { if (selectElement == null) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jTemplate.isJWorkBook()) { if (jTemplate.isJWorkBook()) {
//清参数面板 //清参数面板
@ -715,7 +716,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
initPolyBlocks(); initPolyBlocks();
startEditing(blockName); startEditing(blockName);
if (selection == null) { if (selection == null) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION_DISABLED); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION_DISABLED);
EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(new NoSupportAuthorityEdit()); EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(new NoSupportAuthorityEdit());
} else { } else {
@ -870,7 +871,7 @@ public class PolyDesigner extends ReportComponent<PolyWorkSheet, PolyElementCase
jt.setComposite(); jt.setComposite();
} }
DesignerContext.getDesignerFrame().resetToolkitByPlus(DesignerContext.getDesignerFrame().getSelectedJTemplate()); DesignerContext.getDesignerFrame().resetToolkitByPlus(DesignerContext.getDesignerFrame().getSelectedJTemplate());
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
EastRegionContainerPane.getInstance().replaceDownPane(RolesAlreadyEditedPane.getInstance()); EastRegionContainerPane.getInstance().replaceDownPane(RolesAlreadyEditedPane.getInstance());
} else if (isChooseBlock()) { } else if (isChooseBlock()) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.POLY_CHART); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.POLY_CHART);

3
designer-realize/src/main/java/com/fr/poly/actions/DeleteBlockAction.java

@ -9,6 +9,7 @@ import java.awt.event.KeyEvent;
import javax.swing.KeyStroke; import javax.swing.KeyStroke;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.TemplateComponentActionInterface; import com.fr.design.actions.TemplateComponentActionInterface;
import com.fr.design.actions.UpdateAction; import com.fr.design.actions.UpdateAction;
@ -30,7 +31,7 @@ public class DeleteBlockAction extends UpdateAction implements TemplateComponent
@Override @Override
public void actionPerformed(ActionEvent e) { public void actionPerformed(ActionEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
final PolyDesigner designer = this.getEditingComponent(); final PolyDesigner designer = this.getEditingComponent();

7
designer-realize/src/main/java/com/fr/poly/creator/ChartBlockEditor.java

@ -10,6 +10,7 @@ import com.fr.base.chart.BaseChart;
import com.fr.base.chart.BaseChartCollection; import com.fr.base.chart.BaseChartCollection;
import com.fr.base.chart.BaseChartGetter; import com.fr.base.chart.BaseChartGetter;
import com.fr.base.chart.BaseChartNameID; import com.fr.base.chart.BaseChartNameID;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.border.UIRoundedBorder; import com.fr.design.border.UIRoundedBorder;
import com.fr.design.file.HistoryTemplateListPane; import com.fr.design.file.HistoryTemplateListPane;
import com.fr.design.gui.chart.MiddleChartComponent; import com.fr.design.gui.chart.MiddleChartComponent;
@ -107,7 +108,7 @@ public class ChartBlockEditor extends BlockEditor<MiddleChartComponent, PolyChar
*/ */
public void checkChartButtonsEnable() { public void checkChartButtonsEnable() {
// for (ChartButton chartButton : chartButtons) { // for (ChartButton chartButton : chartButtons) {
// chartButton.setEnabled(!BaseUtils.isAuthorityEditing()); // chartButton.setEnabled(!DesignerMode.isAuthorityEditing());
// } // }
} }
@ -211,7 +212,7 @@ public class ChartBlockEditor extends BlockEditor<MiddleChartComponent, PolyChar
@Override @Override
public void mouseClicked(MouseEvent e) { public void mouseClicked(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
BaseChart chart = null; BaseChart chart = null;
@ -274,7 +275,7 @@ public class ChartBlockEditor extends BlockEditor<MiddleChartComponent, PolyChar
public void resetSelectionAndChooseState() { public void resetSelectionAndChooseState() {
designer.setChooseType(SelectionType.CHART_INNER); designer.setChooseType(SelectionType.CHART_INNER);
// refreshChartComponent();// 选中之后 刷新下图表编辑层 // refreshChartComponent();// 选中之后 刷新下图表编辑层
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jTemplate.isJWorkBook()) { if (jTemplate.isJWorkBook()) {
//清参数面板 //清参数面板

3
designer-realize/src/main/java/com/fr/poly/creator/ECBlockEditor.java

@ -5,6 +5,7 @@ package com.fr.poly.creator;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.constants.UIConstants; import com.fr.design.constants.UIConstants;
import com.fr.design.event.TargetModifiedEvent; import com.fr.design.event.TargetModifiedEvent;
import com.fr.design.event.TargetModifiedListener; import com.fr.design.event.TargetModifiedListener;
@ -136,7 +137,7 @@ public class ECBlockEditor extends BlockEditor<ECBlockPane, PolyECBlock> {
*/ */
public void resetSelectionAndChooseState() { public void resetSelectionAndChooseState() {
designer.setChooseType(SelectionType.INNER); designer.setChooseType(SelectionType.INNER);
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate(); JTemplate jTemplate = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate();
if (jTemplate.isJWorkBook()) { if (jTemplate.isJWorkBook()) {
//清参数面板 //清参数面板

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

@ -4,6 +4,7 @@
package com.fr.poly.creator; package com.fr.poly.creator;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.actions.edit.HyperlinkAction; import com.fr.design.actions.edit.HyperlinkAction;
import com.fr.design.menu.KeySetUtils; import com.fr.design.menu.KeySetUtils;
@ -55,7 +56,7 @@ public class ECBlockPane extends PolyElementCasePane {
if (!isEditable()) { if (!isEditable()) {
return; return;
} }
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
if (designer.getSelection().getEditingElementCasePane() == null) { if (designer.getSelection().getEditingElementCasePane() == null) {
EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION_DISABLED); EastRegionContainerPane.getInstance().switchMode(EastRegionContainerPane.PropertyMode.AUTHORITY_EDITION_DISABLED);
EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(new NoSupportAuthorityEdit()); EastRegionContainerPane.getInstance().replaceAuthorityEditionPane(new NoSupportAuthorityEdit());
@ -106,7 +107,7 @@ public class ECBlockPane extends PolyElementCasePane {
* @return 返回MenuDef数组. * @return 返回MenuDef数组.
*/ */
public MenuDef[] menus4Target() { public MenuDef[] menus4Target() {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return super.menus4Target(); return super.menus4Target();
} }
return (MenuDef[]) ArrayUtils.addAll(super.menus4Target(), new MenuDef[]{createInsertMenuDef(), createCellMenuDef()}); return (MenuDef[]) ArrayUtils.addAll(super.menus4Target(), new MenuDef[]{createInsertMenuDef(), createCellMenuDef()});

7
designer-realize/src/main/java/com/fr/poly/hanlder/BottomCornerMouseHanlder.java

@ -11,6 +11,7 @@ import javax.swing.event.MouseInputAdapter;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.beans.location.Absorptionline; import com.fr.design.beans.location.Absorptionline;
import com.fr.design.beans.location.MoveUtils; import com.fr.design.beans.location.MoveUtils;
import com.fr.design.beans.location.MoveUtils.RectangleDesigner; import com.fr.design.beans.location.MoveUtils.RectangleDesigner;
@ -49,7 +50,7 @@ public class BottomCornerMouseHanlder extends MouseInputAdapter {
* *
*/ */
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
designer.noAuthorityEdit(); designer.noAuthorityEdit();
} }
pressed = e.getPoint(); pressed = e.getPoint();
@ -66,7 +67,7 @@ public class BottomCornerMouseHanlder extends MouseInputAdapter {
* *
*/ */
public void mouseReleased(MouseEvent e) { public void mouseReleased(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
designer.noAuthorityEdit(); designer.noAuthorityEdit();
} }
editor.setDragging(false); editor.setDragging(false);
@ -92,7 +93,7 @@ public class BottomCornerMouseHanlder extends MouseInputAdapter {
* *
*/ */
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
designer.noAuthorityEdit(); designer.noAuthorityEdit();
return; return;
} }

5
designer-realize/src/main/java/com/fr/poly/hanlder/ColumnOperationMouseHandler.java

@ -8,6 +8,7 @@ import java.awt.event.MouseEvent;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.poly.PolyDesigner; import com.fr.poly.PolyDesigner;
import com.fr.poly.PolyDesigner.SelectionType; import com.fr.poly.PolyDesigner.SelectionType;
@ -57,7 +58,7 @@ public abstract class ColumnOperationMouseHandler<T extends BlockEditor> extends
* *
*/ */
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
designer.noAuthorityEdit(); designer.noAuthorityEdit();
} }
startPoint = e.getPoint(); startPoint = e.getPoint();
@ -74,7 +75,7 @@ public abstract class ColumnOperationMouseHandler<T extends BlockEditor> extends
* *
*/ */
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
TemplateBlock block = editor.getValue(); TemplateBlock block = editor.getValue();

3
designer-realize/src/main/java/com/fr/poly/hanlder/PolyDesignerDropTarget.java

@ -19,6 +19,7 @@ import com.fr.base.BaseUtils;
import com.fr.base.FRContext; import com.fr.base.FRContext;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.chart.BaseChart; import com.fr.base.chart.BaseChart;
import com.fr.base.vcs.DesignerMode;
import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.DesignerContext;
import com.fr.grid.Grid; import com.fr.grid.Grid;
import com.fr.poly.PolyDesigner; import com.fr.poly.PolyDesigner;
@ -55,7 +56,7 @@ public class PolyDesignerDropTarget extends DropTargetAdapter {
*/ */
public void dragEnter(DropTargetDragEvent dtde) { public void dragEnter(DropTargetDragEvent dtde) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
// richer:避免在一次拖拽过程中重复查找 // richer:避免在一次拖拽过程中重复查找

5
designer-realize/src/main/java/com/fr/poly/hanlder/RowOperationMouseHandler.java

@ -8,6 +8,7 @@ import java.awt.event.MouseEvent;
import com.fr.base.BaseUtils; import com.fr.base.BaseUtils;
import com.fr.base.ScreenResolution; import com.fr.base.ScreenResolution;
import com.fr.base.vcs.DesignerMode;
import com.fr.general.ComparatorUtils; import com.fr.general.ComparatorUtils;
import com.fr.poly.PolyDesigner; import com.fr.poly.PolyDesigner;
import com.fr.poly.PolyDesigner.SelectionType; import com.fr.poly.PolyDesigner.SelectionType;
@ -55,7 +56,7 @@ public abstract class RowOperationMouseHandler<T extends BlockEditor> extends Bl
* *
*/ */
public void mousePressed(MouseEvent e) { public void mousePressed(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
designer.noAuthorityEdit(); designer.noAuthorityEdit();
} }
startPoint = e.getPoint(); startPoint = e.getPoint();
@ -72,7 +73,7 @@ public abstract class RowOperationMouseHandler<T extends BlockEditor> extends Bl
* *
*/ */
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
if (BaseUtils.isAuthorityEditing()) { if (DesignerMode.isAuthorityEditing()) {
return; return;
} }
TemplateBlock block = editor.getValue(); TemplateBlock block = editor.getValue();

Loading…
Cancel
Save