當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。