本文整理汇总了Java中com.intellij.uiDesigner.core.GridConstraints.setUseParentLayout方法的典型用法代码示例。如果您正苦于以下问题:Java GridConstraints.setUseParentLayout方法的具体用法?Java GridConstraints.setUseParentLayout怎么用?Java GridConstraints.setUseParentLayout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.uiDesigner.core.GridConstraints
的用法示例。
在下文中一共展示了GridConstraints.setUseParentLayout方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setValueImpl
import com.intellij.uiDesigner.core.GridConstraints; //导入方法依赖的package包/类
protected void setValueImpl(RadComponent component, Boolean value) throws Exception {
final boolean useParentLayout = value.booleanValue();
final GridConstraints constraints = component.getConstraints();
if (constraints.isUseParentLayout() != useParentLayout) {
GridConstraints oldConstraints = (GridConstraints)constraints.clone();
constraints.setUseParentLayout(useParentLayout);
component.fireConstraintsChanged(oldConstraints);
}
}
示例2: readChildConstraints
import com.intellij.uiDesigner.core.GridConstraints; //导入方法依赖的package包/类
void readChildConstraints(final Element constraintsElement, final LwComponent component) {
// Read Grid constraints
final Element gridElement = LwXmlReader.getChild(constraintsElement, "grid");
if(gridElement != null){
final GridConstraints constraints=new GridConstraints();
constraints.setRow(LwXmlReader.getRequiredInt(gridElement, "row"));
constraints.setColumn(LwXmlReader.getRequiredInt(gridElement, "column"));
constraints.setRowSpan(LwXmlReader.getRequiredInt(gridElement, "row-span"));
constraints.setColSpan(LwXmlReader.getRequiredInt(gridElement, "col-span"));
constraints.setVSizePolicy(LwXmlReader.getRequiredInt(gridElement, "vsize-policy"));
constraints.setHSizePolicy(LwXmlReader.getRequiredInt(gridElement, "hsize-policy"));
constraints.setAnchor(LwXmlReader.getRequiredInt(gridElement, "anchor"));
constraints.setFill(LwXmlReader.getRequiredInt(gridElement, "fill"));
constraints.setIndent(LwXmlReader.getOptionalInt(gridElement, UIFormXmlConstants.ATTRIBUTE_INDENT, 0));
constraints.setUseParentLayout(LwXmlReader.getOptionalBoolean(gridElement, UIFormXmlConstants.ATTRIBUTE_USE_PARENT_LAYOUT, false));
// minimum size
final Element minSizeElement = LwXmlReader.getChild(gridElement, "minimum-size");
if (minSizeElement != null) {
constraints.myMinimumSize.width = LwXmlReader.getRequiredInt(minSizeElement, "width");
constraints.myMinimumSize.height = LwXmlReader.getRequiredInt(minSizeElement, "height");
}
// preferred size
final Element prefSizeElement = LwXmlReader.getChild(gridElement, "preferred-size");
if (prefSizeElement != null) {
constraints.myPreferredSize.width = LwXmlReader.getRequiredInt(prefSizeElement, "width");
constraints.myPreferredSize.height = LwXmlReader.getRequiredInt(prefSizeElement, "height");
}
// maximum size
final Element maxSizeElement = LwXmlReader.getChild(gridElement, "maximum-size");
if (maxSizeElement != null) {
constraints.myMaximumSize.width = LwXmlReader.getRequiredInt(maxSizeElement, "width");
constraints.myMaximumSize.height = LwXmlReader.getRequiredInt(maxSizeElement, "height");
}
component.getConstraints().restore(constraints);
}
}