本文整理汇总了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);
}
}
示例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);
}
}
示例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);
}
示例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);
}
}
}
示例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;
}
}
示例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;
}
示例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();
}
}
}
示例8: setTabsPlacement
@Override
public void setTabsPlacement(int tabPlacement) {
super.setTabsPlacement(UISettings.TABS_NONE);
}
示例9: getPlace
int getPlace() {return UISettings.TABS_NONE;}