當前位置: 首頁>>代碼示例>>Java>>正文


Java UIUtil.removeScrollBorder方法代碼示例

本文整理匯總了Java中com.intellij.util.ui.UIUtil.removeScrollBorder方法的典型用法代碼示例。如果您正苦於以下問題:Java UIUtil.removeScrollBorder方法的具體用法?Java UIUtil.removeScrollBorder怎麽用?Java UIUtil.removeScrollBorder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.util.ui.UIUtil的用法示例。


在下文中一共展示了UIUtil.removeScrollBorder方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createEditor

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
@NotNull
public static EditorEx createEditor(@NotNull Document document, @Nullable Project project, boolean isViewer, boolean enableFolding) {
  EditorFactory factory = EditorFactory.getInstance();
  EditorEx editor = (EditorEx)(isViewer ? factory.createViewer(document, project) : factory.createEditor(document, project));

  editor.putUserData(DiffManagerImpl.EDITOR_IS_DIFF_KEY, Boolean.TRUE);

  editor.getSettings().setLineNumbersShown(true);
  ((EditorMarkupModel)editor.getMarkupModel()).setErrorStripeVisible(true);
  editor.getGutterComponentEx().setShowDefaultGutterPopup(false);

  if (enableFolding) {
    setFoldingModelSupport(editor);
  } else {
    editor.getSettings().setFoldingOutlineShown(false);
    editor.getFoldingModel().setFoldingEnabled(false);
  }

  UIUtil.removeScrollBorder(editor.getComponent());

  return editor;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:23,代碼來源:DiffUtil.java

示例2: setContent

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
public void setContent(JComponent c) {
  myContent = c;
  add(c, BorderLayout.CENTER);

  if (myBorderless) {
    UIUtil.removeScrollBorder(c);
  }

  revalidate();
  repaint();
}
 
開發者ID:beansoftapp,項目名稱:react-native-console,代碼行數:12,代碼來源:SimpleToolWindowPanel.java

示例3: setEditorSource

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
public void setEditorSource(final Project project, final EditorSource source) {
  MyState state = new MyState();
  myEditorSource = source;
  myLineMarker.attach(myEditorSource);
  Editor editor = myEditorSource.getEditor();
  final FileEditor fileEditor = myEditorSource.getFileEditor();
  if (editor == null) {
    insertComponent(fileEditor == null ? MOCK_COMPONENT : fileEditor.getComponent());
    DataManager.registerDataProvider(myPanel, new DataProvider() {
      @Override
      public Object getData(@NonNls String dataId) {
        if (CommonDataKeys.PROJECT.is(dataId)) {return project;}
        if (PlatformDataKeys.FILE_EDITOR.is(dataId)) {return fileEditor;}
        return null;
      }
    });
    if (fileEditor != null) {
      ScrollUtil.scrollVertically(fileEditor.getComponent(), 0);
      ScrollUtil.scrollHorizontally(fileEditor.getComponent(), 0);
      UIUtil.removeScrollBorder(fileEditor.getComponent());
    }
  } else {
    DataManager.removeDataProvider(myPanel);
    editor.getScrollingModel().scrollHorizontally(0);
    insertComponent(editor.getComponent());
    applyHighlighter();
    setMouseListeners(source);
    MyEditorFocusListener.install(this);
    UIUtil.removeScrollBorder(editor.getComponent());

    state.restore();
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:34,代碼來源:DiffSideView.java

示例4: adjust

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
private void adjust(final TabInfo each) {
  if (myAdjustBorders) {
    UIUtil.removeScrollBorder(each.getComponent());
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:6,代碼來源:JBTabsImpl.java

示例5: showPane

import com.intellij.util.ui.UIUtil; //導入方法依賴的package包/類
private void showPane(@NotNull AbstractProjectViewPane newPane) {
  AbstractProjectViewPane currentPane = getCurrentProjectViewPane();
  PsiElement selectedPsiElement = null;
  if (currentPane != null) {
    if (currentPane != newPane) {
      currentPane.saveExpandedPaths();
    }
    final PsiElement[] elements = currentPane.getSelectedPSIElements();
    if (elements.length > 0) {
      selectedPsiElement = elements[0];
    }
  }
  myViewContentPanel.removeAll();
  JComponent component = newPane.createComponent();
  UIUtil.removeScrollBorder(component);
  myViewContentPanel.setLayout(new BorderLayout());
  myViewContentPanel.add(component, BorderLayout.CENTER);
  myCurrentViewId = newPane.getId();
  String newSubId = myCurrentViewSubId = newPane.getSubId();
  myViewContentPanel.revalidate();
  myViewContentPanel.repaint();
  createToolbarActions();

  myAutoScrollToSourceHandler.install(newPane.myTree);

  IdeFocusManager.getInstance(myProject).requestFocus(newPane.getComponentToFocus(), false);

  newPane.restoreExpandedPaths();
  if (selectedPsiElement != null) {
    final VirtualFile virtualFile = PsiUtilCore.getVirtualFile(selectedPsiElement);
    if (virtualFile != null && ((ProjectViewSelectInTarget)newPane.createSelectInTarget()).isSubIdSelectable(newSubId, new SelectInContext() {
      @Override
      @NotNull
      public Project getProject() {
        return myProject;
      }

      @Override
      @NotNull
      public VirtualFile getVirtualFile() {
        return virtualFile;
      }

      @Override
      public Object getSelectorInFile() {
        return null;
      }

      @Override
      public FileEditorProvider getFileEditorProvider() {
        return null;
      }
    })) {
      newPane.select(selectedPsiElement, virtualFile, true);
    }
  }
  myAutoScrollToSourceHandler.onMouseClicked(newPane.myTree);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:59,代碼來源:ProjectViewImpl.java


注:本文中的com.intellij.util.ui.UIUtil.removeScrollBorder方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。