Browse Source

Merge pull request #462 in BA/design from ~ZHOUPING/design:dev to dev

* commit '92e1b01f5f0f03e74c54d8da7e25bedc0662b8bd':
  REPORT-750 表单共创内测问题 bugfix3
master
superman 8 years ago
parent
commit
aaff72987b
  1. 39
      designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java
  2. 3
      designer_form/src/com/fr/design/mainframe/JForm.java

39
designer_form/src/com/fr/design/designer/creator/XWAbsoluteBodyLayout.java

@ -2,9 +2,19 @@ package com.fr.design.designer.creator;
import com.fr.design.designer.beans.LayoutAdapter;
import com.fr.design.designer.beans.adapters.layout.FRAbsoluteBodyLayoutAdapter;
import com.fr.design.form.util.XCreatorConstants;
import com.fr.design.mainframe.widget.editors.PaddingMarginEditor;
import com.fr.design.mainframe.widget.editors.WLayoutBorderStyleEditor;
import com.fr.design.mainframe.widget.renderer.LayoutBorderStyleRenderer;
import com.fr.design.mainframe.widget.renderer.PaddingMarginCellRenderer;
import com.fr.form.ui.LayoutBorderStyle;
import com.fr.form.ui.container.WAbsoluteBodyLayout;
import com.fr.general.ComparatorUtils;
import com.fr.general.Inter;
import com.fr.stable.core.PropertyChangeAdapter;
import java.awt.*;
import java.beans.IntrospectionException;
/**
* Created by zhouping on 2016/10/14.
@ -52,4 +62,33 @@ public class XWAbsoluteBodyLayout extends XWAbsoluteLayout {
public boolean isSupportDrag() {
return false;
}
/**
* 得到属性名
*
* @return 属性名
* @throws java.beans.IntrospectionException
*/
@Override
public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException {
return new CRPropertyDescriptor[] {
new CRPropertyDescriptor("widgetName", this.data.getClass()).setI18NName(Inter
.getLocText("FR-Designer_Form-Widget_Name")),
new CRPropertyDescriptor("borderStyle", this.data.getClass()).setEditorClass(
WLayoutBorderStyleEditor.class).setRendererClass(LayoutBorderStyleRenderer.class).setI18NName(
Inter.getLocText("FR-Engine_Style")).putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, "Advanced")
.setPropertyChangeListener(new PropertyChangeAdapter() {
@Override
public void propertyChange() {
initStyle();
}
})
};
}
@Override
protected void initStyle() {
initBorderStyle();
}
}

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

@ -657,7 +657,8 @@ public class JForm extends JTemplate<Form, FormUndoState> implements BaseJForm {
* @return 是则返回true
*/
public boolean isSelectRootPane() {
return formDesign.getRootComponent() == formDesign.getSelectionModel().getSelection().getSelectedCreator();
return (formDesign.getRootComponent() == formDesign.getSelectionModel().getSelection().getSelectedCreator())
|| (formDesign.getSelectionModel().getSelection().getSelectedCreator().acceptType(XWAbsoluteBodyLayout.class));
}

Loading…
Cancel
Save