Browse Source

Merge pull request #463 in BA/design from ~XIAOXIA/design:dev to dev

* commit '40a36cac8f62c0f279442803475bf606b4949ef9':
  rt
  rt
  rt
  rt
  rt
  rt
  rt
  rt
  rt
  rt
  rt
  rt
  rt
  rt
master
superman 8 years ago
parent
commit
40d394ba68
  1. 2
      designer_base/src/com/fr/design/actions/AllowAuthorityEditAction.java
  2. 14
      designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java
  3. 9
      designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java
  4. 8
      designer_form/src/com/fr/design/mainframe/FormDesigner.java
  5. 4
      designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java
  6. 2
      designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java

2
designer_base/src/com/fr/design/actions/AllowAuthorityEditAction.java

@ -1 +1 @@
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().replaceUpPane(tc.getEastUpPane()); DesignerContext.getDesignerFrame().refreshDottedLine(); EastRegionContainerPane.getInstance().replaceDownPane(RolesAlreadyEditedPane.getInstance()); //画虚线 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.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().replaceUpPane(tc.getEastUpPane()); DesignerContext.getDesignerFrame().refreshDottedLine(); EastRegionContainerPane.getInstance().replaceDownPane(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(); } } }

14
designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java

@ -232,7 +232,6 @@ public class UIResizableContainer extends JPanel {
verticalToolPane.setBounds(0, 0, toolPaneHeight, getHeight()); verticalToolPane.setBounds(0, 0, toolPaneHeight, getHeight());
} }
} }
} }
@Override @Override
@ -302,6 +301,15 @@ public class UIResizableContainer extends JPanel {
return this.downPane; return this.downPane;
} }
/**
* 得到参数面板
*
* @return
*/
public JComponent getParameterPane() {
return this.parameterPane;
}
/** /**
* 刷新下面板 * 刷新下面板
*/ */
@ -343,7 +351,7 @@ public class UIResizableContainer extends JPanel {
public void mouseDragged(MouseEvent e) { public void mouseDragged(MouseEvent e) {
toolPaneY = e.getYOnScreen() - UIResizableContainer.this.getLocationOnScreen().y; toolPaneY = e.getYOnScreen() - UIResizableContainer.this.getLocationOnScreen().y;
toolPaneY = toolPaneY < 0 ? 0 : toolPaneY; toolPaneY = toolPaneY < 0 ? 0 : toolPaneY;
toolPaneY = toolPaneY > UIResizableContainer.this.getHeight() - toolPaneHeight ? UIResizableContainer.this.getHeight() - toolPaneHeight : toolPaneY; toolPaneY = toolPaneY > UIResizableContainer.this.getHeight() - toolPaneHeight ? UIResizableContainer.this.getHeight() - toolPaneHeight - getParameterPaneHeight() : toolPaneY - getParameterPaneHeight();
refreshContainer(); refreshContainer();
} }
}); });
@ -366,7 +374,7 @@ public class UIResizableContainer extends JPanel {
if (e.getX() <= ARROW_RANGE) { if (e.getX() <= ARROW_RANGE) {
toolPaneY = 0; toolPaneY = 0;
} else if (e.getX() >= getWidth() - ARROW_RANGE) { } else if (e.getX() >= getWidth() - ARROW_RANGE) {
toolPaneY = UIResizableContainer.this.getHeight() - toolPaneHeight; toolPaneY = UIResizableContainer.this.getHeight() - toolPaneHeight - getParameterPaneHeight();
} else { } else {
return; return;
} }

9
designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java

@ -230,14 +230,9 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
} }
ParameterPropertyPane.getInstance().getParameterToolbarPane().populateBean( ParameterPropertyPane.getInstance().getParameterToolbarPane().populateBean(
p.getParameterArray() == null ? new Parameter[0] : p.getParameterArray()); p.getParameterArray() == null ? new Parameter[0] : p.getParameterArray());
EastRegionContainerPane.getInstance().addParameterPane(ParameterPropertyPane.getInstance(this)); EastRegionContainerPane.getInstance().addParameterPane(ParameterPropertyPane.getInstance(this));
if (p.getParameterArray().length == 0) { EastRegionContainerPane.getInstance().setParameterHeight(ParameterPropertyPane.getInstance(this).getPreferredSize().height);
EastRegionContainerPane.getInstance().setParameterHeight(30);
} else {
//参数面板独立后只能这边触发调整高度,根据参数个数调整换行,计算高度
EastRegionContainerPane.getInstance().setParameterHeight((p.getParameterArray().length + 5) / 6 * 30 + 80);
}
} }
/** /**

8
designer_form/src/com/fr/design/mainframe/FormDesigner.java

@ -198,13 +198,7 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
ParameterPropertyPane.getInstance().getParameterToolbarPane().populateBean( ParameterPropertyPane.getInstance().getParameterToolbarPane().populateBean(
getParameterArray() == null ? new Parameter[0] : getParameterArray()); getParameterArray() == null ? new Parameter[0] : getParameterArray());
ParameterPropertyPane.getInstance().repaintContainer(); ParameterPropertyPane.getInstance().repaintContainer();
if (getParameterArray().length == 0) { EastRegionContainerPane.getInstance().setParameterHeight(ParameterPropertyPane.getInstance(this).getPreferredSize().height);
EastRegionContainerPane.getInstance().setParameterHeight(30);
} else {
//参数面板独立后只能这边触发调整高度,根据参数个数调整换行,计算高度
EastRegionContainerPane.getInstance().setParameterHeight((getParameterArray().length + 5) / 6 * 30 + 80);
}
} }
private void removeSame(Parameter[] parameters, List<String> namelist){ private void removeSame(Parameter[] parameters, List<String> namelist){

4
designer_form/src/com/fr/design/mainframe/FormHierarchyTreePane.java

@ -79,7 +79,7 @@ public class FormHierarchyTreePane extends FormDockView implements HierarchyTree
this.componentTree = null; this.componentTree = null;
// this.searchTextField = null; // this.searchTextField = null;
// this.searchResult = null; // this.searchResult = null;
add(new JScrollPane(), BorderLayout.CENTER); // add(new JScrollPane(), BorderLayout.CENTER);
} }
@Override @Override
@ -109,7 +109,7 @@ public class FormHierarchyTreePane extends FormDockView implements HierarchyTree
adjustPosition(treeModel, formDesigner); adjustPosition(treeModel, formDesigner);
} }
JPanel widgetPane = new JPanel(); JPanel widgetPane = new JPanel();
widgetPane.setBorder(BorderFactory.createEmptyBorder(3, 0, 3, 0)); widgetPane.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));
widgetPane.setLayout(FRGUIPaneFactory.createBorderLayout()); widgetPane.setLayout(FRGUIPaneFactory.createBorderLayout());
add(widgetPane, BorderLayout.NORTH); add(widgetPane, BorderLayout.NORTH);
widgetPane.add(new UILabel(Inter.getLocText("FR-Designer-Selected_Widget") + " ", widgetPane.add(new UILabel(Inter.getLocText("FR-Designer-Selected_Widget") + " ",

2
designer_form/src/com/fr/design/parameter/ParameterPropertyPane.java

@ -47,7 +47,7 @@ public class ParameterPropertyPane extends JPanel{
initParameterListener(); initParameterListener();
this.setLayout(new BorderLayout(0, 6)); this.setLayout(new BorderLayout(0, 6));
this.setBorder(BorderFactory.createEmptyBorder(2, 5, 5, 5)); this.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 0));
this.add(toolbarPane, BorderLayout.CENTER); this.add(toolbarPane, BorderLayout.CENTER);
} }

Loading…
Cancel
Save