Java Code Examples for com.intellij.uiDesigner.core.GridConstraints#setFill()

The following examples show how to use com.intellij.uiDesigner.core.GridConstraints#setFill() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HaxeConfigurationEditor.java    From intellij-haxe with Apache License 2.0 6 votes vote down vote up
private void updateUserProperties() {
  boolean contains = false;
  Component[] components = myCompilerOptionsWrapper.getComponents();
  for (Component component : components) {
    if (component == myCompilerOptions) {
      contains = true;
      break;
    }
  }
  if (myUserPropertiesRadioButton.isSelected() && !contains) {
    final GridConstraints constraints = new GridConstraints();
    constraints.setRow(0);
    constraints.setFill(GridConstraints.FILL_HORIZONTAL);
    myCompilerOptionsWrapper.add(myCompilerOptions, constraints);
  }
  else if (!myUserPropertiesRadioButton.isSelected() && contains) {
    myCompilerOptionsWrapper.remove(myCompilerOptions);
  }
}
 
Example 2
Source File: HaxeConfigurationEditor.java    From intellij-haxe with Apache License 2.0 6 votes vote down vote up
private void initExtensions() {
  final HaxeModuleSettings settings = HaxeModuleSettings.getInstance(myModule);
  final HaxeModuleConfigurationExtensionPoint[] extensionPoints = HaxeModuleConfigurationExtensionPoint.EP_NAME.getExtensions();

  if (extensionPoints.length > 0) {
    final GridLayoutManager layoutManager = new GridLayoutManager(extensionPoints.length, 1);
    myAdditionalComponentPanel.setLayout(layoutManager);
  }
  for (int i = 0; i < extensionPoints.length; i++) {
    HaxeModuleConfigurationExtensionPoint extensionPoint = extensionPoints[i];
    final GridConstraints gridConstraints = new GridConstraints();
    gridConstraints.setFill(GridConstraints.FILL_HORIZONTAL);
    gridConstraints.setRow(i);

    final UnnamedConfigurable configurable = extensionPoint.createConfigurable(settings);
    configurables.add(configurable);
    myAdditionalComponentPanel.add(configurable.createComponent(), gridConstraints);
  }
}
 
Example 3
Source File: HaxeConfigurationEditor.java    From intellij-haxe with Apache License 2.0 4 votes vote down vote up
private void updateFileChooser() {
  boolean containsHxml = false;
  boolean containsNME = false;
  boolean containsOpenFL = false;
  Component[] components = myBuildFilePanel.getComponents();
  for (Component component : components) {
    if (component == myHxmlFileChooserPanel) {
      containsHxml = true;
    }
    if (component == myNMEFilePanel) {
      containsNME = true;
    }
    if (component == myOpenFLFilePanel) {
      containsOpenFL = true;
    }
  }
  if (!myHxmlFileRadioButton.isSelected() && containsHxml) {
    myBuildFilePanel.remove(myHxmlFileChooserPanel);
  }
  if (!myNmmlFileRadioButton.isSelected() && containsNME) {
    myBuildFilePanel.remove(myNMEFilePanel);
  }

  if (!myOpenFLFileRadioButton.isSelected() && containsOpenFL) {
    myBuildFilePanel.remove(myOpenFLFilePanel);
    myBuildFilePanel.remove(myOpenFLFileChooserTextField);
  }

  final GridConstraints constraints = new GridConstraints();
  constraints.setRow(0);
  constraints.setFill(GridConstraints.FILL_HORIZONTAL);
  if (myHxmlFileRadioButton.isSelected() && !containsHxml) {
    myBuildFilePanel.add(myHxmlFileChooserPanel, constraints);
  }
  if (myNmmlFileRadioButton.isSelected() && !containsNME) {
    myBuildFilePanel.add(myNMEFilePanel, constraints);
  }

  if (myOpenFLFileRadioButton.isSelected() && !containsOpenFL) {
    myBuildFilePanel.add(myOpenFLFilePanel, constraints);
  }
  myBuildFilePanel.repaint();
}