本文整理汇总了Java中com.intellij.openapi.actionSystem.ActionToolbarPosition类的典型用法代码示例。如果您正苦于以下问题:Java ActionToolbarPosition类的具体用法?Java ActionToolbarPosition怎么用?Java ActionToolbarPosition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ActionToolbarPosition类属于com.intellij.openapi.actionSystem包,在下文中一共展示了ActionToolbarPosition类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createCenterPanel
import com.intellij.openapi.actionSystem.ActionToolbarPosition; //导入依赖的package包/类
@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;
}
示例2: UserRenderersConfigurable
import com.intellij.openapi.actionSystem.ActionToolbarPosition; //导入依赖的package包/类
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);
}
示例3: configureToolbar
import com.intellij.openapi.actionSystem.ActionToolbarPosition; //导入依赖的package包/类
/** 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());
}
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:15,代码来源:CloudDebugHistoricalSnapshots.java
示例4: initPosition
import com.intellij.openapi.actionSystem.ActionToolbarPosition; //导入依赖的package包/类
@Override
public ToolbarDecorator initPosition() {
return setToolbarPosition(SystemInfo.isMac ? ActionToolbarPosition.BOTTOM : ActionToolbarPosition.TOP);
}
示例5: UserRenderersConfigurable
import com.intellij.openapi.actionSystem.ActionToolbarPosition; //导入依赖的package包/类
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);
}