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


Java SideBorder类代码示例

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


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

示例1: initToolWindow

import com.intellij.ui.SideBorder; //导入依赖的package包/类
private void initToolWindow() {
  myToolWindowPanel = new MyToolWindowPanel();
  myComponentTree = new ComponentTree(myProject);
  for (TreeSelectionListener listener : myPendingListeners) {
    myComponentTree.addTreeSelectionListener(listener);
  }
  myPendingListeners.clear();
  final JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myComponentTree);
  scrollPane.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
  scrollPane.setPreferredSize(new Dimension(250, -1));
  myComponentTree.initQuickFixManager(scrollPane.getViewport());
  myPropertyInspector= new PropertyInspector(myProject, myComponentTree);
  myToolWindowPanel.setFirstComponent(scrollPane);
  myToolWindowPanel.setSecondComponent(myPropertyInspector);
  myToolWindow = ToolWindowManager.getInstance(myProject).registerToolWindow(UIDesignerBundle.message("toolwindow.ui.designer"),
                                                                             myToolWindowPanel,
                                                                             ToolWindowAnchor.LEFT, myProject, true);
  myToolWindow.setIcon(UIDesignerIcons.ToolWindowUIDesigner);
  myToolWindow.setAvailable(false, null);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:21,代码来源:UIDesignerToolWindowManager.java

示例2: TopBottomComponentWrapper

import com.intellij.ui.SideBorder; //导入依赖的package包/类
public TopBottomComponentWrapper(JComponent component, boolean top) {
  super(new BorderLayout());
  myWrappee = component;
  setOpaque(false);

  setBorder(new SideBorder(null, top ? SideBorder.BOTTOM : SideBorder.TOP) {
    @Override
    public Color getLineColor() {
      Color result = EditorColorsManager.getInstance().getGlobalScheme().getColor(EditorColors.TEARLINE_COLOR);
      return result == null ? JBColor.BLACK : result;
    }
  });

  add(component);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:EditorComposite.java

示例3: setupUIComponentPresentation

import com.intellij.ui.SideBorder; //导入依赖的package包/类
@Override
public String setupUIComponentPresentation(String text,
                                           int highlightStartOffset,
                                           int highlightEndOffset,
                                           boolean isDisabled,
                                           boolean strikeout,
                                           boolean isDisabledBeforeHighlight,
                                           Color background) {
  final String resultedText =
    myPanels[i].setup(text, myEscapeFunction, highlightStartOffset, highlightEndOffset, isDisabled, strikeout, isDisabledBeforeHighlight, background);
  myPanels[i].setBorder(isLastParameterOwner() ? BACKGROUND_BORDER : new SideBorder(new JBColor(JBColor.LIGHT_GRAY, Gray._90), SideBorder.BOTTOM));
  return resultedText;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:ParameterInfoComponent.java

示例4: initConsoleUI

import com.intellij.ui.SideBorder; //导入依赖的package包/类
private void initConsoleUI(Process process) {
  // Init console view
  myConsoleView = createConsoleView();
  if (myConsoleView instanceof JComponent) {
    ((JComponent)myConsoleView).setBorder(new SideBorder(JBColor.border(), SideBorder.LEFT));
  }
  myProcessHandler = createProcessHandler(process);

  myConsoleExecuteActionHandler = createExecuteActionHandler();

  ProcessTerminatedListener.attach(myProcessHandler);

  myProcessHandler.addProcessListener(new ProcessAdapter() {
    @Override
    public void processTerminated(ProcessEvent event) {
      finishConsole();
    }
  });

  // Attach to process
  myConsoleView.attachToProcess(myProcessHandler);

  // Runner creating
  createContentDescriptorAndActions();

  // Run
  myProcessHandler.startNotify();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:29,代码来源:AbstractConsoleRunnerWithHistory.java

示例5: createCenterPanel

import com.intellij.ui.SideBorder; //导入依赖的package包/类
@Override
protected JComponent createCenterPanel() {
  JComponent mainPanel = myEditor.createComponent();
  mainPanel.setPreferredSize(new Dimension(600, 400));
  mainPanel.setBorder(IdeBorderFactory.createBorder(SideBorder.ALL));

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

示例6: createToolbar

import com.intellij.ui.SideBorder; //导入依赖的package包/类
@Override
protected JComponent createToolbar() {
  JPanel panel = new JPanel(new BorderLayout());
  panel.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));

  // Create a layout where there are three toolbars:
  // +----------------------------------------------------------------------------+
  // | Normal toolbar, minus dynamic actions                                      |
  // +---------------------------------------------+------------------------------+
  // | Dynamic layout actions                      | Zoom actions and file status |
  // +---------------------------------------------+------------------------------+

  ActionManager actionManager = ActionManager.getInstance();
  ActionToolbar actionToolbar = actionManager.createActionToolbar(TOOLBAR, getActionGroup(), true);
  actionToolbar.setLayoutPolicy(ActionToolbar.WRAP_LAYOUT_POLICY);
  panel.add(actionToolbar.getComponent(), BorderLayout.NORTH);

  ActionToolbar layoutToolBar = actionManager.createActionToolbar(TOOLBAR, getDynamicActionGroup(), true);
  layoutToolBar.setLayoutPolicy(ActionToolbar.WRAP_LAYOUT_POLICY);

  // The default toolbar layout adds too much spacing between the buttons. Switch to mini mode,
  // but also set a minimum size which will add *some* padding for our 16x16 icons.
  layoutToolBar.setMiniMode(true);
  layoutToolBar.setMinimumButtonSize(new Dimension(22, 24));

  ActionToolbar zoomToolBar = actionManager.createActionToolbar(TOOLBAR, getRhsActions(), true);
  JPanel bottom = new JPanel(new BorderLayout());
  bottom.add(layoutToolBar.getComponent(), BorderLayout.WEST);
  RenderContext context = (AndroidDesignerEditorPanel)myDesigner;
  RenderOptionsMenuBuilder optionsMenuBuilder = RenderOptionsMenuBuilder.create(context);
  ActionToolbar optionsToolBar = optionsMenuBuilder.addPreferXmlOption().addDeviceFrameOption().addRetinaOption().build();
  JPanel combined = new JPanel(new BorderLayout());
  combined.add(zoomToolBar.getComponent(), BorderLayout.WEST);
  combined.add(optionsToolBar.getComponent(), BorderLayout.EAST);
  bottom.add(combined, BorderLayout.EAST);

  panel.add(bottom, BorderLayout.SOUTH);

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

示例7: initContent

import com.intellij.ui.SideBorder; //导入依赖的package包/类
public void initContent() {
  final ActionManager actionManager = ActionManager.getInstance();
  final ActionGroup actionGroup = (ActionGroup)actionManager.getAction(TOOL_WINDOW_TOOLBAR_ID);
  ActionToolbar actionToolbar = actionManager.createActionToolbar(myPlace, actionGroup, true);
  JPanel toolbarControl = new JPanel(new GridBagLayout());
  GridBagConstraints constraints = new GridBagConstraints();
  constraints.gridwidth = GridBagConstraints.REMAINDER;
  constraints.weightx = 1;
  constraints.fill = GridBagConstraints.HORIZONTAL;
  constraints.anchor = GridBagConstraints.WEST;
  toolbarControl.add(actionToolbar.getComponent(), constraints);
  for (JComponent component : getToolbarControls()) {
    component.setBorder(IdeBorderFactory.createBorder(SideBorder.TOP));
    toolbarControl.add(component, constraints);
  }
  setToolbar(toolbarControl);
  
  final JComponent payloadControl = buildContent();
  JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(payloadControl);
  JScrollBar scrollBar = scrollPane.getVerticalScrollBar();
  scrollBar.setUnitIncrement(scrollBar.getUnitIncrement() * 7);
  myContent.add(scrollPane, CONTENT_CARD_NAME);
  RichTextControlBuilder builder = new RichTextControlBuilder();
  builder.setBackgroundColor(payloadControl.getBackground());
  builder.setForegroundColor(UIUtil.getInactiveTextColor());
  builder.setFont(payloadControl.getFont());
  builder.setText(GradleBundle.message("gradle.toolwindow.text.no.linked.project"));
  final JComponent noLinkedProjectControl = builder.build();
  myContent.add(noLinkedProjectControl, NON_LINKED_CARD_NAME);
  update();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:32,代码来源:GradleToolWindowPanel.java

示例8: DesignerToolWindow

import com.intellij.ui.SideBorder; //导入依赖的package包/类
public DesignerToolWindow(Project project) {
  myComponentTree = new ComponentTree(project);

  JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myComponentTree);
  scrollPane.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
  scrollPane.setPreferredSize(new Dimension(250, -1));
  myComponentTree.initQuickFixManager(scrollPane.getViewport());

  myPropertyInspector = new PropertyInspector(project, myComponentTree);

  myToolWindowPanel.setFirstComponent(scrollPane);
  myToolWindowPanel.setSecondComponent(myPropertyInspector);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:DesignerToolWindow.java

示例9: createToolbar

import com.intellij.ui.SideBorder; //导入依赖的package包/类
protected JComponent createToolbar() {
  ActionManager actionManager = ActionManager.getInstance();
  ActionToolbar actionToolbar = actionManager.createActionToolbar(TOOLBAR, myActionGroup, true);
  actionToolbar.setLayoutPolicy(ActionToolbar.WRAP_LAYOUT_POLICY);

  JComponent toolbar = actionToolbar.getComponent();
  toolbar.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
  toolbar.setVisible(false);

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

示例10: TopBottomComponentWrapper

import com.intellij.ui.SideBorder; //导入依赖的package包/类
public TopBottomComponentWrapper(JComponent component, boolean top) {
  super(new BorderLayout());
  setOpaque(false);

  setBorder(new SideBorder(null, top ? SideBorder.BOTTOM : SideBorder.TOP, true) {
    @Override
    public Color getLineColor() {
      Color result = EditorColorsManager.getInstance().getGlobalScheme().getColor(EditorColors.TEARLINE_COLOR);
      return result == null ? Color.black : result;
    }
  });

  add(component);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:15,代码来源:EditorComposite.java

示例11: setupUIComponentPresentation

import com.intellij.ui.SideBorder; //导入依赖的package包/类
@Override
public void setupUIComponentPresentation(String text,
                                         int highlightStartOffset,
                                         int highlightEndOffset,
                                         boolean isDisabled,
                                         boolean strikeout,
                                         boolean isDisabledBeforeHighlight,
                                         Color background) {
  myPanels[i].setup(text, highlightStartOffset, highlightEndOffset, isDisabled, strikeout, isDisabledBeforeHighlight, background);
  myPanels[i].setBorder(isLastParameterOwner() ? BACKGROUND_BORDER : new SideBorder(new JBColor(JBColor.LIGHT_GRAY, Gray._90), SideBorder.BOTTOM));
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:12,代码来源:ParameterInfoComponent.java

示例12: DesignerToolWindow

import com.intellij.ui.SideBorder; //导入依赖的package包/类
public DesignerToolWindow(Project project, boolean updateOrientation) {
  myComponentTree = new ComponentTree();
  JScrollPane treeScrollPane = ScrollPaneFactory.createScrollPane(myComponentTree);
  treeScrollPane.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
  treeScrollPane.setPreferredSize(new Dimension(250, -1));
  myComponentTree.initQuickFixManager(treeScrollPane.getViewport());

  myPropertyTablePanel = new PropertyTablePanel(project);

  myToolWindowPanel = new Splitter(true, 0.42f);
  myToolWindowPanel.setDividerWidth(3);
  myToolWindowPanel.setShowDividerControls(false);
  myToolWindowPanel.setShowDividerIcon(false);
  myToolWindowPanel.setFirstComponent(treeScrollPane);
  myToolWindowPanel.setSecondComponent(myPropertyTablePanel);

  if (updateOrientation) {
    myToolWindowPanel.addComponentListener(new ComponentAdapter() {
      @Override
      public void componentResized(ComponentEvent e) {
        Dimension size = myToolWindowPanel.getSize();
        boolean newVertical = size.width < size.height;
        if (myToolWindowPanel.getOrientation() != newVertical) {
          myToolWindowPanel.setOrientation(newVertical);
        }
      }
    });
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:30,代码来源:DesignerToolWindow.java

示例13: createToolbar

import com.intellij.ui.SideBorder; //导入依赖的package包/类
protected JComponent createToolbar() {
    ActionManager actionManager = ActionManager.getInstance();
    ActionToolbar actionToolbar = actionManager.createActionToolbar(TOOLBAR, myActionGroup, true);
    actionToolbar.setLayoutPolicy(ActionToolbar.WRAP_LAYOUT_POLICY);

    JComponent toolbar = actionToolbar.getComponent();
    toolbar.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
    toolbar.setVisible(false);

    return toolbar;
}
 
开发者ID:chrimm,项目名称:cordovastudio,代码行数:12,代码来源:CordovaDesignerActionPanel.java

示例14: CordovaDesignerToolWindow

import com.intellij.ui.SideBorder; //导入依赖的package包/类
public CordovaDesignerToolWindow(Project project, boolean updateOrientation) {
  myComponentTree = new ComponentTree();
  JScrollPane treeScrollPane = ScrollPaneFactory.createScrollPane(myComponentTree);
  treeScrollPane.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
  treeScrollPane.setPreferredSize(new Dimension(250, -1));
  myComponentTree.initQuickFixManager(treeScrollPane.getViewport());

  myPropertyTablePanel = new PropertyTablePanel(project);

  myToolWindowPanel = new Splitter(true, 0.42f);
  myToolWindowPanel.setDividerWidth(3);
  myToolWindowPanel.setShowDividerControls(false);
  myToolWindowPanel.setShowDividerIcon(false);
  myToolWindowPanel.setFirstComponent(treeScrollPane);
  myToolWindowPanel.setSecondComponent(myPropertyTablePanel);

  if (updateOrientation) {
    myToolWindowPanel.addComponentListener(new ComponentAdapter() {
      @Override
      public void componentResized(ComponentEvent e) {
        Dimension size = myToolWindowPanel.getSize();
        boolean newVertical = size.width < size.height;
        if (myToolWindowPanel.getOrientation() != newVertical) {
          myToolWindowPanel.setOrientation(newVertical);
        }
      }
    });
  }
}
 
开发者ID:chrimm,项目名称:cordovastudio,代码行数:30,代码来源:CordovaDesignerToolWindow.java

示例15: DesignerToolWindow

import com.intellij.ui.SideBorder; //导入依赖的package包/类
public DesignerToolWindow(Project project)
{
	myComponentTree = new ComponentTree(project);

	JScrollPane scrollPane = ScrollPaneFactory.createScrollPane(myComponentTree);
	scrollPane.setBorder(IdeBorderFactory.createBorder(SideBorder.BOTTOM));
	scrollPane.setPreferredSize(new Dimension(250, -1));
	myComponentTree.initQuickFixManager(scrollPane.getViewport());

	myPropertyInspector = new PropertyInspector(project, myComponentTree);

	myToolWindowPanel.setFirstComponent(scrollPane);
	myToolWindowPanel.setSecondComponent(myPropertyInspector);
}
 
开发者ID:consulo,项目名称:consulo-ui-designer,代码行数:15,代码来源:DesignerToolWindow.java


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