|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.fr.design.designer.properties.mobile; |
|
|
|
package com.fr.design.designer.properties.mobile; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.base.FRContext; |
|
|
|
import com.fr.base.FRContext; |
|
|
|
|
|
|
|
import com.fr.base.mobile.MobileFitAttrState; |
|
|
|
import com.fr.design.designer.beans.events.DesignerEvent; |
|
|
|
import com.fr.design.designer.beans.events.DesignerEvent; |
|
|
|
import com.fr.design.designer.creator.CRPropertyDescriptor; |
|
|
|
import com.fr.design.designer.creator.CRPropertyDescriptor; |
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
|
|
import com.fr.design.designer.creator.XCreator; |
|
|
@ -27,17 +28,20 @@ public class ElementCasePropertyTable extends AbstractPropertyTable{ |
|
|
|
|
|
|
|
|
|
|
|
private XCreator xCreator; |
|
|
|
private XCreator xCreator; |
|
|
|
private FormDesigner designer; |
|
|
|
private FormDesigner designer; |
|
|
|
|
|
|
|
private boolean cascade = false; |
|
|
|
|
|
|
|
|
|
|
|
public ElementCasePropertyTable(XCreator xCreator) { |
|
|
|
public ElementCasePropertyTable(XCreator xCreator) { |
|
|
|
this.xCreator = xCreator; |
|
|
|
this.xCreator = xCreator; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { |
|
|
|
public CRPropertyDescriptor[] supportedDescriptor() throws IntrospectionException { |
|
|
|
if (((ElementCaseEditor ) xCreator.toData()).getVerticalAttr().getState() == 2 && !((ElementCaseEditor ) xCreator.toData()).isHeightRestrict()) { |
|
|
|
if (((ElementCaseEditor ) xCreator.toData()).getVerticalAttr() == MobileFitAttrState.VERTICAL && !((ElementCaseEditor ) xCreator.toData()).isHeightRestrict()) { |
|
|
|
((ElementCaseEditor ) xCreator.toData()).setHeightRestrict(true); |
|
|
|
((ElementCaseEditor ) xCreator.toData()).setHeightRestrict(true); |
|
|
|
|
|
|
|
cascade = true; |
|
|
|
return revealHeightLimit(); |
|
|
|
return revealHeightLimit(); |
|
|
|
} |
|
|
|
} |
|
|
|
CRPropertyDescriptor[] crp = ((ElementCaseEditor) xCreator.toData()).isHeightRestrict() ? revealHeightLimit() : getDefault(); |
|
|
|
CRPropertyDescriptor[] crp = ((ElementCaseEditor) xCreator.toData()).isHeightRestrict() ? revealHeightLimit() : getDefault(); |
|
|
|
|
|
|
|
cascade = ((ElementCaseEditor ) xCreator.toData()).getVerticalAttr() == MobileFitAttrState.VERTICAL; |
|
|
|
return crp; |
|
|
|
return crp; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -53,6 +57,7 @@ public class ElementCasePropertyTable extends AbstractPropertyTable{ |
|
|
|
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, Inter.getLocText("FR-Designer_Fit-App")), |
|
|
|
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, Inter.getLocText("FR-Designer_Fit-App")), |
|
|
|
new CRPropertyDescriptor("heightRestrict", this.xCreator.toData().getClass()).setEditorClass(InChangeBooleanEditor.class) |
|
|
|
new CRPropertyDescriptor("heightRestrict", this.xCreator.toData().getClass()).setEditorClass(InChangeBooleanEditor.class) |
|
|
|
.setI18NName(Inter.getLocText("Form-EC_heightrestrict")) |
|
|
|
.setI18NName(Inter.getLocText("Form-EC_heightrestrict")) |
|
|
|
|
|
|
|
.setRendererClass(BooleanRender.class) |
|
|
|
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, Inter.getLocText("FR-Designer_Fit-App")) |
|
|
|
.putKeyValue(XCreatorConstants.PROPERTY_CATEGORY, Inter.getLocText("FR-Designer_Fit-App")) |
|
|
|
}; |
|
|
|
}; |
|
|
|
List<CRPropertyDescriptor> defaultList = new ArrayList<>(); |
|
|
|
List<CRPropertyDescriptor> defaultList = new ArrayList<>(); |
|
|
@ -103,6 +108,14 @@ public class ElementCasePropertyTable extends AbstractPropertyTable{ |
|
|
|
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED); |
|
|
|
designer.getEditListenerTable().fireCreatorModified(DesignerEvent.CREATOR_EDITED); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean isCellEditable(int row, int column) { |
|
|
|
|
|
|
|
if (cascade && row ==3 ) { |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return super.isCellEditable(row, column); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void populate(FormDesigner designer) { |
|
|
|
public void populate(FormDesigner designer) { |
|
|
|
this.designer = designer; |
|
|
|
this.designer = designer; |
|
|
|
initPropertyGroups(this.designer.getTarget()); |
|
|
|
initPropertyGroups(this.designer.getTarget()); |
|
|
|