Browse Source

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

* commit '82f4493b82200b0e439c6db09981328155625a15':
  rt
  rt
  rt
  rt
  rt
  rt
  rt
  rt
  rt
  rt
  rt
master
superman 8 years ago
parent
commit
27acef13c4
  1. 2
      designer/src/com/fr/design/mainframe/JWorkBook.java
  2. 4
      designer/src/com/fr/design/parameter/ParameterDefinitePane.java
  3. 8
      designer_base/src/com/fr/design/gui/icontainer/UIResizableContainer.java
  4. 1
      designer_form/src/com/fr/design/form/parameter/FormParaDesigner.java
  5. 16
      designer_form/src/com/fr/design/mainframe/FormDesigner.java
  6. 1
      designer_form/src/com/fr/design/mainframe/JForm.java
  7. 25
      designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java
  8. 3
      designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java

2
designer/src/com/fr/design/mainframe/JWorkBook.java

@ -732,6 +732,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
}
} else {
DesignerContext.getDesignerFrame().resetToolkitByPlus(JWorkBook.this);
EastRegionContainerPane.getInstance().removeParameterPane();
if (delegate4ToolbarMenuAdapter() instanceof PolyDesigner) {
PolyDesigner polyDesigner = (PolyDesigner) delegate4ToolbarMenuAdapter();
if (polyDesigner.getSelectionType() == PolyDesigner.SelectionType.NONE || polyDesigner.getSelection() == null) {
@ -752,6 +753,7 @@ public class JWorkBook extends JTemplate<WorkBook, WorkBookUndoState> {
EastRegionContainerPane.getInstance().replaceUpPane(allowAuthorityUpPane());
EastRegionContainerPane.getInstance().replaceDownPane(RolesAlreadyEditedPane.getInstance());
}
centerPane.needToShowCoverAndHidPane();
}

4
designer/src/com/fr/design/parameter/ParameterDefinitePane.java

@ -20,7 +20,9 @@ import com.fr.design.gui.ibutton.UIButton;
import com.fr.design.gui.ibutton.UIButtonGroup;
import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.AuthorityToolBarPane;
import com.fr.design.mainframe.EastRegionContainerPane;
import com.fr.design.mainframe.JWorkBook;
import com.fr.design.mainframe.WidgetPropertyPane;
import com.fr.design.mainframe.toolbar.ToolBarMenuDockPlus;
import com.fr.design.menu.*;
import com.fr.design.module.DesignModuleFactory;
@ -244,7 +246,7 @@ public class ParameterDefinitePane extends JPanel implements ToolBarMenuDockPlus
isdelayItem.setSelected(reportParameterAttr.isDelayPlaying());
isshowWindowItem.setSelected(reportParameterAttr.isShowWindow());
isEditing = true;
EastRegionContainerPane.getInstance().setParameterHeight(ParameterPropertyPane.getInstance().getPreferredSize().height);
ParameterBridge bridge = paraDesignEditor.getParaComponent();
if (parameterUI != null) {
bridge.setDelayDisplayContent(reportParameterAttr.isDelayPlaying());

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

@ -29,6 +29,7 @@ public class UIResizableContainer extends JPanel {
private VerticalToolPane verticalToolPane;
private int direction;
private boolean hasParameterPane;
private static final int MAX_WIDTH = 300;
private static final int MIN_WIDTH = 165;
@ -89,7 +90,6 @@ public class UIResizableContainer extends JPanel {
add(horizontToolPane);
add(downPane);
add(verticalToolPane);
add(parameterPane);
}
public UIResizableContainer(JComponent upPane, int direction) {
@ -102,7 +102,6 @@ public class UIResizableContainer extends JPanel {
setLayout(containerLayout);
add(upPane);
add(horizontToolPane);
add(parameterPane);
}
@ -141,7 +140,7 @@ public class UIResizableContainer extends JPanel {
* @param height
*/
public void setParameterHeight(int height) {
paraHeight = height;
paraHeight = hasParameterPane? height : 0;
refreshContainer();
}
@ -274,13 +273,16 @@ public class UIResizableContainer extends JPanel {
public void addParameterPane(JComponent pane) {
add(this.parameterPane = pane);
hasParameterPane = true;
refreshContainer();
}
public void removeParameterPane() {
remove(this.parameterPane);
setParameterHeight(0);
hasParameterPane = false;
refreshContainer();
}
/**

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

@ -233,6 +233,7 @@ public class FormParaDesigner extends FormDesigner implements ParameterDesignerP
}
ParameterPropertyPane.getInstance().getParameterToolbarPane().populateBean(
p.getParameterArray() == null ? new Parameter[0] : p.getParameterArray());
EastRegionContainerPane.getInstance().setParameterHeight(ParameterPropertyPane.getInstance().getPreferredSize().height);
}

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

@ -186,14 +186,14 @@ public class FormDesigner extends TargetComponent<Form> implements TreeSelection
public void refreshParameter(){
XLayoutContainer rootContainer = this.getParaComponent();
if (rootContainer != null){
java.util.List<String> namelist = new ArrayList<String>();
rootContainer.getAllXCreatorNameList(rootContainer,namelist);
// parameterArray是报表的所有参数, nameList是已经在参数面板添加过控件的参数名
// 与已有的参数列表比较 如果已经存在 就除去
Parameter[] ps = getParameterArray();
if (ps != null) {
removeSame(ps, namelist);
}
java.util.List<String> namelist = new ArrayList<String>();
rootContainer.getAllXCreatorNameList(rootContainer,namelist);
// parameterArray是报表的所有参数, nameList是已经在参数面板添加过控件的参数名
// 与已有的参数列表比较 如果已经存在 就除去
Parameter[] ps = getParameterArray();
if (ps != null) {
removeSame(ps, namelist);
}
}
ParameterPropertyPane.getInstance().getParameterToolbarPane().populateBean(
getParameterArray() == null ? new Parameter[0] : getParameterArray());

1
designer_form/src/com/fr/design/mainframe/JForm.java

@ -621,6 +621,7 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
EastRegionContainerPane.getInstance().replaceUpPane(WidgetPropertyPane.getInstance(formDesign));
EastRegionContainerPane.getInstance().addParameterPane(ParameterPropertyPane.getInstance(formDesign));
EastRegionContainerPane.getInstance().setParameterHeight(ParameterPropertyPane.getInstance(formDesign).getPreferredSize().height);
if (EastRegionContainerPane.getInstance().getDownPane() == null) {
new Thread() {
public void run() {

25
designer_form/src/com/fr/design/mainframe/WidgetPropertyPane.java

@ -124,15 +124,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
}
componentTree = new ComponentTree(designer);
ComponentTreeModel treeModel = (ComponentTreeModel) componentTree.getModel();
XCreator root = (XCreator)treeModel.getRoot();
int childCount = treeModel.getChildCount(root);
//按照节点添加para在下的,但这里需要para节点在上,调整一下位置
if(childCount == NODE_LENGTH){
adjustPosition(treeModel, designer);
}
widgetPropertyTables = new ArrayList<AbstractPropertyTable>();
propertyTable = new WidgetPropertyTable(designer);
designer.addDesignerEditListener(new WidgetPropertyDesignerAdapter(propertyTable));
@ -198,22 +189,6 @@ public class WidgetPropertyPane extends FormDockView implements BaseWidgetProper
isrefresh = false;
}
/**
* 调整结构树para和body的位置
*
* @param treeModel
* @param formDesigner
*/
private void adjustPosition(ComponentTreeModel treeModel,FormDesigner formDesigner){
XCreator root = (XCreator)treeModel.getRoot();
if(treeModel.getChild(root,0) instanceof XWParameterLayout){
return;
}
root.add((Component)(treeModel.getChild(root,0)),1);
treeModel.setRoot(root);
componentTree = new ComponentTree(formDesigner,treeModel);
}
//
/**
* 选中的组件是否在参数面板里

3
designer_form/src/com/fr/design/parameter/ParameterToolBarPane.java

@ -33,6 +33,7 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
private static final int GAP_H = 4;
private static final int GAP_V = 6;
private static final int GAP_BV = 4;
private static final int WIDTH = 225;
private static final int L_H = 18;
@ -140,7 +141,7 @@ public class ParameterToolBarPane extends BasicBeanPane<Parameter[]> {
}
public void layoutContainer(Container parent) {
int width = parent.getWidth();
int width = parent.getWidth() == 0 ? WIDTH : parent.getWidth();
int x = 0;
int y = L_H + GAP_H;

Loading…
Cancel
Save