• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SeparatorFactory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: createParametersPanel

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
protected void createParametersPanel() {
  if (myParamTable != null) {
    myCenterPanel.remove(myParamTable);
  }

  myParamTable = createParameterTableComponent();
  myParamTable.setMinimumSize(JBUI.size(500, 100));
  myCenterPanel.add(myParamTable, BorderLayout.CENTER);
  final JTable table = UIUtil.findComponentOfType(myParamTable, JTable.class);
  myCenterPanel.add(SeparatorFactory.createSeparator("&Parameters", table), BorderLayout.NORTH);
  if (table != null) {
    table.addFocusListener(new FocusAdapter() {
      @Override
      public void focusGained(FocusEvent e) {
        if (table.getRowCount() > 0) {
          final int col = table.getSelectedColumn();
          final int row = table.getSelectedRow();
          if (col == -1 || row == -1) {
            table.getSelectionModel().setSelectionInterval(0, 0);
            table.getColumnModel().getSelectionModel().setSelectionInterval(0, 0);
          }
        }
      }
    });
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:ExtractMethodDialog.java


示例2: createParametersPanel

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
protected void createParametersPanel() {
  if (myParamTable != null) {
    myCenterPanel.remove(myParamTable);
  }

  myParamTable = createParameterTableComponent();
  myParamTable.setMinimumSize(new Dimension(500, 100));
  myCenterPanel.add(myParamTable, BorderLayout.CENTER);
  final JTable table = UIUtil.findComponentOfType(myParamTable, JTable.class);
  myCenterPanel.add(SeparatorFactory.createSeparator("&Parameters", table), BorderLayout.NORTH);
  if (table != null) {
    table.addFocusListener(new FocusAdapter() {
      @Override
      public void focusGained(FocusEvent e) {
        if (table.getRowCount() > 0) {
          final int col = table.getSelectedColumn();
          final int row = table.getSelectedRow();
          if (col == -1 || row == -1) {
            table.getSelectionModel().setSelectionInterval(0, 0);
            table.getColumnModel().getSelectionModel().setSelectionInterval(0, 0);
          }
        }
      }
    });
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:27,代码来源:ExtractMethodDialog.java


示例3: createSignaturePanel

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
protected JComponent createSignaturePanel() {
  final JPanel panel = new JPanel(new BorderLayout());
  panel.add(SeparatorFactory.createSeparator(RefactoringBundle.message("signature.preview.border.title"), null), BorderLayout.NORTH);
  panel.add(mySignature, BorderLayout.CENTER);

  updateSignature();
  return panel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:ExtractMethodDialog.java


示例4: MemberSelectionPanel

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
/**
 * @param title if title contains 'm' - it would look and feel as mnemonic
 */
public MemberSelectionPanel(String title, List<MemberInfo> memberInfo, String abstractColumnHeader) {
  super();
  setLayout(new BorderLayout());

  myTable = createMemberSelectionTable(memberInfo, abstractColumnHeader);
  JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTable);
  add(SeparatorFactory.createSeparator(title, myTable), BorderLayout.NORTH);
  add(scrollPane, BorderLayout.CENTER);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:MemberSelectionPanel.java


示例5: createSearchScopePanel

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
@Nullable
private JComponent createSearchScopePanel() {
  if (isInFileOnly()) return null;
  JPanel optionsPanel = new JPanel(new BorderLayout());
  String scope = myFindUsagesOptions.searchScope.getDisplayName();
  myScopeCombo = new ScopeChooserCombo(myProject, mySearchInLibrariesAvailable, true, scope);
  Disposer.register(myDisposable, myScopeCombo);
  optionsPanel.add(myScopeCombo, BorderLayout.CENTER);
  JComponent separator = SeparatorFactory.createSeparator(FindBundle.message("find.scope.label"), myScopeCombo.getComboBox());
  optionsPanel.add(separator, BorderLayout.NORTH);
  return optionsPanel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:AbstractFindUsagesDialog.java


示例6: MemberSelectionPanelBase

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
/**
 * @param title if title contains 'm' - it would look and feel as mnemonic
 */
public MemberSelectionPanelBase(String title, Table table) {
  super();
  setLayout(new BorderLayout());

  myTable = table;
  JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTable);
  add(SeparatorFactory.createSeparator(title, myTable), BorderLayout.NORTH);
  add(scrollPane, BorderLayout.CENTER);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:MemberSelectionPanelBase.java


示例7: TypeSelectionPanel

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
public TypeSelectionPanel(String title, List<TypeInfo> memberInfo) {
    super();
    setLayout(new BorderLayout());

    myTable = createMemberSelectionTable(memberInfo);
    JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTable);
    add(SeparatorFactory.createSeparator(title, myTable), BorderLayout.NORTH);
    add(scrollPane, BorderLayout.CENTER);
}
 
开发者ID:phajduk,项目名称:dagger2-intellij-plugin,代码行数:10,代码来源:TypeSelectionPanel.java


示例8: createComponent

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
@Nullable
@Override
public JComponent createComponent() {
    templateSettings = TemplateSettings.getInstance();
    editor = createEditorInPanel(templateSettings.provideTemplateForName(templateName));

    JPanel panel = new JPanel(new BorderLayout());
    panel.setPreferredSize(new Dimension(400, 300));
    panel.add(SeparatorFactory.createSeparator(templateHeaderText, null), BorderLayout.PAGE_START);
    panel.add(new ToolbarPanel(editorPanel, new DefaultActionGroup(new ResetToDefaultAction())), BorderLayout.CENTER);
    return panel;
}
 
开发者ID:cooliean,项目名称:android-codegenerator-plugin-intellij,代码行数:13,代码来源:TemplateConfigurable.java


示例9: createParametersPanel

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
protected void createParametersPanel()
{
	if(myParamTable != null)
	{
		myCenterPanel.remove(myParamTable);
	}

	myParamTable = createParameterTableComponent();
	myParamTable.setMinimumSize(JBUI.size(500, 100));
	myCenterPanel.add(myParamTable, BorderLayout.CENTER);
	final JTable table = UIUtil.findComponentOfType(myParamTable, JTable.class);
	myCenterPanel.add(SeparatorFactory.createSeparator("&Parameters", table), BorderLayout.NORTH);
	if(table != null)
	{
		table.addFocusListener(new FocusAdapter()
		{
			@Override
			public void focusGained(FocusEvent e)
			{
				if(table.getRowCount() > 0)
				{
					final int col = table.getSelectedColumn();
					final int row = table.getSelectedRow();
					if(col == -1 || row == -1)
					{
						table.getSelectionModel().setSelectionInterval(0, 0);
						table.getColumnModel().getSelectionModel().setSelectionInterval(0, 0);
					}
				}
			}
		});
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:34,代码来源:ExtractMethodDialog.java


示例10: createSignaturePanel

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
protected JComponent createSignaturePanel()
{
	final JPanel panel = new JPanel(new BorderLayout());
	panel.add(SeparatorFactory.createSeparator(RefactoringBundle.message("signature.preview.border.title"), null), BorderLayout.NORTH);
	panel.add(mySignature, BorderLayout.CENTER);

	updateSignature();
	return panel;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:10,代码来源:ExtractMethodDialog.java


示例11: MemberSelectionPanel

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
/**
 * @param title if title contains 'm' - it would look and feel as mnemonic
 */
public MemberSelectionPanel(String title, List<MemberInfo> memberInfo, String abstractColumnHeader)
{
	super();
	setLayout(new BorderLayout());

	myTable = createMemberSelectionTable(memberInfo, abstractColumnHeader);
	JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myTable);
	add(SeparatorFactory.createSeparator(title, myTable), BorderLayout.NORTH);
	add(scrollPane, BorderLayout.CENTER);
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:14,代码来源:MemberSelectionPanel.java


示例12: FrameworkSupportOptionsComponent

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
public FrameworkSupportOptionsComponent(FrameworkSupportModelBase model,
                                        LibrariesContainer container,
                                        Disposable parentDisposable,
                                        final FrameworkSupportInModuleProvider provider,
                                        final FrameworkSupportInModuleConfigurable configurable) {
  myModel = model;
  myConfigurable = configurable;
  VerticalFlowLayout layout = new VerticalFlowLayout(VerticalFlowLayout.TOP, 0, 3, true, false);
  layout.setVerticalFill(true);
  myMainPanel = new JPanel(layout);
  myModel.registerOptionsComponent(provider, this);
  List<FrameworkVersion> versions = provider.getFrameworkType().getVersions();
  if (!versions.isEmpty()) {
    myFrameworkVersionComponent = new FrameworkVersionComponent(model, provider.getFrameworkType().getId(), versions, "Versions:");
    myMainPanel.add(myFrameworkVersionComponent.getMainPanel());
  }
  else {
    myFrameworkVersionComponent = null;
  }

  final JComponent component = myConfigurable.createComponent();
  if (component != null) {
    myMainPanel.add(component);
  }

  final boolean addSeparator = component != null || myFrameworkVersionComponent != null;
  myLibraryOptionsPanelWrapper = new JPanel(new BorderLayout());
  myMainPanel.add(myLibraryOptionsPanelWrapper);
  if (myConfigurable instanceof OldFrameworkSupportProviderWrapper.FrameworkSupportConfigurableWrapper) {
    ((OldFrameworkSupportProviderWrapper.FrameworkSupportConfigurableWrapper)myConfigurable).getConfigurable().addListener(
      new FrameworkSupportConfigurableListener() {
        public void frameworkVersionChanged() {
          updateLibrariesPanel();
        }
      });
  }
  model.addFrameworkListener(new FrameworkSupportModelAdapter() {
    @Override
    public void wizardStepUpdated() {
      updateLibrariesPanel();
    }
  }, parentDisposable);

  final CustomLibraryDescription description = myConfigurable.createLibraryDescription();
  if (description != null) {
    myLibraryOptionsPanel = new LibraryOptionsPanel(description, new NotNullComputable<String>() {
      @NotNull
      @Override
      public String compute() {
        return myModel.getBaseDirectoryForLibrariesPath();
      }
    }, createLibraryVersionFilter(), container, !myConfigurable.isOnlyLibraryAdded()) {
      @Override
      protected void onVersionChanged(@Nullable String version) {
        if (myFrameworkVersionComponent == null) {
          myModel.setSelectedLibraryVersion(provider.getId(), version);
        }
      }
    };
    myLibraryOptionsPanel.setLibraryProvider(myModel.getLibraryProvider());
    Disposer.register(myConfigurable, myLibraryOptionsPanel);
    if (addSeparator) {
      JComponent separator1 = SeparatorFactory.createSeparator("Libraries", null);
      separator1.setBorder(IdeBorderFactory.createEmptyBorder(5, 0, 5, 5));
      myLibraryOptionsPanelWrapper.add(BorderLayout.NORTH, separator1);
    }
    myLibraryOptionsPanelWrapper.add(BorderLayout.CENTER, myLibraryOptionsPanel.getMainPanel());
    myLibraryOptionsPanelWrapper.setVisible(myConfigurable.isVisible());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:71,代码来源:FrameworkSupportOptionsComponent.java


示例13: createCenterPanel

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
public JComponent createCenterPanel() {
  final JPanel mainPanel = new JPanel();
  mainPanel.setLayout(new BorderLayout());
  final Splitter splitter = new Splitter(true, 0.8f);
  myChangesBrowser = new RepositoryChangesBrowser(myProject, Collections.singletonList(myChangeList),
                                                  new ArrayList<Change>(myChangeList.getChanges()),
                                                  myChangeList, myToSelect) {

    @Override
    protected void buildToolBar(DefaultActionGroup toolBarGroup) {
      super.buildToolBar(toolBarGroup);
      toolBarGroup.add(ActionManager.getInstance().getAction(VcsActions.ACTION_COPY_REVISION_NUMBER));
    }

    @Override
    protected void showDiffForChanges(final Change[] changesArray, final int indexInSelection) {
      if (myInAir && (myConvertor != null)) {
        final Change[] convertedChanges = new Change[changesArray.length];
        for (int i = 0; i < changesArray.length; i++) {
          Change change = changesArray[i];
          convertedChanges[i] = myConvertor.fun(change);
        }
        super.showDiffForChanges(convertedChanges, indexInSelection);
      } else {
        super.showDiffForChanges(changesArray, indexInSelection);
      }
    }
  };
  myChangesBrowser.setUseCase(myInAir ? CommittedChangesBrowserUseCase.IN_AIR : null);
  splitter.setFirstComponent(myChangesBrowser);

  if (myCommitMessageArea != null) {
    JPanel commitPanel = new JPanel(new BorderLayout());
    JComponent separator = SeparatorFactory.createSeparator(VcsBundle.message("label.commit.comment"), myCommitMessageArea);
    commitPanel.add(separator, BorderLayout.NORTH);
    commitPanel.add(commitMessageScroll, BorderLayout.CENTER);

    splitter.setSecondComponent(commitPanel);
  }
  mainPanel.add(splitter, BorderLayout.CENTER);

  final String description = getDescription();
  if (description != null) {
    JPanel descPanel = new JPanel();
    descPanel.add(new JLabel(XmlStringUtil.wrapInHtml(description)));
    descPanel.setBorder(BorderFactory.createEtchedBorder());
    mainPanel.add(descPanel, BorderLayout.NORTH);
  }
  return mainPanel;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:51,代码来源:ChangeListViewerDialog.java


示例14: createCenterPanel

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
@Override
protected JComponent createCenterPanel() {
  JPanel panel = new JPanel(new GridBagLayout());
  GridBagConstraints constr;

  // list label
  constr = new GridBagConstraints();
  constr.gridy = 0;
  constr.anchor = GridBagConstraints.WEST;
  constr.fill = GridBagConstraints.HORIZONTAL;
  panel.add(SeparatorFactory.createSeparator(IdeBundle.message("label.macros"), null), constr);

  // macros list
  constr = new GridBagConstraints();
  constr.gridy = 1;
  constr.weightx = 1;
  constr.weighty = 1;
  constr.fill = GridBagConstraints.BOTH;
  constr.anchor = GridBagConstraints.WEST;
  panel.add(ScrollPaneFactory.createScrollPane(myMacrosList), constr);
  myMacrosList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  myMacrosList.setPreferredSize(null);

  // preview label
  constr = new GridBagConstraints();
  constr.gridx = 0;
  constr.gridy = 2;
  constr.anchor = GridBagConstraints.WEST;
  constr.fill = GridBagConstraints.HORIZONTAL;
  panel.add(SeparatorFactory.createSeparator(IdeBundle.message("label.macro.preview"), null), constr);

  // preview
  constr = new GridBagConstraints();
  constr.gridx = 0;
  constr.gridy = 3;
  constr.weightx = 1;
  constr.weighty = 1;
  constr.fill = GridBagConstraints.BOTH;
  constr.anchor = GridBagConstraints.WEST;
  panel.add(ScrollPaneFactory.createScrollPane(myPreviewTextarea), constr);
  myPreviewTextarea.setEditable(false);
  myPreviewTextarea.setLineWrap(true);
  myPreviewTextarea.setPreferredSize(null);

  panel.setPreferredSize(JBUI.size(400, 500));

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


示例15: FrameworkSupportOptionsComponent

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
public FrameworkSupportOptionsComponent(FrameworkSupportModelBase model,
                                        LibrariesContainer container,
                                        Disposable parentDisposable,
                                        FrameworkSupportInModuleProvider provider,
                                        final FrameworkSupportInModuleConfigurable configurable) {
  myModel = model;
  myConfigurable = configurable;
  VerticalFlowLayout layout = new VerticalFlowLayout();
  layout.setVerticalFill(true);
  myMainPanel = new JPanel(layout);
  myModel.registerOptionsComponent(provider, this);
  List<FrameworkVersion> versions = provider.getFrameworkType().getVersions();
  if (!versions.isEmpty()) {
    myFrameworkVersionComponent = new FrameworkVersionComponent(model, provider.getFrameworkType().getId(), versions);
    myMainPanel.add(myFrameworkVersionComponent.getMainPanel());
  }

  final JComponent component = myConfigurable.createComponent();
  if (component != null) {
    myMainPanel.add(component);
  }

  final boolean addSeparator = component != null || myFrameworkVersionComponent != null;
  myLibraryOptionsPanelWrapper = new JPanel(new BorderLayout());
  myMainPanel.add(myLibraryOptionsPanelWrapper);
  if (myConfigurable instanceof OldFrameworkSupportProviderWrapper.FrameworkSupportConfigurableWrapper) {
    ((OldFrameworkSupportProviderWrapper.FrameworkSupportConfigurableWrapper)myConfigurable).getConfigurable().addListener(
      new FrameworkSupportConfigurableListener() {
        public void frameworkVersionChanged() {
          updateLibrariesPanel();
        }
      });
  }
  model.addFrameworkListener(new FrameworkSupportModelAdapter() {
    @Override
    public void wizardStepUpdated() {
      updateLibrariesPanel();
    }
  }, parentDisposable);

  final CustomLibraryDescription description = myConfigurable.createLibraryDescription();
  if (description != null) {
    myLibraryOptionsPanel = new LibraryOptionsPanel(description, myModel.getBaseDirectoryForLibrariesPath(), createLibraryVersionFilter(),
                                                    container, !myConfigurable.isOnlyLibraryAdded());
    Disposer.register(myConfigurable, myLibraryOptionsPanel);
    if (addSeparator) {
      JComponent separator1 = SeparatorFactory.createSeparator("Libraries", null);
      separator1.setBorder(IdeBorderFactory.createEmptyBorder(5, 0, 5, 5));
      myLibraryOptionsPanelWrapper.add(BorderLayout.NORTH, separator1);
    }
    myLibraryOptionsPanelWrapper.add(BorderLayout.CENTER, myLibraryOptionsPanel.getMainPanel());
    myLibraryOptionsPanelWrapper.setVisible(myConfigurable.isVisible());
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:55,代码来源:FrameworkSupportOptionsComponent.java


示例16: createCenterPanel

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
public JComponent createCenterPanel() {
  final JPanel mainPanel = new JPanel();
  mainPanel.setLayout(new BorderLayout());
  final Splitter splitter = new Splitter(true, 0.8f);
  myChangesBrowser = new RepositoryChangesBrowser(myProject, Collections.singletonList(myChangeList),
                                                  new ArrayList<Change>(myChangeList.getChanges()),
                                                  myChangeList, myToSelect) {

    @Override
    protected void buildToolBar(DefaultActionGroup toolBarGroup) {
      super.buildToolBar(toolBarGroup);
      toolBarGroup.add(new CopyRevisionNumberAction());
    }

    @Override
    public Object getData(@NonNls String dataId) {
      Object data = super.getData(dataId);
      if (data != null) {
        return data;
      }
      return ChangeListViewerDialog.this.getData(dataId);
    }

    @Override
    protected void showDiffForChanges(final Change[] changesArray, final int indexInSelection) {
      if (myInAir && (myConvertor != null)) {
        final Change[] convertedChanges = new Change[changesArray.length];
        for (int i = 0; i < changesArray.length; i++) {
          Change change = changesArray[i];
          convertedChanges[i] = myConvertor.fun(change);
        }
        super.showDiffForChanges(convertedChanges, indexInSelection);
      } else {
        super.showDiffForChanges(changesArray, indexInSelection);
      }
    }
  };
  myChangesBrowser.setUseCase(myInAir ? CommittedChangesBrowserUseCase.IN_AIR : null);
  splitter.setFirstComponent(myChangesBrowser);

  if (myCommitMessageArea != null) {
    JPanel commitPanel = new JPanel(new BorderLayout());
    JComponent separator = SeparatorFactory.createSeparator(VcsBundle.message("label.commit.comment"), myCommitMessageArea);
    commitPanel.add(separator, BorderLayout.NORTH);
    commitPanel.add(commitMessageScroll, BorderLayout.CENTER);

    splitter.setSecondComponent(commitPanel);
  }
  mainPanel.add(splitter, BorderLayout.CENTER);

  final String description = getDescription();
  if (description != null) {
    JPanel descPanel = new JPanel();
    descPanel.add(new JLabel(XmlStringUtil.wrapInHtml(description)));
    descPanel.setBorder(BorderFactory.createEtchedBorder());
    mainPanel.add(descPanel, BorderLayout.NORTH);
  }
  return mainPanel;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:60,代码来源:ChangeListViewerDialog.java


示例17: createCenterPanel

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
@Override
protected JComponent createCenterPanel() {
  JPanel panel = new JPanel(new GridBagLayout());
  GridBagConstraints constr;

  // list label
  constr = new GridBagConstraints();
  constr.gridy = 0;
  constr.anchor = GridBagConstraints.WEST;
  constr.fill = GridBagConstraints.HORIZONTAL;
  panel.add(SeparatorFactory.createSeparator(IdeBundle.message("label.macros"), null), constr);

  // macros list
  constr = new GridBagConstraints();
  constr.gridy = 1;
  constr.weightx = 1;
  constr.weighty = 1;
  constr.fill = GridBagConstraints.BOTH;
  constr.anchor = GridBagConstraints.WEST;
  panel.add(ScrollPaneFactory.createScrollPane(myMacrosList), constr);
  myMacrosList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  myMacrosList.setPreferredSize(null);

  // preview label
  constr = new GridBagConstraints();
  constr.gridx = 0;
  constr.gridy = 2;
  constr.anchor = GridBagConstraints.WEST;
  constr.fill = GridBagConstraints.HORIZONTAL;
  panel.add(SeparatorFactory.createSeparator(IdeBundle.message("label.macro.preview"), null), constr);

  // preview
  constr = new GridBagConstraints();
  constr.gridx = 0;
  constr.gridy = 3;
  constr.weightx = 1;
  constr.weighty = 1;
  constr.fill = GridBagConstraints.BOTH;
  constr.anchor = GridBagConstraints.WEST;
  panel.add(ScrollPaneFactory.createScrollPane(myPreviewTextarea), constr);
  myPreviewTextarea.setEditable(false);
  myPreviewTextarea.setLineWrap(true);
  myPreviewTextarea.setPreferredSize(null);

  panel.setPreferredSize(new Dimension(400, 500));

  return panel;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:49,代码来源:MacrosDialog.java


示例18: createCenterPanel

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
public JComponent createCenterPanel() {
  final JPanel mainPanel = new JPanel();
  mainPanel.setLayout(new BorderLayout());
  final Splitter splitter = new Splitter(true, 0.8f);
  myChangesBrowser = new RepositoryChangesBrowser(myProject, Collections.singletonList(myChangeList),
                                                  new ArrayList<Change>(myChangeList.getChanges()),
                                                  myChangeList, myToSelect) {

    @Override
    protected void buildToolBar(DefaultActionGroup toolBarGroup) {
      super.buildToolBar(toolBarGroup);
      toolBarGroup.add(ActionManager.getInstance().getAction("Vcs.CopyRevisionNumberAction"));
    }

    @Override
    public Object getData(@Nonnull @NonNls Key dataId) {
      Object data = super.getData(dataId);
      if (data != null) {
        return data;
      }
      return ChangeListViewerDialog.this.getData(dataId);
    }

    @Override
    protected void showDiffForChanges(final Change[] changesArray, final int indexInSelection) {
      if (myInAir && (myConvertor != null)) {
        final Change[] convertedChanges = new Change[changesArray.length];
        for (int i = 0; i < changesArray.length; i++) {
          Change change = changesArray[i];
          convertedChanges[i] = myConvertor.fun(change);
        }
        super.showDiffForChanges(convertedChanges, indexInSelection);
      } else {
        super.showDiffForChanges(changesArray, indexInSelection);
      }
    }
  };
  myChangesBrowser.setUseCase(myInAir ? CommittedChangesBrowserUseCase.IN_AIR : null);
  splitter.setFirstComponent(myChangesBrowser);

  if (myCommitMessageArea != null) {
    JPanel commitPanel = new JPanel(new BorderLayout());
    JComponent separator = SeparatorFactory.createSeparator(VcsBundle.message("label.commit.comment"), myCommitMessageArea);
    commitPanel.add(separator, BorderLayout.NORTH);
    commitPanel.add(commitMessageScroll, BorderLayout.CENTER);

    splitter.setSecondComponent(commitPanel);
  }
  mainPanel.add(splitter, BorderLayout.CENTER);

  final String description = getDescription();
  if (description != null) {
    JPanel descPanel = new JPanel();
    descPanel.add(new JLabel(XmlStringUtil.wrapInHtml(description)));
    descPanel.setBorder(BorderFactory.createEtchedBorder());
    mainPanel.add(descPanel, BorderLayout.NORTH);
  }
  return mainPanel;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:60,代码来源:ChangeListViewerDialog.java


示例19: createCenterPanel

import com.intellij.ui.SeparatorFactory; //导入依赖的package包/类
protected JComponent createCenterPanel() {
  myTable = new JBTable(myTableModel);
  myTable.setStriped(true);
  TableColumn nameColumn = myTable.getColumnModel().getColumn(NAME_COLUMN);
  TableColumn valueColumn = myTable.getColumnModel().getColumn(VALUE_COLUMN);
  Project project = myClass.getProject();
  nameColumn.setCellRenderer(new MyCellRenderer());
  nameColumn.setCellEditor(new StringTableCellEditor(project));
  valueColumn.setCellRenderer(new MyCodeFragmentTableCellRenderer());
  valueColumn.setCellEditor(new JavaCodeFragmentTableCellEditor(project));

  myTable.setPreferredScrollableViewportSize(new Dimension(210, myTable.getRowHeight() * 4));
  myTable.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
  myTable.getSelectionModel().setSelectionInterval(0, 0);
  myTable.setSurrendersFocusOnKeystroke(true);
  myTable.setCellSelectionEnabled(true);
  myTable.setFocusCycleRoot(true);

  if (myHideDefaultValueColumn) {
    final TableColumn defaultValue = myTable.getColumnModel().getColumn(VALUE_COLUMN);
    myTable.removeColumn(defaultValue);
    myTable.getModel().addTableModelListener(new TableModelListener() {
      @Override
      public void tableChanged(TableModelEvent e) {
        if (e.getType() == TableModelEvent.INSERT) {
          myTable.getModel().removeTableModelListener(this);
          final TableColumnAnimator animator = new TableColumnAnimator(myTable);
          animator.setStep(20);
          animator.addColumn(defaultValue, myTable.getWidth() / 2);
          animator.startAndDoWhenDone(new Runnable() {
            @Override
            public void run() {
              myTable.editCellAt(myTable.getRowCount() - 1, 0);
            }
          });
          animator.start();
        }
      }
    });
  }

  final JPanel panel = new JPanel(new BorderLayout());
  panel.add(SeparatorFactory.createSeparator(RefactoringBundle.message("changeClassSignature.parameters.panel.border.title"), myTable), BorderLayout.NORTH);
  panel.add(ToolbarDecorator.createDecorator(myTable).createPanel(), BorderLayout.CENTER);
  return panel;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:47,代码来源:ChangeClassSignatureDialog.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java JSJavaScriptEngine类代码示例发布时间:2022-05-22
下一篇:
Java Query类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap