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


Java VerticalLayout类代码示例

本文整理汇总了Java中com.intellij.ui.components.panels.VerticalLayout的典型用法代码示例。如果您正苦于以下问题:Java VerticalLayout类的具体用法?Java VerticalLayout怎么用?Java VerticalLayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


VerticalLayout类属于com.intellij.ui.components.panels包,在下文中一共展示了VerticalLayout类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: initUi

import com.intellij.ui.components.panels.VerticalLayout; //导入依赖的package包/类
private void initUi() {
  bazelBinaryPath =
      FileSelectorWithStoredHistory.create(
          BlazeUserSettingsConfigurable.BAZEL_BINARY_PATH_KEY, "Specify the bazel binary path");
  bazelBinaryPath.setText(getInitialBinaryPath());
  bazelBinaryPath.setName("bazel-binary-path-field");

  component = new JPanel(new VerticalLayout(4));
  component.add(new JLabel("Select a bazel binary"));
  component.add(new JSeparator());

  JPanel content = new JPanel(new VerticalLayout(12));
  content.setBorder(new EmptyBorder(50, 100, 0, 100));
  component.add(content);

  content.add(new JLabel("Specify a bazel binary to be used for all bazel projects"));
  content.add(bazelBinaryPath);
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:19,代码来源:SelectBazelBinaryControl.java

示例2: AddSourceToProjectDialog

import com.intellij.ui.components.panels.VerticalLayout; //导入依赖的package包/类
AddSourceToProjectDialog(Project project, List<TargetInfo> targets) {
  super(project, /* canBeParent */ true, IdeModalityType.MODELESS);
  this.project = project;

  mainPanel = new JPanel(new VerticalLayout(12));

  @SuppressWarnings({"rawtypes", "unchecked"}) // #api171: generify JBList usage
  JList<TargetInfo> targetsComponent = new JBList(targets);
  if (targets.size() == 1) {
    targetsComponent.setSelectedIndex(0);
  }
  this.targetsComponent = targetsComponent;

  setTitle("Add Source File to Project");
  setupUi();
  init();
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:18,代码来源:AddSourceToProjectDialog.java

示例3: createComponent

import com.intellij.ui.components.panels.VerticalLayout; //导入依赖的package包/类
@Nullable
@Override
public JComponent createComponent() {
    JPanel jPanel = new JPanel();

    VerticalLayout verticalLayout = new VerticalLayout(1, 2);
    jPanel.setLayout(verticalLayout);

    jFilePickerClang = new JFilePicker("clang-format Path:", "...");
    jLabeledCombox = new JLabeledCombox("Code Style: ");
    jCheckBox = new JCheckBox("Automatically show this page if clang-format is not found.");

    reset();

    jFilePickerClang.getTextField().getDocument().addDocumentListener(listener);
    jLabeledCombox.getCombobox().addItemListener(combox_listener);
    jCheckBox.addActionListener(checkbox_listener);

    jPanel.add(jCheckBox);
    jPanel.add(jFilePickerClang);
    jPanel.add(jLabeledCombox);

    return jPanel;
}
 
开发者ID:itechbear,项目名称:CLion-MacroFormatter,代码行数:25,代码来源:ConfigurationPanel.java

示例4: createComponent

import com.intellij.ui.components.panels.VerticalLayout; //导入依赖的package包/类
@Nullable
@Override
public JComponent createComponent() {
    JPanel result = new JPanel(new BorderLayout());
    JPanel propertyTablePanel = new JPanel(new VerticalLayout(1));
    propertyTablePanel.add(createIgnorePropertiesFilesTable());
    propertyTablePanel.add(createExcludePropertiesFilesTable());
    result.add(propertyTablePanel);

    return result;
}
 
开发者ID:camel-idea-plugin,项目名称:camel-idea-plugin,代码行数:12,代码来源:CamelIgnoreAndExcludePage.java

示例5: setupUi

import com.intellij.ui.components.panels.VerticalLayout; //导入依赖的package包/类
private void setupUi() {
  JPanel panel = new JPanel(new VerticalLayout(12));
  panel.setBorder(
      IdeBorderFactory.createTitledBorder(
          String.format("Add %s target(s) to project", Blaze.buildSystemName(project)), false));
  panel.add(targetsComponent);
  mainPanel.add(panel);
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:9,代码来源:AddSourceToProjectDialog.java

示例6: BlazeSelectOptionControl

import com.intellij.ui.components.panels.VerticalLayout; //导入依赖的package包/类
BlazeSelectOptionControl(BlazeNewProjectBuilder builder, Collection<T> options) {
  if (options == null) {
    logger.error("No options on select screen '" + getTitle() + "'");
  }

  this.userSettings = builder.getUserSettings();

  JPanel canvas = new JPanel(new BorderLayout(0, 4));

  canvas.setPreferredSize(ProjectViewUi.getContainerSize());

  titleLabel = new JLabel(getTitle());
  canvas.add(titleLabel);
  canvas.add(new JSeparator());

  JPanel content = new JPanel(new VerticalLayout(12));
  content.setBorder(new EmptyBorder(20, 100, 0, 0));
  JScrollPane scrollPane = new JScrollPane(content);
  scrollPane.setBorder(BorderFactory.createEmptyBorder());
  canvas.add(scrollPane);

  ButtonGroup buttonGroup = new ButtonGroup();
  Collection<OptionUiEntry<T>> optionUiEntryList = Lists.newArrayList();
  for (T option : options) {
    JPanel vertical = new JPanel(new VerticalLayout(10));
    JRadioButton radioButton = new JRadioButton();
    radioButton.setText(option.getOptionText());
    vertical.add(radioButton);

    JComponent optionComponent = option.getUiComponent();
    if (optionComponent != null) {
      JPanel horizontal = new JPanel(new HorizontalLayout(0));
      horizontal.setBorder(new EmptyBorder(0, 25, 0, 0));
      horizontal.add(optionComponent);
      vertical.add(horizontal);

      option.optionDeselected();
      radioButton.addItemListener(
          itemEvent -> {
            if (radioButton.isSelected()) {
              option.optionSelected();
            } else {
              option.optionDeselected();
            }
          });
    }

    content.add(vertical);
    buttonGroup.add(radioButton);
    optionUiEntryList.add(new OptionUiEntry<>(option, radioButton));
  }

  OptionUiEntry selected = null;
  String previouslyChosenOption = userSettings.get(getOptionKey(), null);
  if (previouslyChosenOption != null) {
    for (OptionUiEntry<T> entry : optionUiEntryList) {
      if (entry.option.getOptionName().equals(previouslyChosenOption)) {
        selected = entry;
        break;
      }
    }
  }
  if (selected == null) {
    selected = Iterables.getFirst(optionUiEntryList, null);
  }
  if (selected != null) {
    selected.radioButton.setSelected(true);
  }

  this.canvas = canvas;
  this.optionUiEntryList = optionUiEntryList;
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:73,代码来源:BlazeSelectOptionControl.java

示例7: createComponent

import com.intellij.ui.components.panels.VerticalLayout; //导入依赖的package包/类
@RequiredDispatchThread
@Override
public JComponent createComponent() {
  if (component == null) {
    for (BreadcrumbsProvider provider : BreadcrumbsProvider.EP_NAME.getExtensions()) {
      Language language = provider.getLanguage();
      String id = language.getID();
      if (!map.containsKey(id)) {
        map.put(id, new JCheckBox(language.getDisplayName()));
      }
    }
    JPanel boxes = new JPanel(new GridLayout(0, 3));
    for (JCheckBox box : map.values()) boxes.add(box);

    show = new JCheckBox(message("checkbox.show.breadcrumbs"));
    show.addItemListener(event -> updateEnabled());

    above = new JRadioButton(message("radio.show.breadcrumbs.above"));
    below = new JRadioButton(message("radio.show.breadcrumbs.below"));

    ButtonGroup group = new ButtonGroup();
    group.add(above);
    group.add(below);

    placement = new JLabel(message("label.breadcrumbs.placement"));
    placement.setBorder(JBUI.Borders.emptyRight(12));

    JPanel placementPanel = new JPanel(new HorizontalLayout(0));
    placementPanel.setBorder(JBUI.Borders.emptyLeft(24));
    placementPanel.add(placement);
    placementPanel.add(above);
    placementPanel.add(below);

    languages = new JLabel(message("label.breadcrumbs.languages"));

    JPanel languagesPanel = new JPanel(new VerticalLayout(JBUI.scale(6)));
    languagesPanel.setBorder(JBUI.Borders.empty(0, 24, 12, 0));
    languagesPanel.add(languages);
    languagesPanel.add(boxes);

    component = new JPanel(new VerticalLayout(JBUI.scale(12), LEFT));
    component.add(show);
    component.add(placementPanel);
    component.add(languagesPanel);
    component.add(LinkLabel.create(message("configure.breadcrumbs.colors"), () -> {
      DataContext context = DataManager.getInstance().getDataContext(component);
      ColorAndFontOptions.selectOrEditColor(context, "Breadcrumbs//Current", GeneralColorsPage.class);
    }));
  }
  return component;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:52,代码来源:BreadcrumbsConfigurable.java


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