use of com.intellij.ui.navigation.ForwardAction in project intellij-community by JetBrains.
the class ProjectStructureConfigurable method createComponent.
@Override
public JComponent createComponent() {
myComponent = new MyPanel();
mySplitter = new OnePixelSplitter(false, .15f);
mySplitter.setSplitterProportionKey("ProjectStructure.TopLevelElements");
mySplitter.setHonorComponentsMinimumSize(true);
initSidePanel();
final JPanel left = new JPanel(new BorderLayout()) {
@Override
public Dimension getMinimumSize() {
final Dimension original = super.getMinimumSize();
return new Dimension(Math.max(original.width, 100), original.height);
}
};
final DefaultActionGroup toolbarGroup = new DefaultActionGroup();
toolbarGroup.add(new BackAction(myComponent));
toolbarGroup.add(new ForwardAction(myComponent));
final ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, toolbarGroup, true);
toolbar.setTargetComponent(myComponent);
myToolbarComponent = toolbar.getComponent();
left.setBackground(UIUtil.SIDE_PANEL_BACKGROUND);
myToolbarComponent.setBackground(UIUtil.SIDE_PANEL_BACKGROUND);
left.add(myToolbarComponent, BorderLayout.NORTH);
left.add(mySidePanel, BorderLayout.CENTER);
mySplitter.setFirstComponent(left);
mySplitter.setSecondComponent(myDetails);
myComponent.add(mySplitter, BorderLayout.CENTER);
myUiInitialized = true;
return myComponent;
}
use of com.intellij.ui.navigation.ForwardAction in project android by JetBrains.
the class ProjectStructureConfigurable method createComponent.
@Override
@Nullable
public JComponent createComponent() {
JPanel component = new MyPanel();
mySplitter = new OnePixelSplitter(false, .15f);
mySplitter.setHonorComponentsMinimumSize(true);
initSidePanel();
JPanel left = new JPanel(new BorderLayout()) {
@Override
public Dimension getMinimumSize() {
Dimension original = super.getMinimumSize();
return new Dimension(Math.max(original.width, 100), original.height);
}
};
DefaultActionGroup toolbarGroup = new DefaultActionGroup();
toolbarGroup.add(new BackAction(component));
toolbarGroup.add(new ForwardAction(component));
ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar("AndroidProjectStructure", toolbarGroup, true);
toolbar.setTargetComponent(component);
myToolbarComponent = toolbar.getComponent();
left.setBackground(SIDE_PANEL_BACKGROUND);
myToolbarComponent.setBackground(SIDE_PANEL_BACKGROUND);
left.add(myToolbarComponent, BorderLayout.NORTH);
left.add(mySidePanel, BorderLayout.CENTER);
mySplitter.setFirstComponent(left);
mySplitter.setSecondComponent(myDetails);
component.add(mySplitter, BorderLayout.CENTER);
myErrorsComponent = new ConfigurationErrorsComponent(myProject);
component.add(myErrorsComponent, BorderLayout.SOUTH);
myUiInitialized = true;
return component;
}
Aggregations