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


Java UISettings.TABS_NONE属性代码示例

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


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

示例1: EditorWindow

protected EditorWindow(final EditorsSplitters owner) {
  myOwner = owner;
  myPanel = new JPanel(new BorderLayout());
  myPanel.setOpaque(false);

  myTabbedPane = null;

  final int tabPlacement = UISettings.getInstance().EDITOR_TAB_PLACEMENT;
  if (tabPlacement != UISettings.TABS_NONE && !UISettings.getInstance().PRESENTATION_MODE) {
    createTabs(tabPlacement);
  }

  // Tab layout policy
  if (UISettings.getInstance().SCROLL_TAB_LAYOUT_IN_EDITOR) {
    setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
  } else {
    setTabLayoutPolicy(JTabbedPane.WRAP_TAB_LAYOUT);
  }

  myOwner.addWindow(this);
  if (myOwner.getCurrentWindow() == null) {
    myOwner.setCurrentWindow(this, false);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:EditorWindow.java

示例2: revalidateSingleRowCheckbox

private void revalidateSingleRowCheckbox() {
  final int i = ((Integer)myEditorTabPlacement.getSelectedItem()).intValue();

  boolean none = i == UISettings.TABS_NONE;
  myHideKnownExtensions.setEnabled(!none);
  myHideTabsCheckbox.setEnabled(!none && myScrollTabLayoutInEditorCheckBox.isSelected());
  myScrollTabLayoutInEditorCheckBox.setEnabled(!none);
  myCbModifiedTabsMarkedWithAsterisk.setEnabled(!none);
  myShowTabsTooltipsCheckBox.setEnabled(!none);
  myShowCloseButtonOnCheckBox.setEnabled(!none);
  myShowDirectoryInTabCheckBox.setEnabled(!none);

  if (SwingConstants.TOP == i) {
    myScrollTabLayoutInEditorCheckBox.setEnabled(true);
  } else {
    myScrollTabLayoutInEditorCheckBox.setSelected(true);
    myScrollTabLayoutInEditorCheckBox.setEnabled(false);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:EditorTabsConfigurable.java

示例3: customize

@Override
public void customize(JList list, Integer value, int index, boolean selected, boolean hasFocus) {
  int tabPlacement = value.intValue();
  String text;
  if (UISettings.TABS_NONE == tabPlacement) {
    text = ApplicationBundle.message("combobox.tab.placement.none");
  }
  else if (SwingConstants.TOP == tabPlacement) {
    text = ApplicationBundle.message("combobox.tab.placement.top");
  }
  else if (SwingConstants.LEFT == tabPlacement) {
    text = ApplicationBundle.message("combobox.tab.placement.left");
  }
  else if (SwingConstants.BOTTOM == tabPlacement) {
    text = ApplicationBundle.message("combobox.tab.placement.bottom");
  }
  else if (SwingConstants.RIGHT == tabPlacement) {
    text = ApplicationBundle.message("combobox.tab.placement.right");
  }
  else {
    throw new IllegalArgumentException("unknown tabPlacement: " + tabPlacement);
  }
  setText(text);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:EditorTabsConfigurable.java

示例4: clearWindowIfNeeded

private static void clearWindowIfNeeded(@NotNull EditorWindow window) {
  if (UISettings.getInstance().EDITOR_TAB_PLACEMENT == UISettings.TABS_NONE || UISettings.getInstance().PRESENTATION_MODE) {
    for (EditorWithProviderComposite composite : window.getEditors()) {
      Disposer.dispose(composite);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:FileEditorManagerImpl.java

示例5: testStoringCaretStateForFileWithFoldingsWithNoTabs

public void testStoringCaretStateForFileWithFoldingsWithNoTabs() throws Exception {
  int savedValue = UISettings.getInstance().EDITOR_TAB_PLACEMENT;
  UISettings.getInstance().EDITOR_TAB_PLACEMENT = UISettings.TABS_NONE;
  try {
    VirtualFile file = getFile("/src/Test.java");
    assertNotNull(file);
    FileEditor[] editors = myManager.openFile(file, false);
    assertEquals(1, editors.length);
    assertTrue(editors[0] instanceof TextEditor);
    Editor editor = ((TextEditor)editors[0]).getEditor();
    final FoldingModel foldingModel = editor.getFoldingModel();
    assertEquals(2, foldingModel.getAllFoldRegions().length);
    foldingModel.runBatchFoldingOperation(new Runnable() {
      @Override
      public void run() {
        for (FoldRegion region : foldingModel.getAllFoldRegions()) {
          region.setExpanded(false);
        }
      }
    });
    int textLength = editor.getDocument().getTextLength();
    editor.getCaretModel().moveToOffset(textLength);
    editor.getSelectionModel().setSelection(textLength - 1, textLength);

    myManager.openFile(getFile("/src/1.txt"), false);
    assertEquals(0, myManager.getEditors(file).length);
    editors = myManager.openFile(file, false);

    assertEquals(1, editors.length);
    assertTrue(editors[0] instanceof TextEditor);
    editor = ((TextEditor)editors[0]).getEditor();
    assertEquals(textLength, editor.getCaretModel().getOffset());
    assertEquals(textLength - 1, editor.getSelectionModel().getSelectionStart());
    assertEquals(textLength, editor.getSelectionModel().getSelectionEnd());
  }
  finally {
    UISettings.getInstance().EDITOR_TAB_PLACEMENT = savedValue;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:39,代码来源:FileEditorManagerTest.java

示例6: getEditorTabTitle

@Override
public String getEditorTabTitle(Project project, VirtualFile file) {
  if (!UISettings.getInstance().SHOW_DIRECTORY_FOR_NON_UNIQUE_FILENAMES || DumbService.isDumb(project)) {
    return null;
  }
  // Even though this is a 'tab title provider' it is used also when tabs are not shown, namely for building IDE frame title.
  final String uniqueName = UISettings.getInstance().EDITOR_TAB_PLACEMENT == UISettings.TABS_NONE ? 
                            UniqueVFilePathBuilder.getInstance().getUniqueVirtualFilePath(project, file) : 
                            UniqueVFilePathBuilder.getInstance().getUniqueVirtualFilePathWithinOpenedFileEditors(project, file);
  return uniqueName.equals(file.getName()) ? null : uniqueName;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:UniqueNameEditorTabTitleProvider.java

示例7: setTabsPlacement

public void setTabsPlacement(final int tabPlacement) {
  if (tabPlacement != UISettings.TABS_NONE && !UISettings.getInstance().PRESENTATION_MODE) {
    if (myTabbedPane == null) {
      final EditorWithProviderComposite editor = getSelectedEditor();
      myPanel.removeAll();
      createTabs(tabPlacement);
      restoreHiddenTabs();
      setEditor (editor, true);
    }
    else {
      myTabbedPane.setTabPlacement(tabPlacement);
    }
  }
  else if (myTabbedPane != null) {
    final boolean focusEditor = ToolWindowManager.getInstance(getManager().getProject()).isEditorComponentActive();
    final VirtualFile currentFile = getSelectedFile();
    if (currentFile != null) {
      // do not close associated language console on tab placement change
      currentFile.putUserData(FileEditorManagerImpl.CLOSING_TO_REOPEN, Boolean.TRUE);
    }
    final VirtualFile[] files = getFiles();
    myHiddenTabs.clear();
    myTabsHidingInProgress.set(true);
    for (VirtualFile file : files) {
      closeFile(file, false);
    }
    getManager().runChange(new FileEditorManagerChange() {//Add flag switching activity to the end of queue
      @Override
      public void run(EditorsSplitters splitters) {
        myTabsHidingInProgress.set(false);
      }
    }, myOwner);
    disposeTabs();
    if (currentFile != null) {
      currentFile.putUserData(FileEditorManagerImpl.CLOSING_TO_REOPEN, null);
      getManager().openFileImpl2(this, currentFile, focusEditor && myOwner.getCurrentWindow() == this);
    }
    else {
      myPanel.repaint();
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:42,代码来源:EditorWindow.java

示例8: setTabsPlacement

@Override
public void setTabsPlacement(int tabPlacement) {
  super.setTabsPlacement(UISettings.TABS_NONE);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:FilePreviewPanelProvider.java

示例9: getPlace

int getPlace() {return UISettings.TABS_NONE;} 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:1,代码来源:TabsPlacementAction.java


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