Java 类com.intellij.openapi.actionSystem.ActionToolbarPosition 实例源码

项目:intellij-ce-playground    文件:ExternalProjectDataSelectorDialog.java   
@Nullable
@Override
protected JComponent createCenterPanel() {
  ToolbarDecorator decorator = ToolbarDecorator.createDecorator(myTree).
    addExtraAction(new SelectAllButton()).
    addExtraAction(new UnselectAllButton()).
    addExtraAction(new ShowSelectedOnlyButton()).
    addExtraAction(new SelectRequiredButton()).
    setToolbarPosition(ActionToolbarPosition.BOTTOM).
    setToolbarBorder(IdeBorderFactory.createEmptyBorder());

  contentPanel.add(decorator.createPanel());
  loadingPanel = new JBLoadingPanel(new BorderLayout(), getDisposable());
  loadingPanel.add(mainPanel, BorderLayout.CENTER);
  return loadingPanel;
}
项目:intellij-ce-playground    文件:UserRenderersConfigurable.java   
public UserRenderersConfigurable() {
  super(new BorderLayout(4, 0));

  myRendererChooser = new ElementsChooser<NodeRenderer>(true);
  setupRenderersList();

  ToolbarDecorator decorator = ToolbarDecorator.createDecorator((JTable)myRendererChooser.getComponent());
  decorator.setToolbarPosition(ActionToolbarPosition.TOP);
  decorator.setAddAction(new AddAction());
  decorator.setRemoveAction(new RemoveAction());
  decorator.setMoveUpAction(new MoveAction(true));
  decorator.setMoveDownAction(new MoveAction(false));
  decorator.addExtraAction(new CopyAction());

  myNameField = new JTextField();
  myNameFieldPanel = new JPanel(new BorderLayout());
  myNameFieldPanel.add(new JLabel(DebuggerBundle.message("label.user.renderers.configurable.renderer.name")), BorderLayout.WEST);
  myNameFieldPanel.add(myNameField, BorderLayout.CENTER);
  myNameFieldPanel.setVisible(false);

  final JPanel center = new JPanel(new BorderLayout(0, 4));
  center.add(myNameFieldPanel, BorderLayout.NORTH);
  center.add(myRendererDataConfigurable, BorderLayout.CENTER);

  myNameField.getDocument().addDocumentListener(new DocumentAdapter() {
    @Override
    protected void textChanged(DocumentEvent e) {
      if (myCurrentRenderer != null) {
        myCurrentRenderer.setName(myNameField.getText());
        myRendererChooser.refresh(myCurrentRenderer);
      }
    }
  });

  Splitter splitter = new Splitter(false);
  splitter.setProportion(0.3f);
  splitter.setFirstComponent(decorator.createPanel());
  splitter.setSecondComponent(center);
  add(splitter, BorderLayout.CENTER);
}
项目:google-cloud-intellij    文件:CloudDebugHistoricalSnapshots.java   
/** Sets up the the toolbar that appears in the cloud debugger snapshots panel. */
private void configureToolbar() {
  final ToolbarDecorator decorator =
      ToolbarDecorator.createDecorator(table)
          .disableUpDownActions()
          .disableAddAction()
          .setToolbarPosition(ActionToolbarPosition.TOP);

  decorator.setRemoveAction(new RemoveSelectedBreakpointsAction());
  decorator.addExtraAction(new RemoveAllBreakpointsAction());
  decorator.addExtraAction(new ReactivateBreakpointAction());

  this.add(decorator.createPanel());
}
项目:intellij-ce-playground    文件:TreeToolbarDecorator.java   
@Override
public ToolbarDecorator initPosition() {
  return setToolbarPosition(SystemInfo.isMac ? ActionToolbarPosition.BOTTOM : ActionToolbarPosition.TOP);
}
项目:tools-idea    文件:TreeToolbarDecorator.java   
@Override
public ToolbarDecorator initPosition() {
  return setToolbarPosition(SystemInfo.isMac ? ActionToolbarPosition.BOTTOM : ActionToolbarPosition.TOP);
}
项目:consulo    文件:TreeToolbarDecorator.java   
@Override
public ToolbarDecorator initPosition() {
  return setToolbarPosition(SystemInfo.isMac ? ActionToolbarPosition.BOTTOM : ActionToolbarPosition.TOP);
}
项目:consulo-java    文件:UserRenderersConfigurable.java   
public UserRenderersConfigurable()
{
    super(new BorderLayout(JBUI.scale(4), 0));

    myRendererChooser = new ElementsChooser<NodeRenderer>(true);
    setupRenderersList();

    ToolbarDecorator decorator = ToolbarDecorator.createDecorator((JTable) myRendererChooser.getComponent());
    decorator.setToolbarPosition(ActionToolbarPosition.TOP);
    decorator.setAddAction(new AddAction());
    decorator.setRemoveAction(new RemoveAction());
    decorator.setMoveUpAction(new MoveAction(true));
    decorator.setMoveDownAction(new MoveAction(false));
    decorator.addExtraAction(new CopyAction());

    myNameField = new JTextField();
    myNameFieldPanel = new JPanel(new BorderLayout());
    myNameFieldPanel.add(new JLabel(DebuggerBundle.message("label.user.renderers.configurable.renderer.name")), BorderLayout.WEST);
    myNameFieldPanel.add(myNameField, BorderLayout.CENTER);
    myNameFieldPanel.setVisible(false);

    final JPanel center = new JPanel(new BorderLayout(0, 4));
    center.add(myNameFieldPanel, BorderLayout.NORTH);
    center.add(myRendererDataConfigurable, BorderLayout.CENTER);

    myNameField.getDocument().addDocumentListener(new DocumentAdapter()
    {
        @Override
        protected void textChanged(DocumentEvent e)
        {
            if(myCurrentRenderer != null)
            {
                myCurrentRenderer.setName(myNameField.getText());
                myRendererChooser.refresh(myCurrentRenderer);
            }
        }
    });

    Splitter splitter = new Splitter(false);
    splitter.setProportion(0.3f);
    splitter.setFirstComponent(decorator.createPanel());
    splitter.setSecondComponent(center);
    add(splitter, BorderLayout.CENTER);
}