Java 类com.intellij.uiDesigner.propertyInspector.properties.HSizePolicyProperty 实例源码

项目:intellij-ce-playground    文件:GridLayoutColumnProperties.java   
public GridLayoutColumnProperties() {
  myWantGrowCheckBox.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      for(RadComponent c: myContainer.getComponents()) {
        if (c.getConstraints().getCell(myRow) == mySelectedIndex) {
          Property<RadComponent, Integer> property = myRow
                                                     ? VSizePolicyProperty.getInstance(c.getProject())
                                                     : HSizePolicyProperty.getInstance(c.getProject());
          if (myWantGrowCheckBox.isSelected()) {
            property.setValueEx(c, property.getValue(c).intValue() | GridConstraints.SIZEPOLICY_WANT_GROW);
            break;
          }
          else {
            if ((property.getValue(c).intValue() & GridConstraints.SIZEPOLICY_WANT_GROW) != 0) {
              property.setValueEx(c, property.getValue(c).intValue() & ~GridConstraints.SIZEPOLICY_WANT_GROW);
              break;
            }
          }
        }
      }
      for(ChangeListener listener: myListeners) {
        listener.stateChanged(new ChangeEvent(this));
      }
    }
  });
}
项目:tools-idea    文件:GridLayoutColumnProperties.java   
public GridLayoutColumnProperties() {
  myWantGrowCheckBox.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      for(RadComponent c: myContainer.getComponents()) {
        if (c.getConstraints().getCell(myRow) == mySelectedIndex) {
          Property<RadComponent, Integer> property = myRow
                                                     ? VSizePolicyProperty.getInstance(c.getProject())
                                                     : HSizePolicyProperty.getInstance(c.getProject());
          if (myWantGrowCheckBox.isSelected()) {
            property.setValueEx(c, property.getValue(c).intValue() | GridConstraints.SIZEPOLICY_WANT_GROW);
            break;
          }
          else {
            if ((property.getValue(c).intValue() & GridConstraints.SIZEPOLICY_WANT_GROW) != 0) {
              property.setValueEx(c, property.getValue(c).intValue() & ~GridConstraints.SIZEPOLICY_WANT_GROW);
              break;
            }
          }
        }
      }
      for(ChangeListener listener: myListeners) {
        listener.stateChanged(new ChangeEvent(this));
      }
    }
  });
}
项目:consulo-ui-designer    文件:GridLayoutColumnProperties.java   
public GridLayoutColumnProperties() {
  myWantGrowCheckBox.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
      for(RadComponent c: myContainer.getComponents()) {
        if (c.getConstraints().getCell(myRow) == mySelectedIndex) {
          Property<RadComponent, Integer> property = myRow
                                                     ? VSizePolicyProperty.getInstance(c.getProject())
                                                     : HSizePolicyProperty.getInstance(c.getProject());
          if (myWantGrowCheckBox.isSelected()) {
            property.setValueEx(c, property.getValue(c).intValue() | GridConstraints.SIZEPOLICY_WANT_GROW);
            break;
          }
          else {
            if ((property.getValue(c).intValue() & GridConstraints.SIZEPOLICY_WANT_GROW) != 0) {
              property.setValueEx(c, property.getValue(c).intValue() & ~GridConstraints.SIZEPOLICY_WANT_GROW);
              break;
            }
          }
        }
      }
      for(ChangeListener listener: myListeners) {
        listener.stateChanged(new ChangeEvent(this));
      }
    }
  });
}