当前位置: 首页>>代码示例>>Java>>正文


Java GridConstraints.setUseParentLayout方法代码示例

本文整理汇总了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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:UseParentLayoutProperty.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:42,代码来源:GridLayoutSerializer.java


注:本文中的com.intellij.uiDesigner.core.GridConstraints.setUseParentLayout方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。