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


Java LabeledComponent.setLabelLocation方法代码示例

本文整理汇总了Java中com.intellij.openapi.ui.LabeledComponent.setLabelLocation方法的典型用法代码示例。如果您正苦于以下问题:Java LabeledComponent.setLabelLocation方法的具体用法?Java LabeledComponent.setLabelLocation怎么用?Java LabeledComponent.setLabelLocation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.ui.LabeledComponent的用法示例。


在下文中一共展示了LabeledComponent.setLabelLocation方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getMainComponent

import com.intellij.openapi.ui.LabeledComponent; //导入方法依赖的package包/类
public JComponent getMainComponent() {

    final LabeledComponent<JComboBox> component = new LabeledComponent<JComboBox>();
    component.setText("Default &project copyright:");
    component.setLabelLocation(BorderLayout.WEST);
    component.setComponent(myProfilesComboBox);
    ElementProducer<ScopeSetting> producer = new ElementProducer<ScopeSetting>() {
      @Override
      public ScopeSetting createElement() {
        return new ScopeSetting(DefaultScopesProvider.getAllScope(), myProfilesModel.getAllProfiles().values().iterator().next());
      }

      @Override
      public boolean canCreateElement() {
        return !myProfilesModel.getAllProfiles().isEmpty();
      }
    };
    ToolbarDecorator decorator = ToolbarDecorator.createDecorator(myScopeMappingTable, producer);
    return JBUI.Panels.simplePanel(0, 10)
      .addToTop(component)
      .addToCenter(decorator.createPanel())
      .addToBottom(myScopesLink);
  }
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:ProjectSettingsPanel.java

示例2: addComponents

import com.intellij.openapi.ui.LabeledComponent; //导入方法依赖的package包/类
@Override
protected void addComponents() {
    interpreterNameField = new TextFieldWithBrowseButton();
    interpreterNameField.addBrowseFolderListener("Choose interpreter...", "", getProject(), FileChooserDescriptorFactory.createSingleLocalFileDescriptor());
    LabeledComponent<JComponent> interpreterNameComponent = LabeledComponent.create(createComponentWithMacroBrowse(interpreterNameField), "Interpreter:");
    interpreterNameComponent.setLabelLocation(BorderLayout.WEST);
    add(interpreterNameComponent);

    interpreterOptionsComponent = LabeledComponent.create(new RawCommandLineEditor(), "Interpreter options");
    interpreterOptionsComponent.setLabelLocation(BorderLayout.WEST);
    add(interpreterOptionsComponent);

    programNameField = new TextFieldWithBrowseButton();
    programNameField.addBrowseFolderListener("Choose script...", "", getProject(), FileChooserDescriptorFactory.createSingleLocalFileDescriptor());
    LabeledComponent<JComponent> programNameComponent = LabeledComponent.create(createComponentWithMacroBrowse(programNameField), "Script:");
    programNameComponent.setLabelLocation(BorderLayout.WEST);
    add(programNameComponent);

    programParametersComponent = LabeledComponent.create(new RawCommandLineEditor(), "Script parameters:");
    programParametersComponent.setLabelLocation(BorderLayout.WEST);
    add(programParametersComponent);
}
 
开发者ID:d0as8,项目名称:PerlRun,代码行数:23,代码来源:Form.java

示例3: getMainComponent

import com.intellij.openapi.ui.LabeledComponent; //导入方法依赖的package包/类
public JComponent getMainComponent() {
  final JPanel panel = new JPanel(new BorderLayout(0, 10));
  final LabeledComponent<JComboBox> component = new LabeledComponent<JComboBox>();
  component.setText("Default &project copyright:");
  component.setLabelLocation(BorderLayout.WEST);
  component.setComponent(myProfilesComboBox);
  panel.add(component, BorderLayout.NORTH);
  ElementProducer<ScopeSetting> producer = new ElementProducer<ScopeSetting>() {
    @Override
    public ScopeSetting createElement() {
      return new ScopeSetting(DefaultScopesProvider.getAllScope(), myProfilesModel.getAllProfiles().values().iterator().next());
    }

    @Override
    public boolean canCreateElement() {
      return !myProfilesModel.getAllProfiles().isEmpty();
    }
  };
  ToolbarDecorator decorator = ToolbarDecorator.createDecorator(myScopeMappingTable, producer);
  panel.add(decorator.createPanel(), BorderLayout.CENTER);
  panel.add(myScopesLink, BorderLayout.SOUTH);
  return panel;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:24,代码来源:ProjectSettingsPanel.java

示例4: createReplaceFieldsWithGettersPanel

import com.intellij.openapi.ui.LabeledComponent; //导入方法依赖的package包/类
@Override
protected JPanel createReplaceFieldsWithGettersPanel() {
  final LabeledComponent<JComboBox> component = new LabeledComponent<JComboBox>();
  myReplaceFieldsCb = new JComboBox(new Integer[]{IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_ALL,
    IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_INACCESSIBLE,
    IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_NONE});
  myReplaceFieldsCb.setRenderer(new ListCellRendererWrapper<Integer>() {
    @Override
    public void customize(JList list, Integer value, int index, boolean selected, boolean hasFocus) {
      switch (value) {
        case IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_NONE:
          setText(UIUtil.removeMnemonic(RefactoringBundle.message("do.not.replace")));
          break;
        case IntroduceParameterRefactoring.REPLACE_FIELDS_WITH_GETTERS_INACCESSIBLE:
          setText(UIUtil.removeMnemonic(RefactoringBundle.message("replace.fields.inaccessible.in.usage.context")));
          break;
        default:
          setText(UIUtil.removeMnemonic(RefactoringBundle.message("replace.all.fields")));
      }
    }
  });
  myReplaceFieldsCb.setSelectedItem(JavaRefactoringSettings.getInstance().INTRODUCE_PARAMETER_REPLACE_FIELDS_WITH_GETTERS);
  KeyboardComboSwitcher.setupActions(myReplaceFieldsCb, myProject);
  component.setComponent(myReplaceFieldsCb);
  component.setText(RefactoringBundle.message("replace.fields.used.in.expressions.with.their.getters"));
  component.getLabel().setDisplayedMnemonic('u');
  component.setLabelLocation(BorderLayout.NORTH);
  component.setBorder(IdeBorderFactory.createEmptyBorder(3, 3, 2, 2));
  return component;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:31,代码来源:InplaceIntroduceParameterUI.java

示例5: createBasePanel

import com.intellij.openapi.ui.LabeledComponent; //导入方法依赖的package包/类
@Override
protected JPanel createBasePanel() {
  final JPanel panel = super.createBasePanel();

  final Project project = ProjectManager.getInstance().getDefaultProject();
  final List<Sdk> sdks = PyConfigurableInterpreterList.getInstance(project).getAllPythonSdks();
  VirtualEnvProjectFilter.removeAllAssociated(sdks);
  Sdk compatibleSdk = sdks.isEmpty() ? null : sdks.iterator().next();
  DirectoryProjectGenerator generator = getProjectGenerator();
  if (generator instanceof PyFrameworkProjectGenerator && !((PyFrameworkProjectGenerator)generator).supportsPython3()) {
    if (compatibleSdk != null && PythonSdkType.getLanguageLevelForSdk(compatibleSdk).isPy3K()) {
      Sdk python2Sdk = PythonSdkType.findPython2Sdk(sdks);
      if (python2Sdk != null) {
        compatibleSdk = python2Sdk;
      }
    }
  }

  final Sdk preferred = compatibleSdk;
  mySdkCombo = new PythonSdkChooserCombo(project, sdks, new Condition<Sdk>() {
    @Override
    public boolean value(Sdk sdk) {
      return sdk == preferred;
    }
  });
  mySdkCombo.setButtonIcon(PythonIcons.Python.InterpreterGear);

  final LabeledComponent<PythonSdkChooserCombo> labeled = LabeledComponent.create(mySdkCombo, "Interpreter");
  labeled.setLabelLocation(BorderLayout.WEST);
  UIUtil.mergeComponentsWithAnchor(labeled, (PanelWithAnchor)panel.getComponent(0));
  panel.add(labeled);
  final JPanel basePanelExtension = extendBasePanel();
  if (basePanelExtension != null) {
    panel.add(basePanelExtension);
  }

  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:39,代码来源:ProjectSpecificSettingsStep.java

示例6: getMainComponent

import com.intellij.openapi.ui.LabeledComponent; //导入方法依赖的package包/类
public JComponent getMainComponent() {
    final JPanel panel = new JPanel(new BorderLayout(0, 10));
    final LabeledComponent<JComboBox> component = new LabeledComponent<JComboBox>();
    component.setText("Default &project Nuxeo SDK:");
    component.setLabelLocation(BorderLayout.WEST);
    component.setComponent(nuxeoSDKsComboBox);
    panel.add(component, BorderLayout.NORTH);
    return panel;
}
 
开发者ID:troger,项目名称:nuxeo-intellij,代码行数:10,代码来源:NuxeoProjectSettingsPanel.java


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